mirror of
https://github.com/kognise/water.css.git
synced 2025-08-17 18:37:04 +02:00
feat: single SVG for arrow, change color on import
This commit is contained in:
@@ -59,7 +59,7 @@ function style() {
|
|||||||
.src(paths.styles.src)
|
.src(paths.styles.src)
|
||||||
// Add sourcemaps
|
// Add sourcemaps
|
||||||
.pipe(sourcemaps.init())
|
.pipe(sourcemaps.init())
|
||||||
// Resolve imports and calculated colors
|
// Resolve imports, calculated colors and inlined SVG files
|
||||||
.pipe(postcss([postcssImport(), postcssColorModFunction(), postcssInlineSvg()]))
|
.pipe(postcss([postcssImport(), postcssColorModFunction(), postcssInlineSvg()]))
|
||||||
|
|
||||||
// * Process legacy builds *
|
// * Process legacy builds *
|
||||||
@@ -95,8 +95,8 @@ function style() {
|
|||||||
.pipe(filter('**/*.css'))
|
.pipe(filter('**/*.css'))
|
||||||
// Calculate size before minifying
|
// Calculate size before minifying
|
||||||
.pipe(bytediff.start())
|
.pipe(bytediff.start())
|
||||||
// Minify using cssnano
|
// Minify using cssnano, use extra-low precision while minifying inline SVGs
|
||||||
.pipe(postcss([cssnano()]))
|
.pipe(postcss([cssnano({ preset: ['default', { svgo: { floatPrecision: 0 } }] })]))
|
||||||
// Write the amount saved by minifying
|
// Write the amount saved by minifying
|
||||||
.pipe(bytediff.stop(data => formatByteMessage('cssnano', data)))
|
.pipe(bytediff.stop(data => formatByteMessage('cssnano', data)))
|
||||||
// Rename the files have the .min suffix
|
// Rename the files have the .min suffix
|
||||||
|
4
src/assets/select-arrow.svg
Executable file
4
src/assets/select-arrow.svg
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="62.5" width="116.9">
|
||||||
|
<path d="M115.3,1.6 C113.7,0 111.1,0 109.5,1.6 L58.5,52.7 L7.4,1.6 C5.8,0 3.2,0 1.6,1.6 C0,3.2 0,5.8 1.6,7.4 L55.5,61.3 C56.3,62.1 57.3,62.5 58.4,62.5 C59.4,62.5 60.5,62.1 61.3,61.3 L115.2,7.4 C116.9,5.8 116.9,3.2 115.3,1.6Z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 403 B |
@@ -44,7 +44,7 @@ textarea {
|
|||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
background: var(--background) var(--down-arrow-path) calc(100% - 12px) 50% / 12px no-repeat;
|
background: var(--background) var(--select-arrow) calc(100% - 12px) 50% / 12px no-repeat;
|
||||||
padding-right: 35px;
|
padding-right: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -22,5 +22,5 @@
|
|||||||
--form-placeholder: #a9a9a9;
|
--form-placeholder: #a9a9a9;
|
||||||
--form-text: #ffffff;
|
--form-text: #ffffff;
|
||||||
|
|
||||||
--down-arrow-path: svg-load("../arrow-light.svg");
|
--select-arrow: svg-load('./assets/select-arrow.svg', fill: #efefef);
|
||||||
}
|
}
|
||||||
|
@@ -22,5 +22,5 @@
|
|||||||
--form-placeholder: #949494;
|
--form-placeholder: #949494;
|
||||||
--form-text: #000000;
|
--form-text: #000000;
|
||||||
|
|
||||||
--down-arrow-path: svg-load("../arrow-dark.svg");
|
--select-arrow: svg-load('./assets/select-arrow.svg', fill: #161f27);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user