Skip to content

Commit 8421a6e

Browse files
authored
fix: center pointer fill using flexbox (#76)
1 parent 46d32c0 commit 8421a6e

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
},
137137
{
138138
"path": "rgba-color-picker.js",
139-
"limit": "2.9 KB"
139+
"limit": "2.95 KB"
140140
},
141141
{
142142
"path": "rgba-string-color-picker.js",

src/lib/styles/color-picker.css

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
box-sizing: border-box;
3333
width: 28px;
3434
height: 28px;
35+
display: flex;
36+
place-content: center center;
3537
transform: translate(-50%, -50%);
3638
background-color: #fff;
3739
border: 2px solid #fff;
@@ -40,13 +42,9 @@
4042
}
4143

4244
[part$='pointer']::after {
43-
display: block;
4445
content: '';
45-
position: absolute;
46-
left: 0;
47-
top: 0;
48-
right: 0;
49-
bottom: 0;
46+
width: 100%;
47+
height: 100%;
5048
border-radius: inherit;
5149
background-color: currentColor;
5250
}

0 commit comments

Comments
 (0)