Skip to content

Commit

Permalink
porting customizable css prefix to scss
Browse files Browse the repository at this point in the history
  • Loading branch information
davegandy committed Oct 20, 2013
1 parent b7ee6e5 commit b52bb9b
Show file tree
Hide file tree
Showing 14 changed files with 2,134 additions and 2,147 deletions.
2,559 changes: 1,272 additions & 1,287 deletions css/font-awesome.css

Large diffs are not rendered by default.

42 changes: 21 additions & 21 deletions scss/_core.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* FONT AWESOME CORE
* -------------------------- */

.fa-icon {
.#{$fa-css-prefix} {
display: inline-block;
font-family: FontAwesome;
font-style: normal;
Expand All @@ -12,17 +12,17 @@
}

/* makes the font 33% larger relative to the icon container */
.fa-icon-lg {
.#{$fa-css-prefix}-lg {
font-size: (4em / 3);
line-height: (3em / 4);
vertical-align: -15%;
}
/* increased font size for icon-lg */
.fa-icon-fixed-width {
.#{$fa-css-prefix}-fixed-width {
width: (16em / 14);
padding-right: (4em / 14);
text-align: right;
&.fa-icon-lg {
&.#{$fa-css-prefix}-lg {
width: (20em / 14);
}
}
Expand All @@ -31,37 +31,37 @@
// Icon UL & LI
// -------------------------

.fa-icon-ul {
.#{$fa-css-prefix}-ul {
padding-left: 0;
margin-left: $fa-icon-li-width;
list-style-type: none;

> li { position: relative; }
}
.fa-icon-li {
.#{$fa-css-prefix}-li {
position: absolute;
left: -$fa-icon-li-width;
width: $fa-icon-li-width;
top: (2em / 14);
text-align: center;
&.fa-icon-lg {
&.#{$fa-css-prefix}-lg {
left: -$fa-icon-li-width + (4em / 14);
}
}


// allows usage of the hide class directly on font awesome icons
.fa-icon.hide { display: none; }
.#{$fa-css-prefix}.hide { display: none; }

.fa-icon-muted { color: $fa-icon-muted; }
.fa-icon-light { color: $fa-icon-light; }
.fa-icon-dark { color: $fa-icon-dark; }
.#{$fa-css-prefix}-muted { color: $fa-icon-muted; }
.#{$fa-css-prefix}-light { color: $fa-icon-light; }
.#{$fa-css-prefix}-dark { color: $fa-icon-dark; }


// Icon Borders
// -------------------------

.fa-icon-border {
.#{$fa-css-prefix}-border {
padding: .2em .25em .15em;
border: solid 1px $fa-border-color;
border-radius: 3px;
Expand All @@ -71,30 +71,30 @@
// Icon Sizes
// -------------------------

.fa-icon-2x {
.#{$fa-css-prefix}-2x {
font-size: 2em;
&.fa-icon-border {
&.#{$fa-css-prefix}-border {
border-width: 2px;
border-radius: 4px;
}
}
.fa-icon-3x {
.#{$fa-css-prefix}-3x {
font-size: 3em;
&.fa-icon-border {
&.#{$fa-css-prefix}-border {
border-width: 3px;
border-radius: 5px;
}
}
.fa-icon-4x {
.#{$fa-css-prefix}-4x {
font-size: 4em;
&.fa-icon-border {
&.#{$fa-css-prefix}-border {
border-width: 4px;
border-radius: 6px;
}
}
.fa-icon-5x {
.#{$fa-css-prefix}-5x {
font-size: 5em;
&.fa-icon-border {
&.#{$fa-css-prefix}-border {
border-width: 5px;
border-radius: 7px;
}
Expand All @@ -108,7 +108,7 @@
.pull-right { float: right; }
.pull-left { float: left; }

.fa-icon {
.#{$fa-css-prefix} {
&.pull-left { margin-right: .3em; }
&.pull-right { margin-left: .3em; }
}
12 changes: 6 additions & 6 deletions scss/_extras.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@include fa-icon-stack();

/* Animated rotating icon */
.fa-icon-spin {
.#{$fa-css-prefix}-spin {
-webkit-animation: spin 2s infinite linear;
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
Expand Down Expand Up @@ -37,9 +37,9 @@
// Icon rotations & flipping
// -------------------------

.fa-icon-rotate-90 { @include fa-icon-rotate(90deg, 1); }
.fa-icon-rotate-180 { @include fa-icon-rotate(180deg, 2); }
.fa-icon-rotate-270 { @include fa-icon-rotate(270deg, 3); }
.#{$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); }

.fa-icon-flip-horizontal { @include fa-icon-flip(-1, 1); }
.fa-icon-flip-vertical { @include fa-icon-flip(1, -1); }
.#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1); }
.#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1); }
Loading

0 comments on commit b52bb9b

Please sign in to comment.