fix: keep arrow button icon inside its parent (#186)

If the parent element sets "text-align: center", "position: absolute"
leads to weird offset issue due to "left: auto" calculation rules.
Specifically the rule 2 for "static position" in Chapter 10 of CSS 2:
https://www.w3.org/TR/CSS2/visudet.html#static-position

It's not necessary for these pseudo-elements to be positioned, hence
the simplification.
This commit is contained in:
csalinezh 2024-11-14 02:42:19 +02:00 committed by GitHub
parent 1b60511ae7
commit 201238ccd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,10 +72,9 @@
cursor: pointer;
&::after {
position: absolute;
top: 0;
bottom: 0;
display: block;
width: inherit;
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: 14px;