Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/icons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorRyan Berliner <22206986+RyanBerliner@users.noreply.github.com>2021-10-13 06:31:59 +0300
committerGitHub <noreply@github.com>2021-10-13 06:31:59 +0300
commit423c48058938528dafb239d642addf5d4f9ab3f2 (patch)
treebd30684987a8c8014ef07efe80a14446cbe601da /build
parentdbffaeaed3e3321d805291a0c1c66c0ab0b253f0 (diff)
compile to scss file for reference and customization (#978)
* compile to scss file for reference and customization * make variables default so they can be overriden * match styling, selectors, formatting of css template * Update scss.hbs * Update to use `{{prefix}}` in class names, add class for extending * Update build/font/scss.hbs Co-authored-by: Ryan Berliner <22206986+RyanBerliner@users.noreply.github.com> Co-authored-by: XhmikosR <xhmikosr@gmail.com> Co-authored-by: Mark Otto <markd.otto@gmail.com>
Diffstat (limited to 'build')
-rw-r--r--build/font/scss.hbs32
1 files changed, 32 insertions, 0 deletions
diff --git a/build/font/scss.hbs b/build/font/scss.hbs
new file mode 100644
index 000000000..3a5a70217
--- /dev/null
+++ b/build/font/scss.hbs
@@ -0,0 +1,32 @@
+${{ name }}-font: "{{ name }}" !default;
+${{ name }}-font-src: {{{ fontSrc }}} !default;
+
+@font-face {
+ font-family: ${{ name }}-font;
+ src: ${{ name }}-font-src;
+}
+
+.{{prefix}}::before,
+[class^="{{prefix}}-"]::before,
+[class*=" {{prefix}}-"]::before {
+ display: inline-block;
+ font-family: ${{ name }}-font !important;
+ font-style: normal;
+ font-weight: normal !important;
+ font-variant: normal;
+ text-transform: none;
+ line-height: 1;
+ vertical-align: -.125em;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+
+${{ name }}-map: (
+{{# each codepoints }}
+ "{{ @key }}": "\\{{ codepoint this }}",
+{{/ each }}
+);
+
+{{# each codepoints }}
+.{{ ../prefix }}-{{ @key }}::before { content: map-get(${{ ../name }}-map, "{{ @key }}"); }
+{{/ each }}