compass-recipes 0.3.0.alpha.1 → 0.3.0.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/README.md +39 -26
  2. data/VERSION +1 -1
  3. data/lib/compass-recipes/sass_extensions.rb +1 -1
  4. data/stylesheets/_recipes.scss +6 -3
  5. data/stylesheets/recipes/_color.scss +17 -21
  6. data/stylesheets/recipes/_effect.scss +9 -6
  7. data/stylesheets/recipes/_font.scss +16 -7
  8. data/stylesheets/recipes/_google-webfont.scss +4 -0
  9. data/stylesheets/recipes/_icon-font.scss +56 -74
  10. data/stylesheets/recipes/_icons.scss +6 -0
  11. data/stylesheets/recipes/_media-queries.scss +8 -14
  12. data/stylesheets/recipes/_shape.scss +9 -8
  13. data/stylesheets/recipes/_shared.scss +4 -5
  14. data/stylesheets/recipes/background/_blueprint-grid.scss +8 -8
  15. data/stylesheets/recipes/background/_carbon-fiber.scss +8 -9
  16. data/stylesheets/recipes/background/_checkerboard.scss +9 -9
  17. data/stylesheets/recipes/background/_cicada.scss +8 -8
  18. data/stylesheets/recipes/background/_gradients.scss +28 -30
  19. data/stylesheets/recipes/background/_houndstooth.scss +8 -9
  20. data/stylesheets/recipes/background/_lined-paper.scss +8 -8
  21. data/stylesheets/recipes/background/_madras.scss +13 -13
  22. data/stylesheets/recipes/background/_noise.scss +23 -23
  23. data/stylesheets/recipes/background/_polka-dot.scss +8 -9
  24. data/stylesheets/recipes/background/_radial-overlay.scss +5 -5
  25. data/stylesheets/recipes/background/_rainbow.scss +4 -3
  26. data/stylesheets/recipes/background/_stripes.scss +14 -14
  27. data/stylesheets/recipes/background/_tablecloth.scss +8 -9
  28. data/stylesheets/recipes/background/_tartan.scss +13 -12
  29. data/stylesheets/recipes/base/_normalize.scss +475 -343
  30. data/stylesheets/recipes/color/_name.scss +2 -2
  31. data/stylesheets/recipes/effect/_bevel.scss +4 -0
  32. data/stylesheets/recipes/effect/_corner-folded.scss +11 -11
  33. data/stylesheets/recipes/effect/_corners-tucked.scss +7 -8
  34. data/stylesheets/recipes/effect/_cutout.scss +4 -0
  35. data/stylesheets/recipes/effect/_folded-corner.scss +10 -10
  36. data/stylesheets/recipes/effect/_glass.scss +20 -17
  37. data/stylesheets/recipes/effect/_ribbon.scss +12 -3
  38. data/stylesheets/recipes/effect/_scatter.scss +5 -6
  39. data/stylesheets/recipes/effect/_tape.scss +8 -9
  40. data/stylesheets/recipes/form/element/_inline.scss +8 -7
  41. data/stylesheets/recipes/helper/_gravatar.scss +3 -3
  42. data/stylesheets/recipes/layout/_flexible-box-model.scss +17 -18
  43. data/stylesheets/recipes/layout/_vertical-align.scss +24 -26
  44. data/stylesheets/recipes/shadow/_drop.scss +8 -8
  45. data/stylesheets/recipes/shadow/_top-edge.scss +13 -14
  46. data/stylesheets/recipes/shadow/drop/_curled-corners.scss +7 -6
  47. data/stylesheets/recipes/shadow/drop/_curved.scss +7 -6
  48. data/stylesheets/recipes/shadow/drop/_flying.scss +7 -6
  49. data/stylesheets/recipes/shadow/drop/_lifted-corners.scss +32 -14
  50. data/stylesheets/recipes/shadow/drop/_perspective.scss +7 -6
  51. data/stylesheets/recipes/shadow/drop/_raised.scss +7 -6
  52. data/stylesheets/recipes/shadow/drop/_transform-requirement.scss +9 -8
  53. data/stylesheets/recipes/shape/_ellipse.scss +6 -5
  54. data/stylesheets/recipes/shape/_polygon.scss +6 -5
  55. data/stylesheets/recipes/shape/_symbol.scss +6 -5
  56. data/stylesheets/recipes/shape/polygon/_hexagon.scss +6 -5
  57. data/stylesheets/recipes/shape/polygon/_octagon.scss +5 -5
  58. data/stylesheets/recipes/shape/polygon/_parallelogram.scss +5 -5
  59. data/stylesheets/recipes/shape/polygon/_pentagon.scss +6 -5
  60. data/stylesheets/recipes/shape/polygon/_rectangle.scss +6 -5
  61. data/stylesheets/recipes/shape/polygon/_rhombus.scss +6 -5
  62. data/stylesheets/recipes/shape/polygon/_square.scss +6 -5
  63. data/stylesheets/recipes/shape/polygon/_star.scss +6 -6
  64. data/stylesheets/recipes/shape/polygon/_trapezoid.scss +6 -5
  65. data/stylesheets/recipes/shape/polygon/_triangle.scss +6 -5
  66. data/stylesheets/recipes/shape/symbol/_diamond.scss +9 -8
  67. data/stylesheets/recipes/shape/symbol/_egg.scss +6 -5
  68. data/stylesheets/recipes/shape/symbol/_heart.scss +7 -6
  69. data/stylesheets/recipes/shape/symbol/_infinity.scss +7 -6
  70. data/stylesheets/recipes/shape/symbol/_pacman.scss +6 -5
  71. data/stylesheets/recipes/shape/symbol/_yin-yang.scss +7 -6
  72. data/stylesheets/recipes/shared/_clearfix.scss +9 -12
  73. data/stylesheets/recipes/shared/_pseudo-element.scss +9 -6
  74. data/stylesheets/recipes/ui/_convex.scss +8 -7
  75. data/stylesheets/recipes/ui/_glossy.scss +10 -10
  76. data/stylesheets/recipes/ui/_gradient.scss +8 -7
  77. data/stylesheets/recipes/ui/_keyboard.scss +11 -12
  78. data/stylesheets/recipes/ui/_overlay.scss +5 -7
  79. data/stylesheets/recipes/ui/_separator.scss +8 -8
  80. data/stylesheets/recipes/ui/helper/_arrow.scss +6 -0
  81. data/stylesheets/recipes/ui/loader/_pulse.scss +5 -5
  82. data/stylesheets/recipes/ui/menu/_dropdown.scss +5 -5
  83. metadata +12 -24
  84. data/lib/compass-recipes/sass_extensions/highres.rb +0 -31
  85. data/stylesheets/recipes/animation/_fade.scss +0 -29
  86. data/stylesheets/recipes/effect/_ribbon-tied.scss +0 -133
  87. data/stylesheets/recipes/shared/_user-select.scss +0 -6
  88. data/stylesheets/recipes/ui/_button.scss +0 -122
  89. data/stylesheets/recipes/ui/button/_state-selectors.scss +0 -40
  90. data/stylesheets/recipes/ui/button/style/_default.scss +0 -12
  91. data/stylesheets/recipes/ui/button/style/todo/_bonbon.scss +0 -489
  92. data/stylesheets/recipes/ui/button/style/todo/_bourbon.scss +0 -169
  93. data/stylesheets/recipes/ui/button/style/todo/_fancy.sass +0 -178
  94. data/stylesheets/recipes/ui/button/style/todo/_necolas-animated.scss +0 -81
  95. data/stylesheets/recipes/ui/button/style/todo/_ubuwaits.scss +0 -654
  96. data/stylesheets/recipes/ui/helper/_tag.scss +0 -14
data/README.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  A series of Compass and Sass mixins and functions for creating delicious CSS effects.
4
4
 
5
+ _Compass Recipes is currently under active development. While it's being already used on multiple projects (even in production), you may encounter some issues. Please try it out in a project, and [make suggestions](https://github.com/MoOx/compass-recipes/issues/new) or [report bugs](https://github.com/MoOx/compass-recipes/issues) ! Your feedback matters._
6
+
5
7
  ## [Demos](http://moox.github.com/compass-recipes/)
6
8
 
7
- Note: These are demos of the repository at its current state, *not* the last stable gem. To get the most up-to-date recipes, please see Installation for instructions on installing the repo at his current state*
9
+ _Note: These are demos of the repository at its current state, *not* the last stable gem. To get the most up-to-date recipes, please see Installation for instructions on installing the repo at his current state_
8
10
 
9
11
  ## Types of Recipes
10
12
 
@@ -12,7 +14,7 @@ Note: These are demos of the repository at its current state, *not* the last sta
12
14
  * **Color** Variables Names & Advanced color functions like `brightness()`
13
15
  * **[Effects](http://moox.github.com/compass-recipes/recipes/effect/)** - Visual effects like `bevel` and `cutout`
14
16
  * **[Form skins](http://moox.github.com/compass-recipes/recipes/form/skin/)** - Only one at the moment.
15
- * **[Icons](http://moox.github.com/compass-recipes/recipes/icon)** - Includes webfont icon support and a few open source fonts.
17
+ * **[Icon Fonts](http://moox.github.com/compass-recipes/recipes/icon-fonts)** - Includes icon fonts helper and a few open source fonts.
16
18
  * **[Layout](http://moox.github.com/compass-recipes/recipes/layout)** - Vertical centering and box layout shortcuts.
17
19
  * **[Media queries](http://moox.github.com/compass-recipes/recipes/media-queries)** - Predefined queries for common device widths. *Experimental: Uses `sass --pre`*
18
20
  * **[Shadows](http://moox.github.com/compass-recipes/recipes/shadow/)** - A wide collection of shadows which use pseudo elements to create fold effects, etc.
@@ -34,17 +36,17 @@ Note: These are demos of the repository at its current state, *not* the last sta
34
36
  More informations on the [Wiki](https://github.com/MoOx/compass-recipes/wiki)*
35
37
 
36
38
 
37
- # Usage
39
+ ## Usage
38
40
 
39
41
  When compass-recipes installed, you just need to require the compass plugin in your project
40
42
 
41
- ```css
43
+ ```ruby
42
44
  require 'compass-recipes'
43
45
  ```
44
46
 
45
47
  Then you can include some recipes like this
46
48
 
47
- ```css
49
+ ```scss
48
50
  @import "recipes/shape/triangle";
49
51
  .my-triangle
50
52
  {
@@ -54,7 +56,7 @@ Then you can include some recipes like this
54
56
 
55
57
  Like Compass does, you can include all recipes in a folder like this
56
58
 
57
- ```css
59
+ ```scss
58
60
  @import "recipes/shape";
59
61
 
60
62
  .my-triangle
@@ -68,31 +70,27 @@ Like Compass does, you can include all recipes in a folder like this
68
70
  }
69
71
  ```
70
72
 
71
- ## Authors/Maintainers
73
+ ## Support/Community
72
74
 
73
- Compass Recipes is maintained by [Maxime Thirouin](http://moox.fr), a french front-end web developer, and [David Kaneda](http://www.davidkaneda.com), creative director at [Sencha](http://www.sencha.com).
75
+ Compass Recipes has for now a little community because this projet is (for now) only at the beginning.
74
76
 
75
- ### Recurrent Contributors
77
+ [@Compass_Recipes](https://twitter.com/#!/Compass_Recipes) on _Twitter_ is a great place to ask very short questions that you want answered quickly.
76
78
 
77
- * [@canarymason](https://github.com/canarymason)
79
+ There is also an IRC channel, **#compass-recipes** on _irc.freenode.net_.
78
80
 
79
- ### Sous Chefs
80
-
81
- While Maxime and David are the primary project maintainers, most of the core ideas and techniques in the recipes are not from them.
82
-
83
- Credits & Thanks:
84
-
85
- * [@chriscoyier](https://github.com/chriscoyier) (shapes & lots of tricks)
86
- * [@leaverou](https://github.com/leaverou) (backgrounds patterns)
87
- * [@necolas](https://github.com/necolas) (normalize & tricks)
88
- * [@simurai](https://github.com/simurai) (awesomes design stuffs)
89
- * All of the people who contribute to the recipes (all names are in each recipes)
81
+ Feel free to ping @MoOx if he’s there to get his attention quickly. If there’s no one on **#compass-recipes**, you can try the **#compass** or maybe the **#sass** channel on IRC.
90
82
 
83
+ If you have a longer question (or no one’s around on IRC at the moment), the Sass Google group is a great place to go. You’ll usually get a response within a couple hours or so.
91
84
 
92
85
  ## Open to All
93
86
 
94
87
  If you have a nifty CSS trick that makes sense to be abstracted (and isn't already in another Github repo), please fork and submit a pull request. Note: If you are not the author of the CSS trick, you must get their permission before adding.
95
88
 
89
+ ## Fonts
90
+
91
+ All fonts are repackaged using [Fontsquirrel](http://www.fontsquirrel.com/fontface/generator).
92
+ Licences are distributed with the fonts.
93
+
96
94
  ## Build Documentation
97
95
 
98
96
  *You do not need to build documentation for testing your recipes.*
@@ -108,20 +106,35 @@ Then, to build the gh-pages from the `tests/`, you need to call
108
106
 
109
107
  This process create the pages & push them to your gh-pages branch.
110
108
 
111
- ## Fonts
109
+ ## Authors/Maintainers
112
110
 
113
- All fonts are repackaged using [Fontsquirrel](http://www.fontsquirrel.com/fontface/generator).
114
- Licences are distributed with the fonts.
111
+ Compass Recipes is maintained by [Maxime Thirouin](http://moox.fr), a french front-end web developer, and [David Kaneda](http://www.davidkaneda.com), creative director at [Sencha](http://www.sencha.com).
112
+
113
+ ### Recurrent Contributors
114
+
115
+ * [@canarymason](https://github.com/canarymason)
116
+
117
+ #### Sous Chefs
118
+
119
+ While Maxime and David are the primary project maintainers, most of the core ideas and techniques in the recipes are not from them.
120
+
121
+ Credits & Thanks:
122
+
123
+ * [@chriscoyier](https://github.com/chriscoyier) (shapes & lots of tricks)
124
+ * [@leaverou](https://github.com/leaverou) (backgrounds patterns)
125
+ * [@necolas](https://github.com/necolas) (normalize & tricks)
126
+ * [@simurai](https://github.com/simurai) (awesomes design stuffs)
127
+ * All of the people who contribute to the recipes (all names are in each recipes)
115
128
 
116
- ## Additional Resources
129
+ ### Additional Resources
117
130
 
118
131
  Some other great CSS/SCSS/design projects for making delicious websites:
119
132
 
120
- * [Normalize](http://necolas.github.com/normalize.css/) - The standard of CSS normalizations. (included as a recipe)
121
133
  * [Subtle Patterns](http://subtlepatterns.com/) - Great collection of free background patterns, some of which are not possible with CSS alone.
122
134
  * [Animate.sass](https://github.com/adamstac/animate.sass) - A bevy of pre-defined keyframe animations.
123
135
  * [OMG Text](http://jaredhardy.com/omg-text/) - Some super-rad text effects using text-shadow
124
136
 
137
+
125
138
  ## License
126
139
 
127
140
  Copyright (c) 2012 Maxime Thirouin
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0.alpha.1
1
+ 0.3.0.alpha.2
@@ -2,7 +2,7 @@
2
2
  # Sass extensions for Compass Recipes
3
3
  ##
4
4
 
5
- %w(_error background_noise gravatar highres math).each do |lib|
5
+ %w(_error background_noise gravatar math).each do |lib|
6
6
  require File.join(File.dirname(__FILE__), 'sass_extensions', lib)
7
7
  end
8
8
 
@@ -1,13 +1,16 @@
1
- @import "recipes/google-webfont";
1
+ @import "recipes/animation";
2
2
  @import "recipes/background";
3
3
  @import "recipes/base";
4
4
  @import "recipes/color";
5
5
  @import "recipes/effect";
6
+ @import "recipes/font";
6
7
  @import "recipes/form";
8
+ @import "recipes/google-webfont";
9
+ @import "recipes/icon-font";
10
+ @import "recipes/icons";
7
11
  @import "recipes/layout";
8
12
  @import "recipes/media-queries";
9
13
  @import "recipes/shadow";
10
14
  @import "recipes/shape";
11
15
  @import "recipes/shared";
12
- @import "recipes/ui";
13
- @import "recipes/webfont-icon";
16
+ @import "recipes/ui";
@@ -1,21 +1,17 @@
1
- /**
2
- *
3
- * @author David Kaneda - http://www.davidkaneda.com
4
- *
5
- */
1
+ ////
2
+ // Color functions
3
+ //
4
+ // @author David Kaneda - http://www.davidkaneda.com
5
+ ///
6
6
 
7
7
  @import "color/name";
8
8
 
9
- /**
10
- * @class Color
11
- */
12
-
13
- /**
14
- * Returns the brightness (out of 100) of a specified color.
15
- * @todo explain why this is useful
16
- * @param {color} $color The color you want the brightness value of
17
- * @return {measurement}
18
- */
9
+ ////
10
+ // Returns the brightness (out of 100) of a specified color.
11
+ // @todo explain why this is useful
12
+ // @param {color} $color The color you want the brightness value of
13
+ // @return {measurement}
14
+ ///
19
15
  @function brightness($color) {
20
16
  $r: red($color) / 255 * 100;
21
17
  $g: green($color) / 255 * 100;
@@ -39,12 +35,12 @@
39
35
  }
40
36
  }
41
37
 
42
- /**
43
- * Returns the luminosity for a specified color
44
- * @todo explain why this is useful
45
- * @param {color} The color to check
46
- * @return {measurement}
47
- */
38
+ ////
39
+ // Returns the luminosity for a specified color
40
+ // @todo explain why this is useful
41
+ // @param {color} The color to check
42
+ // @return {measurement}
43
+ ///
48
44
  @function luminosity($color) {
49
45
  $r: color-luminance(red($color) / 255);
50
46
  $g: color-luminance(green($color) / 255);
@@ -1,6 +1,9 @@
1
- @import "effect/glass";
2
- @import "effect/cutout";
3
- @import "effect/bevel";
4
- @import "effect/tape";
5
- @import "effect/corner-folded";
6
- @import "effect/folded-corner";
1
+ @import "recipes/effect/bevel";
2
+ @import "recipes/effect/corner-folded";
3
+ @import "recipes/effect/corners-tucked";
4
+ @import "recipes/effect/cutout";
5
+ @import "recipes/effect/folded-corner";
6
+ @import "recipes/effect/glass";
7
+ @import "recipes/effect/ribbon";
8
+ @import "recipes/effect/scatter";
9
+ @import "recipes/effect/tape";
@@ -1,12 +1,12 @@
1
- //
1
+ ////
2
2
  // Font face mixin to import a pack generated from fontsquirrel.com
3
3
  // include .eot (ie), .svg (iphone), .ttf & .woff
4
4
  //
5
5
  // @link http://www.fontsquirrel.com/fontface/generator
6
6
  // @link http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax
7
7
  //
8
- // @author Maxime Thirouin m@moox.fr
9
- //
8
+ // @author Maxime Thirouin m@moox.fr @MoOx
9
+ ///
10
10
 
11
11
  @import "compass/css3/font-face";
12
12
 
@@ -20,13 +20,22 @@
20
20
  {
21
21
  $font-dir: $font-name;
22
22
  }
23
+ // append / if font-dir present
24
+ @if ($font-dir != false)
25
+ {
26
+ $font-dir: $font-dir + "/";
27
+ }
28
+ @else
29
+ {
30
+ $font-dir: "";
31
+ }
23
32
  @include font-face(
24
33
  "#{$font-name}",
25
34
  font-files(
26
- "#{$font-dir}/#{$font-file-suffix}.eot?#iefix",
27
- "#{$font-dir}/#{$font-file-suffix}.woff",
28
- "#{$font-dir}/#{$font-file-suffix}.ttf",
29
- "#{$font-dir}/#{$font-file-suffix}.svg##{$font-id}"
35
+ "#{$font-dir}#{$font-file-suffix}.eot?#iefix",
36
+ "#{$font-dir}#{$font-file-suffix}.woff",
37
+ "#{$font-dir}#{$font-file-suffix}.ttf",
38
+ "#{$font-dir}#{$font-file-suffix}.svg##{$font-id}"
30
39
  )
31
40
  );
32
41
  }
@@ -1,3 +1,7 @@
1
+ ////
2
+ // Google web font
3
+ ///
4
+
1
5
  $google-font-name: false !default;
2
6
  $google-font-weights: false !default;
3
7
 
@@ -1,54 +1,53 @@
1
-
2
- @import 'compass';
1
+ ////
2
+ // Icon Fonts helpers
3
+ //
4
+ // Great to use with the some pictos fonts
5
+ ///
6
+
7
+ @import "compass/css3/background-clip";
8
+ @import "compass/css3/user-interface";
9
+ @import "compass/css3/text-shadow";
3
10
  @import "compass/typography/text/replacement";
4
11
 
5
- @import 'shared';
6
- @import 'font';
7
-
8
- @import 'background/gradients';
12
+ @import "recipes/font";
13
+ @import "recipes/background/gradients";
9
14
 
10
15
  // @todo add http://fortaweso.me/font-awesome
11
16
 
12
- /**
13
- * @class font Icon
14
- * Great to use with the some pictos fonts
15
- */
16
-
17
- $icon-font-class-suffix: "icon-font" !default;
18
- $icon-font-base-class: ".#{$icon-font-class-suffix}-base" !default;
17
+ $icon-font-class-suffix: icon-font !default;
18
+ $icon-font-base-class: "#{$icon-font-class-suffix}-base" !default;
19
19
 
20
- /**
21
- * @cfg {color} $icon-font-base-color
22
- * The default color of icons when using the {@link #icon-font} mixin.
23
- *
24
- * Defaults to `white`.
25
- */
20
+ ////
21
+ // @cfg {color} $icon-font-base-color
22
+ // The default color of icons when using the {@link #icon-font} mixin.
23
+ //
24
+ // Defaults to `white`.
25
+ ///
26
26
  $icon-font-base-color: #999 !default;
27
27
 
28
- /**
29
- * @cfg {color} $icon-font-default-stroke
30
- * The default color to use on the border of icons, when using the {@link #icon-font} mixin.
31
- *
32
- * Defaults to `null`.
33
- */
28
+ ////
29
+ // @cfg {color} $icon-font-default-stroke
30
+ // The default color to use on the border of icons, when using the {@link #icon-font} mixin.
31
+ //
32
+ // Defaults to `null`.
33
+ ///
34
34
  $icon-font-default-stroke: darken($icon-font-base-color, 10) !default;
35
35
 
36
36
  $icon-font-highlight-color: #3778E5 !default;
37
37
 
38
- /**
39
- * @cfg {string} $icon-font-default-gradient
40
- * The default gradient to use when using the {@link #icon-font} mixin.
41
- *
42
- * Defaults to `matte`.
43
- */
38
+ ////
39
+ // @cfg {string} $icon-font-default-gradient
40
+ // The default gradient to use when using the {@link #icon-font} mixin.
41
+ //
42
+ // Defaults to `matte`.
43
+ ///
44
44
  $icon-font-default-gradient: matte !default;
45
45
 
46
46
  // Base style for pseudo-selectors
47
47
  // @todo Doc me yo
48
48
 
49
- #{$icon-font-base-class}
49
+ %#{$icon-font-base-class}
50
50
  {
51
- @silent;
52
51
  color: transparent;
53
52
  @include background-clip(text);
54
53
  position: absolute;
@@ -65,10 +64,10 @@ $icon-font-default-gradient: matte !default;
65
64
  {
66
65
  @include font-face-kit($font-name, $font-id, $font-file-suffix, $font-dir);
67
66
 
68
- .#{$icon-font-class-suffix}-#{$font-name}
67
+ %#{$icon-font-class-suffix}-#{$font-name}
69
68
  {
70
69
  font-family: #{$font-name};
71
- @extend #{$icon-font-base-class};
70
+ @extend %#{$icon-font-base-class};
72
71
  }
73
72
  }
74
73
 
@@ -82,23 +81,23 @@ $icon-font-default-gradient: matte !default;
82
81
  @mixin icon-font-face-socialico() { @include icon-font-face(socialico, SocialicoRegular, socialico-webfont, icons/socialico); }
83
82
  @mixin icon-font-face-websymbols() { @include icon-font-face(websymbols, WebSymbolsRegular, websymbols-regular-webfont, icons/websymbols); }
84
83
 
85
- /**
86
- * Includes a character into the specified selector, styled as an icon.
87
- *
88
- * @include icon-font('a');
89
- *
90
- * @param {color} $color
91
- * The color of the icon. Defaults to {@link #$icon-font-default-background $icon-font-default-background}.
92
- *
93
- * @param {measurement} $size
94
- * The size of the icon
95
- *
96
- * @param {color} $stroke
97
- * The color of the border. Defautls to {@link #$icon-font-default-border $icon-font-default-border}.
98
- *
99
- * @param {boolean} $include-staes
100
- * True to include states for hover and active. Defaults to `true`.
101
- */
84
+ ////
85
+ // Includes a character into the specified selector, styled as an icon.
86
+ //
87
+ // @include icon-font('a');
88
+ //
89
+ // @param {color} $color
90
+ // The color of the icon. Defaults to {@link #$icon-font-default-background $icon-font-default-background}.
91
+ //
92
+ // @param {measurement} $size
93
+ // The size of the icon
94
+ //
95
+ // @param {color} $stroke
96
+ // The color of the border. Defautls to {@link #$icon-font-default-border $icon-font-default-border}.
97
+ //
98
+ // @param {boolean} $include-staes
99
+ // True to include states for hover and active. Defaults to `true`.
100
+ ///
102
101
  @mixin icon-font(
103
102
  $character: attr(data-icon),
104
103
  $size: 48px,
@@ -150,7 +149,7 @@ $icon-font-default-gradient: matte !default;
150
149
  &:after,
151
150
  &:before
152
151
  {
153
- @extend .#{$icon-font-class-suffix}-#{$class};
152
+ @extend %#{$icon-font-class-suffix}-#{$class};
154
153
  font-size: $size;
155
154
  content: $character;
156
155
 
@@ -198,27 +197,10 @@ $icon-font-attr-default-pseudo: before !default;
198
197
 
199
198
  @mixin icon-font-attr-rules()
200
199
  {
201
- [data-icon]
202
- {
203
- &:#{$icon-font-from-attr-default-pseudo}
204
- {
205
- content: attr($icon-font-attr-name);
206
- }
207
- }
208
-
209
- [data-icon-before]
210
- {
211
- &:before
212
- {
213
- content: attr($icon-font-attr-name);
214
- }
215
- }
216
-
217
- [data-icon-after]
200
+ [#{$icon-font-attr-name}]:#{$icon-font-attr-default-pseudo},
201
+ [#{$icon-font-attr-name}-before]:before,
202
+ [#{$icon-font-attr-name}-after]:after
218
203
  {
219
- &:after
220
- {
221
- content: attr($icon-font-attr-name);
222
- }
204
+ content: attr($icon-font-attr-name);
223
205
  }
224
206
  }