Outline-offset does not apply to Chrome / Windows when the outline style is auto

I apply the style to the focused element that is in the lines:

.<class-name>:focus {
  outline: 4px auto #068065 !important;
  outline-offset: 2px !important;
}

(This is part of the Chrome extension code, so it should not be a cross browser).

The problem is that the offset offset does not apply to Chrome / Windows when the outline style is “auto”. On Chrome / Mac, this works great.

If you change the outline style from “auto” to “solid,” the outline offset will be just fine.

I would like to be able to use both the “auto” style and the contour offset. Any thoughts or suggestions?

0
source share
1 answer

EDIT:

, .

display: inline-block , .


outline-*, , outline- :

outline-color: #068065;
outline-style: auto;
outline-offset: 2px !important;
outline-width: 4px;

, !

+1

Source: https://habr.com/ru/post/1770471/


All Articles