From ba67d21cba4138347ee08d5d89dc9d6e01c0218d Mon Sep 17 00:00:00 2001 From: "Macdonald, Zak" Date: Sun, 28 Jun 2015 20:31:27 -0700 Subject: [PATCH] Ported SCSS and Less changes to the ./src. --- src/assets/font-awesome/less/animated.less | 2 +- .../font-awesome/less/bordered-pulled.less | 2 +- src/assets/font-awesome/less/core.less | 2 +- src/assets/font-awesome/less/fixed-width.less | 3 +- .../font-awesome/less/font-awesome.less | 3 +- src/assets/font-awesome/less/icons.less | 14 +++++-- src/assets/font-awesome/less/list.less | 2 +- src/assets/font-awesome/less/mixins.less | 17 +++++--- src/assets/font-awesome/less/path.less | 11 +++-- .../font-awesome/less/rotated-flipped.less | 40 +++++++++++++----- src/assets/font-awesome/less/sizes.less | 39 +++++++++++++++++ src/assets/font-awesome/less/stacked.less | 2 +- src/assets/font-awesome/less/variables.less | 26 ++++++++++-- src/assets/font-awesome/scss/_animated.scss | 2 +- .../font-awesome/scss/_bordered-pulled.scss | 2 +- src/assets/font-awesome/scss/_core.scss | 2 +- .../font-awesome/scss/_fixed-width.scss | 3 +- src/assets/font-awesome/scss/_functions.scss | 29 +++++++++++++ src/assets/font-awesome/scss/_icons.scss | 10 +++-- src/assets/font-awesome/scss/_list.scss | 3 +- src/assets/font-awesome/scss/_mixins.scss | 17 +++++--- src/assets/font-awesome/scss/_path.scss | 11 +++-- .../font-awesome/scss/_rotated-flipped.scss | 42 ++++++++++++++----- src/assets/font-awesome/scss/_sizes.scss | 21 ++++++++++ src/assets/font-awesome/scss/_stacked.scss | 2 +- src/assets/font-awesome/scss/_variables.scss | 42 ++++++++++++++----- .../font-awesome/scss/font-awesome.scss | 4 +- 27 files changed, 278 insertions(+), 75 deletions(-) create mode 100644 src/assets/font-awesome/less/sizes.less create mode 100644 src/assets/font-awesome/scss/_functions.scss create mode 100644 src/assets/font-awesome/scss/_sizes.scss diff --git a/src/assets/font-awesome/less/animated.less b/src/assets/font-awesome/less/animated.less index e489ea318..9ffc61743 100644 --- a/src/assets/font-awesome/less/animated.less +++ b/src/assets/font-awesome/less/animated.less @@ -1,7 +1,7 @@ --- --- -// Animated Icons +// animated icons // -------------------------- .@{fa-css-prefix}-spin { diff --git a/src/assets/font-awesome/less/bordered-pulled.less b/src/assets/font-awesome/less/bordered-pulled.less index 7b5bf77a9..e4c537861 100644 --- a/src/assets/font-awesome/less/bordered-pulled.less +++ b/src/assets/font-awesome/less/bordered-pulled.less @@ -1,7 +1,7 @@ --- --- -// Bordered & Pulled +// bordered and pulled // ------------------------- .@{fa-css-prefix}-border { diff --git a/src/assets/font-awesome/less/core.less b/src/assets/font-awesome/less/core.less index d299d0d03..b30497756 100644 --- a/src/assets/font-awesome/less/core.less +++ b/src/assets/font-awesome/less/core.less @@ -1,7 +1,7 @@ --- --- -// Base Class Definition +// base class definition // ------------------------- .@{fa-css-prefix} { diff --git a/src/assets/font-awesome/less/fixed-width.less b/src/assets/font-awesome/less/fixed-width.less index f3b657b52..4213ae485 100644 --- a/src/assets/font-awesome/less/fixed-width.less +++ b/src/assets/font-awesome/less/fixed-width.less @@ -1,8 +1,9 @@ --- --- -// Fixed Width Icons +// fixed width icons // ------------------------- + .@{fa-css-prefix}-fw { width: (18em / 14); text-align: center; diff --git a/src/assets/font-awesome/less/font-awesome.less b/src/assets/font-awesome/less/font-awesome.less index abf74e140..4310cf576 100644 --- a/src/assets/font-awesome/less/font-awesome.less +++ b/src/assets/font-awesome/less/font-awesome.less @@ -1,12 +1,13 @@ --- --- + {% include code/license.css %} @import "variables.less"; @import "mixins.less"; @import "path.less"; @import "core.less"; -@import "larger.less"; +@import "sizes.less"; @import "fixed-width.less"; @import "list.less"; @import "bordered-pulled.less"; diff --git a/src/assets/font-awesome/less/icons.less b/src/assets/font-awesome/less/icons.less index 1d29b69a6..44959dc0f 100644 --- a/src/assets/font-awesome/less/icons.less +++ b/src/assets/font-awesome/less/icons.less @@ -1,7 +1,15 @@ --- --- + /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ -{% for icon in icons %}{% for alias in icon.aliases %} -.@{fa-css-prefix}-{{ alias }}:before,{% endfor %} -.@{fa-css-prefix}-{{ icon.id }}:before { content: @fa-var-{{ icon.id }}; }{% endfor %} + +.createIconClasses(@iterator: 1) when(@iterator <= length(@fa-var-glyphs)) { + @fa-glyph-name: extract(extract(@fa-var-glyphs, @iterator), 1); + @fa-glyph-name-unquoted: ~"@{fa-glyph-name}"; + .@{fa-css-prefix}-@{fa-glyph-name-unquoted}:before { + content: extract(extract(@fa-var-glyphs, @iterator), 2); + } + .createIconClasses((@iterator + 1)); +} +.createIconClasses(); diff --git a/src/assets/font-awesome/less/list.less b/src/assets/font-awesome/less/list.less index e32bc0d2e..122b5ca8b 100644 --- a/src/assets/font-awesome/less/list.less +++ b/src/assets/font-awesome/less/list.less @@ -1,7 +1,7 @@ --- --- -// List Icons +// list icons // ------------------------- .@{fa-css-prefix}-ul { diff --git a/src/assets/font-awesome/less/mixins.less b/src/assets/font-awesome/less/mixins.less index 064f6bc0b..7b58d790d 100644 --- a/src/assets/font-awesome/less/mixins.less +++ b/src/assets/font-awesome/less/mixins.less @@ -1,17 +1,22 @@ --- --- -// Mixins + +// mixins // -------------------------- .fa-icon() { {% include code/core.less %} } -.fa-icon-rotate(@degrees, @rotation) { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); - -webkit-transform: rotate(@degrees); - -ms-transform: rotate(@degrees); - transform: rotate(@degrees); +.fa-icon-rotate(@degrees) { + // check if this ie fix is necessary + & when (mod(@degrees, 90) = 0) { + @rotation: @degrees / 90; + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); + } + -webkit-transform: rotate(~"@{degrees}deg"); + -ms-transform: rotate(~"@{degrees}deg"); + transform: rotate(~"@{degrees}deg"); } .fa-icon-flip(@horiz, @vert, @rotation) { diff --git a/src/assets/font-awesome/less/path.less b/src/assets/font-awesome/less/path.less index 9211e6659..afe6589ea 100644 --- a/src/assets/font-awesome/less/path.less +++ b/src/assets/font-awesome/less/path.less @@ -1,8 +1,13 @@ -/* FONT PATH - * -------------------------- */ +--- +--- + +// font path +// -------------------------- @font-face { font-family: 'FontAwesome'; + font-style: normal; + font-weight: normal; src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), @@ -10,6 +15,4 @@ url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts - font-weight: normal; - font-style: normal; } diff --git a/src/assets/font-awesome/less/rotated-flipped.less b/src/assets/font-awesome/less/rotated-flipped.less index bf7a0b423..d7440b0af 100644 --- a/src/assets/font-awesome/less/rotated-flipped.less +++ b/src/assets/font-awesome/less/rotated-flipped.less @@ -1,23 +1,41 @@ --- --- -// Rotated & Flipped Icons +// rotated and flipped icons // ------------------------- -.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } -.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } -.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } +@rotations-requiring-ie-fix: + "flip-horizontal", + "flip-vertical"; +@rotation-selector: ''; +// calculate classes and values for rotation +.calculateRotations(@i) when (@i >= 0) { + @rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}"; + .@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) { + .fa-icon-rotate(@i); + } + .calculateRotations((@i - 1)); +} +.calculateRotations(359); + +// flip icons horizontal/vertical .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } -// Hook for IE8-9 +// ie 8-9 fix // ------------------------- +// todo: check on assigning an array of selectors to the selector instead of using +// this loop -:root .@{fa-css-prefix}-rotate-90, -:root .@{fa-css-prefix}-rotate-180, -:root .@{fa-css-prefix}-rotate-270, -:root .@{fa-css-prefix}-flip-horizontal, -:root .@{fa-css-prefix}-flip-vertical { - filter: none; +:root { + .calculateIEFixes(@i) when (@i >= 0) { + @rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}"; + .@{rotation-selector} when (mod(@i, 90) = 0) { + filter: none; + } + // iterate + .calculateIEFixes((@i - 1)); + } + .calculateIEFixes(359); } diff --git a/src/assets/font-awesome/less/sizes.less b/src/assets/font-awesome/less/sizes.less new file mode 100644 index 000000000..9fd0736d0 --- /dev/null +++ b/src/assets/font-awesome/less/sizes.less @@ -0,0 +1,39 @@ +--- +--- + +// icon sizes +// -------------------------- + +// scale icon size by n +.createIconScales(@iterator: 1) when(@iterator <= length(@fa-var-scales)) { + + @fa-icon-scale-name: extract(extract(@fa-var-scales, @iterator), 1); + @fa-icon-scale-name-unquoted: ~"@{fa-icon-scale-name}"; + @fa-icon-scale: extract(extract(@fa-var-scales, @iterator), 2); + + .@{fa-css-prefix}-@{fa-icon-scale-name-unquoted} { + + font-size: floor(@fa-font-size-base * @fa-icon-scale); + line-height: floor(@fa-font-size-base * @fa-icon-scale * 0.75); + vertical-align: -15%; + } + + .createIconScales((@iterator + 1)); +} +.createIconScales(); + +// multiply icon size by n +.createIconMultipliers(@iterator: 1) when(@iterator <= length(@fa-var-multipliers)) { + + @fa-icon-multiplier-name: extract(extract(@fa-var-multipliers, @iterator), 1); + @fa-icon-multiplier-name-unquoted: ~"@{fa-icon-multiplier-name}"; + @fa-icon-multiplier: extract(extract(@fa-var-multipliers, @iterator), 2); + + .@{fa-css-prefix}-@{fa-icon-multiplier-name-unquoted} { + + font-size: floor(@fa-font-size-base * @fa-icon-multiplier); + } + + .createIconMultipliers((@iterator + 1)); +} +.createIconMultipliers(); diff --git a/src/assets/font-awesome/less/stacked.less b/src/assets/font-awesome/less/stacked.less index 2a1e4189b..a34a2ff68 100644 --- a/src/assets/font-awesome/less/stacked.less +++ b/src/assets/font-awesome/less/stacked.less @@ -1,7 +1,7 @@ --- --- -// Stacked Icons +// stacked icons // ------------------------- .@{fa-css-prefix}-stack { diff --git a/src/assets/font-awesome/less/variables.less b/src/assets/font-awesome/less/variables.less index a5cf5de25..2e367ffff 100644 --- a/src/assets/font-awesome/less/variables.less +++ b/src/assets/font-awesome/less/variables.less @@ -1,6 +1,7 @@ --- --- -// Variables + +// variables // -------------------------- @fa-font-path: "../fonts"; @@ -11,6 +12,25 @@ @fa-border-color: #eee; @fa-inverse: #fff; @fa-li-width: (30em / 14); +@fa-rotation-increment: 45; -{% assign sorted_icons = icons | expand_aliases | sort_by:'class' %}{% for icon in sorted_icons %}@fa-var-{{ icon.class }}: "\{{ icon.unicode }}"; -{% endfor %} +{% capture glyph_count %}{{ sorted_icons | size }}{% endcapture %} + +@fa-var-glyphs: + {% assign sorted_icons = icons | expand_aliases | sort_by:'class' %}{% for icon in sorted_icons %}{{ icon.class }} "\{{ icon.unicode }}"{% if forloop.index != glyph_count %},{% endif %} + {% endfor %}; + +// icon sizes - these scale font size and line height +@fa-var-scales: + "default" 1.000, + "lg" 1.333, + "sm" 0.666, + "xlg" 1.666, + "xsm" 0.333; + +// icon size multipliers - these scale font size +@fa-var-multipliers: + "2x" 2, + "3x" 3, + "4x" 4, + "5x" 5; \ No newline at end of file diff --git a/src/assets/font-awesome/scss/_animated.scss b/src/assets/font-awesome/scss/_animated.scss index fed5a987f..d0587c725 100644 --- a/src/assets/font-awesome/scss/_animated.scss +++ b/src/assets/font-awesome/scss/_animated.scss @@ -1,7 +1,7 @@ --- --- -// Spinning Icons +// spinning icons // -------------------------- .#{$fa-css-prefix}-spin { diff --git a/src/assets/font-awesome/scss/_bordered-pulled.scss b/src/assets/font-awesome/scss/_bordered-pulled.scss index 39e3a1b83..631f9d050 100644 --- a/src/assets/font-awesome/scss/_bordered-pulled.scss +++ b/src/assets/font-awesome/scss/_bordered-pulled.scss @@ -1,7 +1,7 @@ --- --- -// Bordered & Pulled +// bordered and pulled // ------------------------- .#{$fa-css-prefix}-border { diff --git a/src/assets/font-awesome/scss/_core.scss b/src/assets/font-awesome/scss/_core.scss index 45e548bac..e4c3505d1 100644 --- a/src/assets/font-awesome/scss/_core.scss +++ b/src/assets/font-awesome/scss/_core.scss @@ -1,7 +1,7 @@ --- --- -// Base Class Definition +// base class definition // ------------------------- .#{$fa-css-prefix} { diff --git a/src/assets/font-awesome/scss/_fixed-width.scss b/src/assets/font-awesome/scss/_fixed-width.scss index cfb14543a..4bd230edb 100644 --- a/src/assets/font-awesome/scss/_fixed-width.scss +++ b/src/assets/font-awesome/scss/_fixed-width.scss @@ -1,8 +1,9 @@ --- --- -// Fixed Width Icons +// fixed width icons // ------------------------- + .#{$fa-css-prefix}-fw { width: (18em / 14); text-align: center; diff --git a/src/assets/font-awesome/scss/_functions.scss b/src/assets/font-awesome/scss/_functions.scss new file mode 100644 index 000000000..48fa7599a --- /dev/null +++ b/src/assets/font-awesome/scss/_functions.scss @@ -0,0 +1,29 @@ +--- +--- + +// functions +// -------------------------- + +// extract the number from a unit +@function unitless($number) { + @return $number / ($number * 0 + 1); +} + +// fudge a number to an accuracy of 0-6 decimal places +@function fudge($number, $places: 0) { + $fraction: 10; + $number: unitless($number); + $return: null; + + @if $places == 0 { + @return round($number); + } @else { + @if $places > 6 { + $places: 6; + } + @for $i from 1 through $places { + $fraction: $fraction * 10; + } + @return round($number * $fraction) / $fraction; + } +} diff --git a/src/assets/font-awesome/scss/_icons.scss b/src/assets/font-awesome/scss/_icons.scss index 23128aaee..9b58aee6f 100644 --- a/src/assets/font-awesome/scss/_icons.scss +++ b/src/assets/font-awesome/scss/_icons.scss @@ -1,7 +1,11 @@ --- --- + /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ -{% for icon in icons %}{% for alias in icon.aliases %} -.#{$fa-css-prefix}-{{ alias }}:before,{% endfor %} -.#{$fa-css-prefix}-{{ icon.id }}:before { content: $fa-var-{{ icon.id }}; }{% endfor %} + +@each $fa-glyph-name, $fa-glyph-content in $fa-var-glyphs { + .#{$fa-css-prefix}-#{$fa-glyph-name}:before { + content: $fa-glyph-content; + } +} diff --git a/src/assets/font-awesome/scss/_list.scss b/src/assets/font-awesome/scss/_list.scss index 1c6498268..21f938ae4 100644 --- a/src/assets/font-awesome/scss/_list.scss +++ b/src/assets/font-awesome/scss/_list.scss @@ -1,7 +1,7 @@ --- --- -// List Icons +// list icons // ------------------------- .#{$fa-css-prefix}-ul { @@ -10,6 +10,7 @@ list-style-type: none; > li { position: relative; } } + .#{$fa-css-prefix}-li { position: absolute; left: -$fa-li-width; diff --git a/src/assets/font-awesome/scss/_mixins.scss b/src/assets/font-awesome/scss/_mixins.scss index 500659b7b..68e40eec9 100644 --- a/src/assets/font-awesome/scss/_mixins.scss +++ b/src/assets/font-awesome/scss/_mixins.scss @@ -1,17 +1,22 @@ --- --- -// Mixins + +// mixins // -------------------------- @mixin fa-icon() { {% include code/core.scss %} } -@mixin fa-icon-rotate($degrees, $rotation) { - filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); - -webkit-transform: rotate($degrees); - -ms-transform: rotate($degrees); - transform: rotate($degrees); +@mixin fa-icon-rotate($degrees) { + // check if this ie fix is necessary + @if $degrees % 90 == 0 { + $rotation: $degrees / 90; + filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); + } + -webkit-transform: rotate(#{$degrees}deg); + -ms-transform: rotate(#{$degrees}deg); + transform: rotate(#{$degrees}deg); } @mixin fa-icon-flip($horiz, $vert, $rotation) { diff --git a/src/assets/font-awesome/scss/_path.scss b/src/assets/font-awesome/scss/_path.scss index bb457c23a..d842375f8 100644 --- a/src/assets/font-awesome/scss/_path.scss +++ b/src/assets/font-awesome/scss/_path.scss @@ -1,8 +1,13 @@ -/* FONT PATH - * -------------------------- */ +--- +--- + +// font path +// -------------------------- @font-face { font-family: 'FontAwesome'; + font-style: normal; + font-weight: normal; src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), @@ -10,6 +15,4 @@ url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts - font-weight: normal; - font-style: normal; } diff --git a/src/assets/font-awesome/scss/_rotated-flipped.scss b/src/assets/font-awesome/scss/_rotated-flipped.scss index 6e95eb46a..26c535ba5 100644 --- a/src/assets/font-awesome/scss/_rotated-flipped.scss +++ b/src/assets/font-awesome/scss/_rotated-flipped.scss @@ -1,23 +1,43 @@ --- --- -// Rotated & Flipped Icons +// rotated and flipped icons // ------------------------- -.#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } -.#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } -.#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } +$rotations-requiring-ie-fix: ( + "flip-horizontal", + "flip-vertical" +); +$rotation-selector: ''; +// calculate classes and values for rotation +@for $i from 0 through 359 { + @if $i == 0 or $i % $fa-rotation-increment == 0 { + $rotation-selector: #{$fa-css-prefix}-rotate-#{$i}; + + .#{$rotation-selector} { + @include fa-icon-rotate($i); + } + // check if this item needs some ie love + @if $i == 0 or $i % 90 == 0 { + $rotations-requiring-ie-fix: append($rotations-requiring-ie-fix, #{$rotation-selector}); + } + } +} + +// flip icons horizontal/vertical .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } -// Hook for IE8-9 +// ie 8-9 fix // ------------------------- +// todo: check on assigning an array of selectors to the selector instead of using +// this loop -:root .#{$fa-css-prefix}-rotate-90, -:root .#{$fa-css-prefix}-rotate-180, -:root .#{$fa-css-prefix}-rotate-270, -:root .#{$fa-css-prefix}-flip-horizontal, -:root .#{$fa-css-prefix}-flip-vertical { - filter: none; +:root { + @each $fix in $rotations-requiring-ie-fix { + .#{$fix} { + filter: none; + } + } } diff --git a/src/assets/font-awesome/scss/_sizes.scss b/src/assets/font-awesome/scss/_sizes.scss new file mode 100644 index 000000000..9a9f5faf4 --- /dev/null +++ b/src/assets/font-awesome/scss/_sizes.scss @@ -0,0 +1,21 @@ +--- +--- + +// icon sizes +// ------------------------- + +// scale icon size by n +@each $fa-icon-scale-name, $fa-icon-scale in $fa-var-scales { + .#{$fa-css-prefix}-#{$fa-icon-scale-name} { + font-size: #{fudge(unitless($fa-font-size-base) * $fa-icon-scale)}px; + line-height: #{fudge(unitless($fa-font-size-base) * $fa-icon-scale * 0.75)}px; + vertical-align: -15%; + } +} + +// multiply icon size by n +@each $fa-icon-multiplier-name, $fa-icon-multiplier in $fa-var-multipliers { + .#{$fa-css-prefix}-#{$fa-icon-multiplier-name} { + font-size: #{fudge($fa-font-size-base * $fa-icon-multiplier)}px; + } +} diff --git a/src/assets/font-awesome/scss/_stacked.scss b/src/assets/font-awesome/scss/_stacked.scss index 01c9443be..bde3aef34 100644 --- a/src/assets/font-awesome/scss/_stacked.scss +++ b/src/assets/font-awesome/scss/_stacked.scss @@ -1,7 +1,7 @@ --- --- -// Stacked Icons +// stacked icons // ------------------------- .#{$fa-css-prefix}-stack { diff --git a/src/assets/font-awesome/scss/_variables.scss b/src/assets/font-awesome/scss/_variables.scss index 0d483d116..3473a6ced 100644 --- a/src/assets/font-awesome/scss/_variables.scss +++ b/src/assets/font-awesome/scss/_variables.scss @@ -1,16 +1,38 @@ --- --- -// Variables + +// variables // -------------------------- -$fa-font-path: "../fonts" !default; -$fa-font-size-base: 14px !default; +$fa-font-path: "../fonts" !default; +$fa-font-size-base: 14px !default; //$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/{{site.fontawesome.version}}/fonts" !default; // for referencing Bootstrap CDN font files directly -$fa-css-prefix: {{ site.fontawesome.css_prefix }} !default; -$fa-version: "{{ site.fontawesome.version }}" !default; -$fa-border-color: #eee !default; -$fa-inverse: #fff !default; -$fa-li-width: (30em / 14) !default; +$fa-css-prefix: {{ site.fontawesome.css_prefix }} !default; +$fa-version: "{{ site.fontawesome.version }}" !default; +$fa-border-color: #eee !default; +$fa-inverse: #fff !default; +$fa-li-width: (30em / 14) !default; +$fa-rotation-increment: 45 !default; -{% assign sorted_icons = icons | expand_aliases | sort_by:'class' %}{% for icon in sorted_icons %}$fa-var-{{ icon.class }}: "\{{ icon.unicode }}"; -{% endfor %} +{% capture glyph_count %}{{ sorted_icons | size }}{% endcapture %} + +$fa-var-glyphs: ( + {% assign sorted_icons = icons | expand_aliases | sort_by:'class' %}{% for icon in sorted_icons %}"{{ icon.class }}": "\{{ icon.unicode }}"{% if forloop.index != glyph_count %},{% endif %} + {% endfor %} +); +// icon sizes - these scale font size and line height +$fa-var-scales: ( + "default": 1.000, + "lg": 1.333, + "sm": 0.666, + "xlg": 1.666, + "xsm": 0.333 +) !default; + +// icon size multipliers - these scale font size +$fa-var-multipliers: ( + "2x": 2, + "3x": 3, + "4x": 4, + "5x": 5 +) !default; diff --git a/src/assets/font-awesome/scss/font-awesome.scss b/src/assets/font-awesome/scss/font-awesome.scss index 131d2c6cd..d70a96cc5 100644 --- a/src/assets/font-awesome/scss/font-awesome.scss +++ b/src/assets/font-awesome/scss/font-awesome.scss @@ -1,12 +1,14 @@ --- --- + {% include code/license.css %} @import "variables"; +@import "functions"; @import "mixins"; @import "path"; @import "core"; -@import "larger"; +@import "sizes"; @import "fixed-width"; @import "list"; @import "bordered-pulled";