• Browser
  • Mail
  • News
  • Community
  • About
Register Login
HomeBlogsForumThemesContributeSocial

Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    We will be doing maintenance work on Vivaldi Translate on the 11th of May starting at 03:00 (UTC) (see the time in your time zone).
    Some downtime and service disruptions may be experienced.
    Thanks in advance for your patience.

    1. Home
    2. Community & Services
    3. Community & Services Feature Requests
    4. Archive
    5. Allow <style> tags in posts

    Allow <style> tags in posts

    Archive
    blogs
    3
    10
    550
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LonM
      L
      LonM Soprano Patron Moderator
      last edited by

      I've been toying with trying to add some CSS to just one specific post on my site. Apparently it's not possible, as the editor strips out <style> tags. Being able to do that would be nice.

      I wanted to try writing a blog post in japanese, and seeing if I could make it vertical. It only takes 2 css rules and a selector, (with some extras just to make it nicer), but I can't do that.

      πŸ’» Windows 10 64-bit Sopranos Builds β€’ en-GB β€’ πŸ—³ vote for features β€’ πŸ•΅οΈβ€β™€οΈ Code of Conduct β€’ 🐞 Report bugs

      1 Reply Last reply Reply Quote 1
      • ?
        A Former User
        last edited by

        Can you not <div style="...">(the content)</div>? I know it can get really messy, but at least it works…

        PS: Tried something like this earlier, IDK what exactly I was trying to achieve.

        LonM
        L
        1 Reply Last reply
        Reply Quote 2
        • Obiwan2208
          O
          Obiwan2208
          last edited by

          I've got a Wordpress(.com) blog.

          Although I'm a free user and I can't import directly CSS files, but I can use <style> tag in almost things, just place it inside any HTML tag.
          Ie.

          <div style="...">bla, bla, bla</div>
          <p style="...">bla, bla, bla</p>
          <img src="..."  style="..." />
          

          This helps me to create especial adverts on posts, define margins, borders, apply special effects on imgs (like shadows), use sprites, etc.

          Actually we use a block editor for easy coding, but choosing custom HTML it's possible. I figure will be similar on Vivaldi's blogs

          πŸ–₯ W10 PRO / πŸ’» Linux Mint / πŸ“± Pixel 6a (GrapheneOS w/out GApps)

          1 Reply Last reply Reply Quote 1
          • LonM
            L
            LonM Soprano Patron Moderator @A Former User
            last edited by LonM

            @potmeklecbohdan @Obiwan2208 This is what I've had to do previously, but there are a number of problems which make that an intractable solution:

            1. It's awkward to have to do it to every single block you want to style
            2. The editor only allows certain CSS rules it seems
            3. That only works per-block, so if you tried to make everything vertical it would just makes each paragraph vertical, but lays them each out on their own horizontal line, which defeats the whole purpose for wanting to style like that. Inline rules are not a substitute for the real thing.

            πŸ’» Windows 10 64-bit Sopranos Builds β€’ en-GB β€’ πŸ—³ vote for features β€’ πŸ•΅οΈβ€β™€οΈ Code of Conduct β€’ 🐞 Report bugs

            ?
            1 Reply Last reply
            Reply Quote 1
            • ?
              A Former User @LonM
              last edited by

              @LonM Can you give me an example of styled (via <style>) HTML, so I can play with it?

              I know it’s veering OT from the original request, but… I just want to try it.

              LonM
              L
              1 Reply Last reply
              Reply Quote 1
              • LonM
                L
                LonM Soprano Patron Moderator
                last edited by LonM

                To illustrate my point better: Real styling lets me do this:
                4d624bfe-9ca1-4d6d-af55-c5f2b66bc79a-image.png

                Per-block hacking with style attributes WOULD let me do this (see how each paragraph still fills its own block):
                fe055f64-5725-4daf-8fbf-afd774e57f9f-image.png

                Except even that doesn't work because it only allows a subset of all CSS rules for some stupid reason.

                πŸ’» Windows 10 64-bit Sopranos Builds β€’ en-GB β€’ πŸ—³ vote for features β€’ πŸ•΅οΈβ€β™€οΈ Code of Conduct β€’ 🐞 Report bugs

                1 Reply Last reply Reply Quote 1
                • LonM
                  L
                  LonM Soprano Patron Moderator @A Former User
                  last edited by

                  @potmeklecbohdan The rule I want to add is this:

                  .entry-content {
                      writing-mode: vertical-rl;
                      text-orientation: upright;
                      max-height: 500px;
                      margin-top: 20px !important;
                  }
                  

                  I

                  πŸ’» Windows 10 64-bit Sopranos Builds β€’ en-GB β€’ πŸ—³ vote for features β€’ πŸ•΅οΈβ€β™€οΈ Code of Conduct β€’ 🐞 Report bugs

                  ?
                  1 Reply Last reply
                  Reply Quote 1
                  • ?
                    A Former User @LonM
                    last edited by

                    @LonM Dammit, you’re right. I have no idea why it strips this kind of style rules…

                    LonM
                    L
                    1 Reply Last reply
                    Reply Quote 2
                    • LonM
                      L
                      LonM Soprano Patron Moderator @A Former User
                      last edited by

                      @potmeklecbohdan Yeah. I don't know if this is intentional or just a bug.

                      πŸ’» Windows 10 64-bit Sopranos Builds β€’ en-GB β€’ πŸ—³ vote for features β€’ πŸ•΅οΈβ€β™€οΈ Code of Conduct β€’ 🐞 Report bugs

                      1 Reply Last reply Reply Quote 1
                      • Obiwan2208
                        O
                        Obiwan2208
                        last edited by Obiwan2208

                        It's as it's. It's how Wordpress work at least 11 years ago that I'm blogging.

                        It's free, so are applies some restrictions...

                        You can't use <script>, <link> nor any element that must be placed outside <body>. Each CSS style must be written inside on each HTML element, or use the element <span style="..."></span>.

                        It's not a bug.

                        πŸ–₯ W10 PRO / πŸ’» Linux Mint / πŸ“± Pixel 6a (GrapheneOS w/out GApps)

                        1 Reply Last reply Reply Quote 1
                        • pafflick
                          P
                          pafflick moved this topic from Done on
                        • LonM
                          L
                          LonM moved this topic from Community & Services Feature Requests on
                        Loading More Posts
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes
                        Reply
                        • Reply as topic
                        Log in to reply
                        • 1 / 1
                        • First post
                          Last post

                        Looks like your connection to Vivaldi Forum was lost, please wait while we try to reconnect.

                        Copyright © Vivaldi Technologies™ β€” All rights reserved. Privacy Policy | Code of conduct | Terms of use | Vivaldi Status