Skip to content

Commit 09f62b0

Browse files
Style the remove color button
1 parent cdc402a commit 09f62b0

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

src/color-scale/color-scale.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,41 @@
88
}
99

1010
color-swatch {
11+
position: relative;
1112
margin: 0;
1213
flex: 1;
14+
15+
.remove-button {
16+
--_border-color: var(--border-color, color-mix(in oklab, buttonborder 20%, oklab(none none none / 0%)));
17+
18+
all: unset;
19+
position: absolute;
20+
inset-inline-end: .3em;
21+
inset-block-start: .3em;
22+
23+
display: grid;
24+
place-items: center;
25+
inline-size: 1.5em;
26+
padding: .2em;
27+
aspect-ratio: 1;
28+
29+
font-size: 70%;
30+
line-height: 1;
31+
text-align: center;
32+
33+
border-radius: 50%;
34+
border: 1px solid var(--_border-color);
35+
box-shadow: 0 .05em 1em -.7em black;
36+
background-color: white;
37+
38+
cursor: pointer;
39+
40+
transition: transform .2s;
41+
42+
&:is(:hover, :focus) {
43+
transform: scale(1.1);
44+
}
45+
}
1346
}
1447

1548
@supports (grid-template-columns: subgrid) {
@@ -37,4 +70,4 @@ color-swatch {
3770
grid-row: 1;
3871
}
3972
}
40-
}
73+
}

0 commit comments

Comments
 (0)