• 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. Desktop
    3. Customizations & Extensions
    4. Modifications
    5. Changing icons with CSS / part II

    Changing icons with CSS / part II

    Modifications
    modding css
    34
    316
    88.7k
    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.
    • ?
      A Former User @BohemiaDrinker
      last edited by

      @BohemiaDrinker I did some small changes to your code:

      • the common part is only once (for both selectors)
      • if you want this only for disabled buttons, the title is set on the div.button-toolbars and disabled on the buttons themselves
      • the svgs are incorrectly sized, so I changed their size to 100% and so the buttons had to be also sized (look for width) to not expand to hundreds of pixels
      • (just to be able to test) text of the titles — don't forget to revert this change
      .button-toolbar[title~="previous"] > button[disabled],
      .button-toolbar[title~="forward"] > button[disabled] {
      	background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(232,232,232,1) 100%) !important;
      	fill: #000;
      	border-top: 1px solid #d3d3d3 !important;
      	border-bottom: 1px solid #b0b0b0 !important;
      	border-right: 1px solid #cccccc !important;
      	border-left: 1px solid #cccccc !important;
      	max-height: 24px !important;
      	min-width: 28px !important;
      	width: 28px;
      	border-radius: 4px !important;
      }
      
      .button-toolbar[title~="previous"] > button[disabled] svg,
      .button-toolbar[title~="forward"] > button[disabled] svg {
          height: 100%;
          width: 100%;
      }
      
      .button-toolbar[title~="previous"] > button[disabled] {
      	margin-left: 8px !important;
      	padding-top: -3px;
      }
      
      .button-toolbar[title~="forward"] > button[disabled] {
      	border-radius: 4px !important;
      	margin-left: -1px !important;
      }
      
      B
      1 Reply Last reply
      Reply Quote 1
      • B
        BohemiaDrinker @A Former User
        last edited by

        @potmeklecbohdan

        Thanks for the help. Adding your code put things on the right track, but generated some weird effects.

        Disabled back button has a button "behind" it:
        Captura de Tela 2019-10-21 às 15.36.10.png

        If back is enabled and forward is disabled, they're one or two pixels unaligned vertically:

        Captura de Tela 2019-10-21 às 15.37.02.png

        And vice versa.

        I tried to mesas around with some values, and chaos ensued. :smiling_face_with_open_mouth_closed_eyes:

        Any suggestions? And thanks again!

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

          @BohemiaDrinker About the misalignment: try applying the size change also to svgs in enabled buttons (and also to the buttons if you don't want them really wide). Btw., you should again try to use all common styles only once to avoid errors when you make changes.

          About the doubled button — I don't know as I don't see it (I do see it on your picture, of course). If the above doesn't help, please post all code you use (or a link to it).

          1 Reply Last reply Reply Quote 0
          • B
            BohemiaDrinker
            last edited by BohemiaDrinker

            @potmeklecbohdan
            I messed with the code and almost fixed it by now, thank you!

            I have one small issue, but will clean up things a bit to see if it solves it. Thank you"

            ANNNNNNNND it's fixed. You've been a huge help, man, thank you very much!

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

              Animated recent tabs bin:

              .toggle-trash:hover .trashicon-lid {
                  transform: rotateZ(30deg) translate(-1px, -1px);
              }
              

              2019-12-17_13-00-05.gif

              💻 Windows 10 64-bit Sopranos Builds • en-GB • 🗳 vote for features • 🕵️‍♀️ Code of Conduct • 🐞 Report bugs

              Ornorm
              O
              Buglocker
              B
              13RAD
              1
              3 Replies Last reply
              Reply Quote 12
              • luetage
                L
                luetage Supporters Soprano
                last edited by luetage

                Quick alternative to the windows‐logo like favicon on startpage tabs, exchanged it with an underscore because less is less

                .favicon.jstest-favicon-image.svg [d="M0 2C0 1.44772 0.447715 1 1 1H6C6.55228 1 7 1.44772 7 2V6C7 6.55228 6.55228 7 6 7H1C0.447715 7 0 6.55228 0 6V2ZM8 2C8 1.44772 8.44772 1 9 1H14C14.5523 1 15 1.44772 15 2V6C15 6.55228 14.5523 7 14 7H9C8.44772 7 8 6.55228 8 6V2ZM0 9C0 8.44772 0.447715 8 1 8H6C6.55228 8 7 8.44772 7 9V13C7 13.5523 6.55228 14 6 14H1C0.447715 14 0 13.5523 0 13V9ZM8 9C8 8.44772 8.44772 8 9 8H14C14.5523 8 15 8.44772 15 9V13C15 13.5523 14.5523 14 14 14H9C8.44772 14 8 13.5523 8 13V9Z"] {
                    d: path("M7,12h9v2h-9Z");
                }
                

                Screenshot from 2020-09-07 11-46-07.png

                We can also go bigger, but I didn’t really favor it:

                .favicon.jstest-favicon-image.svg [d="M0 2C0 1.44772 0.447715 1 1 1H6C6.55228 1 7 1.44772 7 2V6C7 6.55228 6.55228 7 6 7H1C0.447715 7 0 6.55228 0 6V2ZM8 2C8 1.44772 8.44772 1 9 1H14C14.5523 1 15 1.44772 15 2V6C15 6.55228 14.5523 7 14 7H9C8.44772 7 8 6.55228 8 6V2ZM0 9C0 8.44772 0.447715 8 1 8H6C6.55228 8 7 8.44772 7 9V13C7 13.5523 6.55228 14 6 14H1C0.447715 14 0 13.5523 0 13V9ZM8 9C8 8.44772 8.44772 8 9 8H14C14.5523 8 15 8.44772 15 9V13C15 13.5523 14.5523 14 14 14H9C8.44772 14 8 13.5523 8 13V9Z"] {
                    d: path("M 0 0 h4 v4 h-4 Z M 0 6 h4 v4 h-4 Z M 0 12 h4 v4 h-4 Z M 6 0 h4 v4 h-4 Z M 6 6 h4 v4 h-4 Z M 6 12 h4 v4 h-4 Z M 12 0 h4 v4 h-4 Z M 12 6 h4 v4 h-4 Z M 12 12 h4 v4 h-4 Z");
                }
                

                Screenshot from 2020-09-07 11-54-36.png

                Current favicon for comparison:

                Screenshot from 2020-09-07 11-55-56.png

                The second version could probably be edited to look like the old startpage favicon, I just didn’t put the time into it.

                github ◊ vfm

                Steffie
                S
                1 Reply Last reply
                Reply Quote 4
                • Steffie
                  S
                  Steffie @luetage
                  last edited by

                  @luetage Ta, but... collateral damage afaik:

                  db0a9cc0-a65c-406d-835f-5e3c462735df-image.png

                  ♀ 🇦🇺

                  luetage
                  L
                  1 Reply Last reply
                  Reply Quote 2
                  • luetage
                    L
                    luetage Supporters Soprano @Steffie
                    last edited by

                    @Steffie Far more than that, basically all internal pages with an svg as favicon get exchanged, including notes, bookmarks, history.

                    github ◊ vfm

                    Steffie
                    S
                    1 Reply Last reply
                    Reply Quote 0
                    • Steffie
                      S
                      Steffie @luetage
                      last edited by

                      @luetage Ah wow. In that case i might just remove this css again, thanks all the same 😄

                      ♀ 🇦🇺

                      luetage
                      L
                      1 Reply Last reply
                      Reply Quote 0
                      • luetage
                        L
                        luetage Supporters Soprano @Steffie
                        last edited by luetage

                        @Steffie Could be done with javascript, at the moment I don’t see an obvious way to discern the different pages with css. This is more about making and sharing the svg path than anything else.

                        github ◊ vfm

                        ?
                        nomadic
                        N
                        2 Replies Last reply
                        Reply Quote 0
                        • ?
                          A Former User @luetage
                          last edited by

                          @luetage There’s always the [d=""], though it breaks with every icon update…

                          Btw., congratulations on 200th post! 🎉

                          luetage
                          L
                          1 Reply Last reply
                          Reply Quote 4
                          • luetage
                            L
                            luetage Supporters Soprano @A Former User
                            last edited by

                            @potmeklecbohdan Thank you for mentioning it. You will be the only one invited to the 200th post celebration feast, since everyone else was just rude and ignored it. There will be words, pics, codes and thumb ups, interspersed by the occasional link. Get ready for the party of a lifetime.

                            github ◊ vfm

                            1 Reply Last reply Reply Quote 4
                            • luetage
                              L
                              luetage Supporters Soprano
                              last edited by

                              @potmeklecbohdan said in Changing icons with CSS / part II:

                              There’s always the [d=""]

                              Didn’t know we could select like that, but it makes sense. It’s clunky, but certainly better than running a js mod for something that’s far better handled by pure css. I updated the original post, seems to work fine – thanks. You truly deserve to be at this party 🍰

                              github ◊ vfm

                              1 Reply Last reply Reply Quote 2
                              • nomadic
                                N
                                nomadic Soprano @luetage
                                last edited by

                                @luetage Thanks for the svg. Saved me from having to convert my png based favicon from before the update.

                                @luetage said in Changing icons with CSS / part II:

                                Could be done with javascript, at the moment I don’t see an obvious way to discern the different pages with css.

                                Couldn't you use the tab's title to select only the start page for example?

                                .tab[title="Start Page"] .favicon.jstest-favicon-image.svg svg path {
                                  d: path(
                                    "M 0 0 h4 v4 h-4 Z M 0 6 h4 v4 h-4 Z M 0 12 h4 v4 h-4 Z M 6 0 h4 v4 h-4 Z M 6 6 h4 v4 h-4 Z M 6 12 h4 v4 h-4 Z M 12 0 h4 v4 h-4 Z M 12 6 h4 v4 h-4 Z M 12 12 h4 v4 h-4 Z"
                                  );
                                }
                                

                                That works for me.
                                diff-favicons.png

                                luetage
                                L
                                ?
                                2 Replies Last reply
                                Reply Quote 4
                                • luetage
                                  L
                                  luetage Supporters Soprano @nomadic
                                  last edited by

                                  @nomadic Damn, you are begging for an invite here, I can see that. Ok ok, you can come too, here, have some ice cream 🍨

                                  github ◊ vfm

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

                                    @nomadic That has several problems, at least:

                                    • localisation
                                    • tab pop-up thumbnails (if you enable them, the [title] is gone)
                                    1 Reply Last reply Reply Quote 3
                                    • Steffie
                                      S
                                      Steffie
                                      last edited by

                                      Reading down the last two pages of this long thread has been more exciting than a thriller novel. With each successive post i get the frisson of delight at someone's brilliant new idea to defeat this nasty Redmond icon, only to be driven back down into despair & woe when the subsequent post points out the problems created by the preceding. It's a genuine emotional roller-coaster, a fair-dinkum sine wave of exhilaration [or cosine, for those who see life always 90 degrees offset :face_with_stuck-out_tongue_winking_eye: ].

                                      Rather than a BSoD icon, tbh i'd rather a penguin.

                                      🤪

                                      ♀ 🇦🇺

                                      luetage
                                      L
                                      BoneTone
                                      B
                                      2 Replies Last reply
                                      Reply Quote 3
                                      • luetage
                                        L
                                        luetage Supporters Soprano @Steffie
                                        last edited by

                                        @Steffie I updated the post on the last page with working code derived from @potmeklecbohdan’s suggestion. It works fine and only changes the startpage. @nomadic’s suggestion works too when you don’t use the pop up thumbnails, which I have always disabled anyway. Rejoice and Redmond be gone! Now it’s on you to create a penguin svg fitting in a 16×16 format. We are awaiting your contribution excitedly.

                                        github ◊ vfm

                                        Steffie
                                        S
                                        1 Reply Last reply
                                        Reply Quote 3
                                        • Steffie
                                          S
                                          Steffie @luetage
                                          last edited by Steffie

                                          @luetage said in Changing icons with CSS / part II:

                                          We are awaiting your contribution excitedly

                                          I thank you sincerely for the confidence & trust placed in me. I am happy to announce that my planning department has reorganised the schedule, retooled the production line, & have a 95% confidence interval of delivery in full on time under budget, the day after Godot appears... although we are also willing to accept Zarquon as an alternative.



                                          Yibberty dibberty, my penguin sincerely thanks you clever people, again.

                                          bfea2b29-a94d-45a5-bfd3-4d67d6f53573-image.png

                                          ♀ 🇦🇺

                                          1 Reply Last reply Reply Quote 3
                                          • BoneTone
                                            B
                                            BoneTone @Steffie
                                            last edited by

                                            <offtopic>

                                            @Steffie said in Changing icons with CSS / part II:

                                            Rather than a BSoD

                                            I love your writing, you make use my dictionary (frisson), which is a good thing. But just curious, when is the last time you bluescreened a box? It's been years since I've seen that. Surely before Win10, but I'm trying to recall if I ever managed to bluescreen Win7 even. Definitely in XP, and Server 2003, but it was my job to bluescreen it back then, literally.

                                            </offtopic>

                                            I post from my phone frequently, which likes to change "the" to "three". If you see three or similar, I probably meant "the". I use swipe, so typos can be totally unrelated words to what I intended. Knowing this should help you read through my typos.

                                            Steffie
                                            S
                                            1 Reply Last reply
                                            Reply Quote 2
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            • 1
                                            • 2
                                            • 8
                                            • 9
                                            • 10
                                            • 11
                                            • 12
                                            • 15
                                            • 16
                                            • 10 / 16
                                            • 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