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
  • Merge requests
  • !32165

Fix focus for dropdown items

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/spahno/dropdown-items-outline-focus(#31949) into main Nov 16, 2020
  • Overview 0
  • Commits 4
  • Pipelines 0
  • Changes 1

Created by: spahno

Response to issue #31949 (closed)

Added universal outline for dropdown-items for button and a tags in _reboot.scss.

What we have tried:

  1. The problem is, that if you set the -webkit-focus-ring-color auto attribute, the outline style and outline color works differently in every browser for the <a> and the <button> tag. For example, the <a> is dotted in Firefox unlike the <button>which is surrounded with a solid blue outline.

  2. We tried to recreate the blue outline with a border and border-radius for every tag but we could not make the anchor tag have a rounded border, because a link cannot have a border-radius.

Solution:

To find a consistent solution for every browser, we decided to add a blue outline without a border-radius as you can see below in the screenshots.

Tested browsers:

Chrome 86.0.4240.193, Firefox 82.0.3 and Safari 14.0.

Screenshots:

The focus, when navigating with arrow keys: Focus with arrow keys

The focus, when clicking: Focus on click

Team:

@LtHustensaft @lewe98 @spahno

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/spahno/dropdown-items-outline-focus(#31949)