c8ecb8db3b
We currently define our 'decorational' iconography in our CSS via background images and or psuedo content. For coloring these we use `mask-image` and a background color. This commit adds a background-color: currentColor to our %with-mask placeholder that makes the color of these icons default to the `color` of the current element, meaning the icons now inherit from things like `:hover`. This can easily be overwritten as before by just setting the background-color on the icon manually as before.
19 lines
345 B
SCSS
19 lines
345 B
SCSS
%with-icon {
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
}
|
|
%with-mask {
|
|
mask-repeat: no-repeat;
|
|
mask-position: center;
|
|
background-color: currentColor;
|
|
}
|
|
%as-pseudo {
|
|
display: inline-block;
|
|
content: '';
|
|
visibility: visible;
|
|
background-size: contain;
|
|
width: 1.2em;
|
|
height: 1.2em;
|
|
vertical-align: text-top;
|
|
}
|