From fb5e56a4fe2f4b17c7f0ca214c4c09e696633896 Mon Sep 17 00:00:00 2001 From: John O'Nolan Date: Mon, 16 Sep 2013 09:41:23 +0100 Subject: [PATCH] Tweak icon mixin adjustments to reduce compiled filesize See #509 --- ghost/admin/assets/sass/modules/icons.scss | 33 +++++++++++----------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/ghost/admin/assets/sass/modules/icons.scss b/ghost/admin/assets/sass/modules/icons.scss index 865b9530cf..42c5e5f626 100644 --- a/ghost/admin/assets/sass/modules/icons.scss +++ b/ghost/admin/assets/sass/modules/icons.scss @@ -33,14 +33,9 @@ The Icon Element ============================================================================= */ -/* - * Epic dynamic icon element by Eric Eggert, this thing is so fucking cool it's - * actually unreal. - bit.ly/TJwPPo - */ - -@mixin icon-base() { - &:before, - &:after { +@mixin icon($char, $size: '', $color: '') { + &:before { + // Base font-family: "Icons"; font-weight: normal; font-style: normal; @@ -49,13 +44,8 @@ speak: none; line-height: 1; -webkit-font-smoothing: antialiased; - } -} - -@mixin icon($char, $size: '', $color: '') { - @include icon-base; - - &:before { + + //Function content: '#{$char}'; @if $size != '' { font-size: $size; @@ -77,9 +67,18 @@ */ @mixin icon-after($char, $size: '', $color: '') { - @include icon-base; - &:after { + // Base + font-family: "Icons"; + font-weight: normal; + font-style: normal; + vertical-align: -7%; + text-transform:none; + speak: none; + line-height: 1; + -webkit-font-smoothing: antialiased; + + // Function content: '#{$char}'; @if $size != '' { font-size: $size;