diff options
author | Allan Wang <me@allanwang.ca> | 2017-12-11 21:18:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-11 21:18:57 -0500 |
commit | b90dcc04376b48d2b91fea8a5de48acbd7f885c4 (patch) | |
tree | 6aded93178a507631215ac2309485c0fb3f6fe4c /app/src/main/assets/css/core/_base.scss | |
parent | db262e95779e0a17275bdb94be2b0ac12819178e (diff) | |
download | frost-b90dcc04376b48d2b91fea8a5de48acbd7f885c4.tar.gz frost-b90dcc04376b48d2b91fea8a5de48acbd7f885c4.tar.bz2 frost-b90dcc04376b48d2b91fea8a5de48acbd7f885c4.zip |
misc (#548)
* Separate scss files and fix some issues
* Delete blank css
* Update menu stylings
* Add branch details to auto release
* Update script and readme
* Test 2
* Test 3
Diffstat (limited to 'app/src/main/assets/css/core/_base.scss')
-rw-r--r-- | app/src/main/assets/css/core/_base.scss | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/app/src/main/assets/css/core/_base.scss b/app/src/main/assets/css/core/_base.scss index de625fa6..5f3ebcb2 100644 --- a/app/src/main/assets/css/core/_base.scss +++ b/app/src/main/assets/css/core/_base.scss @@ -34,6 +34,14 @@ } } +// Helper function to replace characters in a string +@function str-replace($string, $search, $replace: "") { + $index: str-index($string, $search); + + @return if($index, str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace), $string); +} + +// https://css-tricks.com/probably-dont-base64-svg/ // SVG optimization thanks to https://codepen.io/jakob-e/pen/doMoML // Function to create an optimized svg url // Version: 1.0.6 @@ -60,7 +68,7 @@ // // Encode // - $chunk: str-replace($chunk, '"', "'"); + //$chunk: str-replace($chunk, '"', """); $chunk: str-replace($chunk, "%", "%25"); $chunk: str-replace($chunk, "#", "%23"); $chunk: str-replace($chunk, "{", "%7B"); @@ -97,10 +105,3 @@ @mixin background-svg($svg, $extra: "no-repeat") { background: svg-url($svg) unquote($extra) !important; } - -// Helper function to replace characters in a string -@function str-replace($string, $search, $replace: "") { - $index: str-index($string, $search); - - @return if($index, str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace), $string); -} |