feat(static): colorize weather icons
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
$weather-icons-path: "../icons" !default;
|
||||
$weather-icons-stroke-color: #555555 !default;
|
||||
$weather-icons-colors: (
|
||||
"sun": #ffdf22,
|
||||
"cloud": #00c5c5,
|
||||
"rain": #0d6efd,
|
||||
"moon": #4A4B43,
|
||||
"lightning": red,
|
||||
"snow": white,
|
||||
) !default;
|
||||
$weather-icons-included: (
|
||||
"wi-cloud",
|
||||
"wi-cloudy",
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
@use "variables";
|
||||
|
||||
weather-icon {
|
||||
display: flex;
|
||||
width: 3rem;
|
||||
|
||||
> svg {
|
||||
path {
|
||||
fill: gray;
|
||||
stroke: variables.$weather-icons-stroke-color;
|
||||
stroke-width: 0.5;
|
||||
//paint-order: stroke;
|
||||
}
|
||||
@each $type, $color in variables.$weather-icons-colors {
|
||||
path[id="#{$type}"] {
|
||||
fill: $color;
|
||||
}
|
||||
g[id="#{$type}"] > path {
|
||||
fill: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,3 +2,4 @@
|
||||
@use "weather-icons-base";
|
||||
@use "weather-icons-list";
|
||||
@use "weather-wind-aliases";
|
||||
@use "weather-icons-colors";
|
||||
|
||||
Reference in New Issue
Block a user