close.css improvements
This commit is contained in:
@@ -1,31 +1,36 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
i.icon.close {
|
||||
--diameter: 22px;
|
||||
box-sizing: border-box;
|
||||
--diameter: 2em;
|
||||
--size: 1.5em;
|
||||
position: relative;
|
||||
display: block;
|
||||
width: var(--diameter);
|
||||
height: var(--diameter);
|
||||
border: 2px solid transparent;
|
||||
border-radius: 40px;
|
||||
}
|
||||
|
||||
i.icon.close::after,
|
||||
i.icon.close::before {
|
||||
content: "";
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 2px;
|
||||
background: currentColor;
|
||||
transform: rotate(45deg);
|
||||
border-radius: 5px;
|
||||
top: 8px;
|
||||
left: 1px;
|
||||
}
|
||||
display: block;
|
||||
border-radius: 40px;
|
||||
border: 0.2em solid transparent;
|
||||
|
||||
i.icon.close::after {
|
||||
&:is(.small) {
|
||||
--size: 1.2em;
|
||||
}
|
||||
|
||||
&::after,
|
||||
&::before {
|
||||
top: 0.7em;
|
||||
left: 0.2em;
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: var(--size, 1.5em);
|
||||
height: 2px;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
border-radius: 5px;
|
||||
background-color: currentColor;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
&::after {
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user