Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #31163
Closed
Open
Issue created Jun 24, 2020 by Administrator@rootContributor

docs-subnavbar blur type backdrop-filter wrongly displayed

Created by: Leuca

This is an issue I've encountered on Safari 13.1.1 (both Mac and iOS versions) using Bootstrap v5 when applying a blur backdrop-filter to a nav element. It might not be present in other browsers and it is hardly noticeable, however when you notice it you cannot ignore it.

I've encountered this issue while making a website and then found out it is present also on https://v5.getbootstrap.com/docs/5.0/getting-started/introduction/

I would describe this issue as if for some reason the blur filter could not be applied to the first top part of the subnavbar (same issue with a standard navbar) as it is shown in this picture:

Screenshot 2020-06-24 at 20 46 56

However the good news is that I could actually find a solution to this problem after hours of useless attempts by simply wrapping the nav item in a div element (which obviously also needs the class "sticky-top") with a custom style. Specifically I created a

.bd-wrap-subnav{
  background-color: rgba($white, .75);
  backdrop-filter: blur(1rem);
}

after commenting both background-color and backdrop-filter present in the .bd-subnavbar in the _subnav.scss:

.bd-subnavbar {
  // The position and z-index are needed for the dropdown to stay on top of the content
  position: relative;
  z-index: $zindex-sticky;
  //background-color: rgba($white, .75);
  //backdrop-filter: blur(1rem);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .05), inset 0 -1px 0 rgba(0, 0, 0, .15);

I modified the "docs-subnavbar.html" partial like this:

<div class="sticky-top bd-wrap-subnav" style="backdrop-filter: blur(1rem);">
<nav class="bd-subnavbar pt-2 pb-3 pb-md-2" aria-label="Secondary navigation">
  <div class="container-xxl d-flex align-items-md-center flex-wrap">
    <form class="bd-search position-relative mb-2 mb-md-0 mr-auto">
      <input type="search" class="form-control" id="search-input" placeholder="Search docs..." aria-label="Search docs for..." autocomplete="off" data-docs-version="{{ .Site.Params.docs_version }}">
    </form>

    {{ partial "docs-versions" . }}

    <button class="btn bd-search-docs-toggle d-md-none p-0 ml-3 order-3 ml-auto" type="button" data-toggle="collapse" data-target="#bd-docs-nav" aria-controls="bd-docs-nav" aria-expanded="false" aria-label="Toggle docs navigation">
     {{ partial "icons/menu.svg" (dict "width" "30" "height" "30") }}
   </button>
  </div>
</nav>
</div>

The result is this:

Screenshot 2020-06-24 at 21 52 26
Assignee
Assign to
Time tracking