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

Vivaldi

  • Browser
  • Mail
  • News
  • Community
  • About

Navigation

    • Home
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Desktop
    3. Customizations & Extensions
    4. Modifications
    5. Edge like curved frame around website

    Edge like curved frame around website

    Modifications
    7
    26
    3.6k
    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.
    • oudstand
      O
      oudstand Supporters
      last edited by oudstand

      Inspired by the curved frame around the website as in the latest Microsft Edge Dev, I wrote some CSS to achieve this in Vivaldi.

      Code:

      /** 
      * Edge like border radius
      * Forum link: https://forum.vivaldi.net/topic/83618/edge-like-curved-frame-around-website
      */
      
      #browser {
          --edge-like-border-radius: var(--radius); /* 0.5rem */
      
          &.fullscreen {
              #main, .inner {
                  padding-top: 0;
              }
          }
      
          &:not(.fullscreen) {
              &:has(#panels-container.left.icons) #webpage-stack {
                  margin-left: 0;
              }
              &:has(#panels-container.left > .SlideBar) #webpage-stack {
                  margin-left: 3px;
              }
              &:has(#panels-container.right.icons) #webpage-stack {
                  margin-right: 0;
              }
              &:has(#panels-container.right > .SlideBar) #webpage-stack {
                  margin-right: 3px;
              }
      
              #webpage-stack {
                  box-shadow: 0 0 0 var(--edge-like-border-radius) var(--colorAccentBg);
      
                  margin-left: calc(var(--edge-like-border-radius) / 2);
                  margin-bottom: calc(var(--edge-like-border-radius) / 2);
                  margin-right: calc(var(--edge-like-border-radius) / 2);
      
                  &::before {
                      content: '';
                      position: absolute;
                      width: 100%;
                      height: 100%;
                      border-radius: var(--edge-like-border-radius);
                      /* border-top-left-radius: var(--edge-like-border-radius);
                      border-bottom-left-radius: var(--edge-like-border-radius);
                      border-top-right-radius: var(--edge-like-border-radius);
                      border-bottom-right-radius: var(--edge-like-border-radius); */
                      outline: var(--edge-like-border-radius) solid var(--colorAccentBg);
                      z-index: 4;
                      pointer-events: none;
                  }
              }
      
              #switch {
                  margin-bottom: calc(var(--edge-like-border-radius) / 2);
              }
      
              #panels-container {
                  border-color: var(--colorAccentBg) !important;
      
                  &:not(.icons):not(.overlay) .panel-group {
                      margin-right: calc(var(--edge-like-border-radius) / 4);
                      padding-right: calc(var(--edge-like-border-radius) / 4);
                      border-right: none;
      
                      .panel-collapse-guard {
                          border-radius: var(--edge-like-border-radius);
                      }
                  }
      
                  > button.SlideBar {
                      background: var(--colorAccentBg);
                  }
              }
      
              .panel-group {
                  transition: border-right 0.5s ease, width var(--duration) ease-out !important;
                  margin-bottom: calc(var(--edge-like-border-radius) / 2);
      
                  &::before {
                      content: '';
                      position: fixed;
                      width: 100%;
                      height: 100%;
                      border-top-left-radius: var(--edge-like-border-radius);
                      border-bottom-left-radius: var(--edge-like-border-radius);
                      outline: var(--edge-like-border-radius) solid var(--colorAccentBg);
                      z-index: 1;
                      pointer-events: none;
                  }
              }
      
              .StatusInfo {
                  margin-bottom: calc(var(--edge-like-border-radius) / 2);
                  margin-left: calc(var(--edge-like-border-radius) / 2);
              }
          }
      }
      
      .fullscreen-listener-enabled #browser:not(.fullscreen) {
          #webpage-stack {
              margin: calc(var(--edge-like-border-radius) / 2) !important;
          }
      
          #switch {
              margin-top: calc(var(--edge-like-border-radius) / 2);
          }
      }
      

      Result:
      91bb62cf-c89f-46e8-b5d6-ae3f0ef6989f-image.png


      You could also set the border only for some corners and without the black bar at the bottom. Therefore you can specify the border radius of each corner at #webpage-stack::before like this:
      Code:

      #webpage-stack::before {
          content: '';
          position: absolute;
          width: 100%;
          height: 100%;   
          /* border-radius: var(--edge-like-border-radius); */
          border-top-left-radius: var(--edge-like-border-radius);
          /* border-bottom-left-radius: var(--edge-like-border-radius); */
          border-top-right-radius: var(--edge-like-border-radius);
          /* border-bottom-right-radius: var(--edge-like-border-radius); */
          outline: var(--edge-like-border-radius) solid var(--colorAccentBg);
          z-index: 1;
          pointer-events: none;
      }
      

      and remove margin-bottom and margin-right from #webpage-stack.
      Result:
      335d27cc-ddc9-4f12-bb10-09f000103f1b-image.png

      If you're not using the code with margin-bottom you could also remove this code:

      .StatusInfo {
          margin-bottom: calc(var(--edge-like-border-radius) / 2);
          margin-left: calc(var(--edge-like-border-radius) / 2);
      }
      
      .panel-group {
          margin-bottom: calc(var(--edge-like-border-radius) / 2);
      }
      

      For the web panels the rounded corners are displayed like this:
      Result:
      8c1f8411-a57b-45b3-998d-4c16d0cde597-image.png

      Result floating panel:
      1c4f6fab-da48-4093-8e0b-85a604e9796e-image.png


      EDIT 1: Rewrote most of the code to achieve a better overall experience.
      EDIT 2: set the correct margin at the bottom of the web panels switch to fit with the web page
      EDIT 3: bug fixes & works now with AutoHide Tab Bar + Address Bar | Show on Hover
      EDIT 4: bug fix
      EDIT 5: now works on internal pages

      1 Reply Last reply Reply Quote 11
      • allanmohr
        A
        allanmohr
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • allanmohr
          A
          allanmohr
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • allanmohr
            A
            allanmohr
            last edited by

            Ok, I guess this won't work.
            I'm using tabs at bottom and my existing CSS is hiding the side panel.
            Thanks, though - I really prefer this aesthetic but I guess I'm kind of out of luck!

            1 Reply Last reply Reply Quote 0
            • allanmohr
              A
              allanmohr
              last edited by

              Ok, I'm good. Got a great result with:

              #webpage-stack {
                  /* change color (last parameter) to your preferred color */
                  box-shadow: 0 0 0 0.75rem var(--colorAccentBg); 
              
                  border-radius: 0.25rem;
                  margin-top: 0.5rem;
                  margin-left: 0.5rem;
                  margin-bottom: 0.5rem;
                  margin-right: 0.5rem;
              }
              
              1 Reply Last reply Reply Quote 0
              • DoctorG
                D
                DoctorG Soprano
                last edited by

                But i guess you should add a padding as rounded corners will cut content of a page.

                _bug hunter · Volunteer helper · Sopranos tester · Language DE,EN · ♀👵
                Known old dragon lady: Gwen aka Dr. Gwen Agon aka GwenDragon aka DoctorGTesting


                Linux Debian 12 KDE X11 / Windows 11 Pro
                Intel i5-7400 / NVidia GT 710

                oudstand
                O
                1 Reply Last reply
                Reply Quote 2
                • oudstand
                  O
                  oudstand Supporters @DoctorG
                  last edited by

                  @DoctorG that's true. Until now I didn't noticed problems on websites but it could happen.

                  1 Reply Last reply Reply Quote 0
                  • joaomascarenhas
                    J
                    joaomascarenhas
                    last edited by

                    I still haven't been able to make it work... 😕

                    oudstand
                    O
                    1 Reply Last reply
                    Reply Quote 0
                    • Pesala
                      P
                      Pesala Ambassador
                      last edited by

                      With today’s high resolution widescreen monitors, just tile two tabs, then you will get round corners.

                      alt text

                      Blog • Vivaldi Review • Server Status
                      Win 10 64-bit build 19045.2486 • Snapshot 7.5.3704.3 (64-bit)

                      oudstand
                      O
                      1 Reply Last reply
                      Reply Quote 0
                      • oudstand
                        O
                        oudstand Supporters @joaomascarenhas
                        last edited by

                        @joaomascarenhas Where are you stuck or what's not working?

                        1 Reply Last reply Reply Quote 0
                        • oudstand
                          O
                          oudstand Supporters @Pesala
                          last edited by

                          @Pesala Yes that's true, but on the one side of the monitor is my browser and on the other half my IDE 😃

                          1 Reply Last reply Reply Quote 0
                          • rexxDZN
                            R
                            rexxDZN
                            last edited by

                            image.png i have this weird artifact on the left, it doesn't matter if it is the tab stack or just one normal tab. @oudstand

                            oudstand
                            O
                            1 Reply Last reply
                            Reply Quote 0
                            • oudstand
                              O
                              oudstand Supporters @rexxDZN
                              last edited by

                              @rexxDZN If I use the tabs on the left, it still works correctly. What exactly disturbs you?

                              rexxDZN
                              R
                              2 Replies Last reply
                              Reply Quote 0
                              • rexxDZN
                                R
                                rexxDZN @oudstand
                                last edited by

                                @oudstand there is a greyish red block obstructing the theme and is at the middle of the tabs.

                                1 Reply Last reply Reply Quote 0
                                • rexxDZN
                                  R
                                  rexxDZN @oudstand
                                  last edited by

                                  @oudstand 34375783-38b0-489d-81fa-a69d18948f69-image.png it even blocks the plus or other icons...

                                  oudstand
                                  O
                                  1 Reply Last reply
                                  Reply Quote 0
                                  • oudstand
                                    O
                                    oudstand Supporters @rexxDZN
                                    last edited by

                                    @rexxDZN Try to add this code. Then it should look better. Let me know if it fixes your problem.

                                    .tabs-left .tabbar-wrapper {
                                        padding-right: 0.25rem;
                                        z-index: 1;
                                    }
                                    
                                    1 Reply Last reply Reply Quote 0
                                    • rexxDZN
                                      R
                                      rexxDZN
                                      last edited by

                                      that unfortunatly broke everything...
                                      image.png

                                      oudstand
                                      O
                                      1 Reply Last reply
                                      Reply Quote 0
                                      • oudstand
                                        O
                                        oudstand Supporters @rexxDZN
                                        last edited by

                                        @rexxDZN interesting this doesn't happen if I try the provided code:
                                        59ece9bd-54f4-43e5-8a23-e39e55e20ae1-image.png

                                        Did you use the code like this? Or do you use other mods as well that could break it?

                                        #browser:not(.fullscreen) #webpage-stack {
                                            box-shadow: 0 0 0 1rem var(--colorBorder);
                                        
                                            /* border-top-left-radius: 0.75rem; */
                                            /* border-top-right-radius: 0.75rem; */
                                            border-bottom-left-radius: 0.75rem;
                                            border-bottom-right-radius: 0.75rem;
                                        
                                            margin-bottom: 0.5rem;
                                            margin-right: 0.5rem;
                                        }
                                        
                                        .tabs-left .tabbar-wrapper {
                                            padding-right: 0.25rem;
                                            z-index: 1;
                                        }
                                        
                                        #browser:not(.fullscreen) #webpage-stack::before {
                                            content: '';
                                            position: absolute;
                                            width: .75rem;
                                            height: .75rem;
                                            background-color: var(--colorBorder);
                                            -webkit-mask-image: radial-gradient(circle at 0 0, rgba(0, 0, 0, 0) 70%, #000 73%);
                                            transform: rotate(180deg);
                                            z-index: 1;
                                        }
                                        
                                        #browser:not(.fullscreen) #webpage-stack::after {
                                            content: '';
                                            position: absolute;
                                            bottom: 0;
                                            width: .75rem;
                                            height: .75rem;
                                            background-color: var(--colorBorder);
                                            -webkit-mask-image: radial-gradient(circle at 0 0, rgba(0, 0, 0, 0) 70%, #000 73%);
                                            transform: rotate(-90deg);
                                            z-index: 1;
                                            top: 0;
                                            right: 0;
                                        }
                                        
                                        .StatusInfo {
                                            margin-bottom: 0.5rem;
                                        }
                                        
                                        .panel-group {
                                            margin-bottom: .5rem;
                                        }
                                        
                                        .panel-group::before {
                                            content: '';
                                            position: absolute;
                                            width: .75rem;
                                            height: .75rem;
                                            background-color: var(--colorBorder);
                                            -webkit-mask-image: radial-gradient(circle at 0 0, rgba(0, 0, 0, 0) 70%, #000 73%);
                                            transform: rotate(180deg);
                                        }
                                        
                                        .panel-group::after {
                                            content: '';
                                            position: absolute;
                                            bottom: 0;
                                            width: .75rem;
                                            height: .75rem;
                                            background-color: var(--colorBorder);
                                            -webkit-mask-image: radial-gradient(circle at 0 0, rgba(0, 0, 0, 0) 70%, #000 73%);
                                            transform: rotate(90deg);
                                        }
                                        
                                        .webpanel-content {
                                            border-top-left-radius: .75rem;
                                        }
                                        
                                        rexxDZN
                                        R
                                        1 Reply Last reply
                                        Reply Quote 0
                                        • rexxDZN
                                          R
                                          rexxDZN @oudstand
                                          last edited by

                                          @oudstand yes i am using https://forum.vivaldi.net/topic/82900/collapsing-vertical-tabs-that-expand-on-hover-with-and-without-floating-tabs?page=1 the newer version in half of the first page. However I have found a better css that does the same thing working with it. Thank you for your help 🙂

                                          oudstand
                                          O
                                          1 Reply Last reply
                                          Reply Quote 1
                                          • oudstand
                                            O
                                            oudstand Supporters @rexxDZN
                                            last edited by

                                            @rexxDZN Then this might be the problem ^^ Good that you found a solution

                                            1 Reply Last reply Reply Quote 0
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • 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