compass-recipes 0.3.0.alpha.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. data/README.md +24 -27
  2. data/VERSION +1 -1
  3. data/lib/compass-recipes/sass_extensions.rb +1 -1
  4. data/stylesheets/_recipes.scss +3 -3
  5. data/stylesheets/recipes/_background.scss +10 -9
  6. data/stylesheets/recipes/_color.scss +23 -9
  7. data/stylesheets/recipes/_font.scss +12 -16
  8. data/stylesheets/recipes/_icon-font.scss +253 -168
  9. data/stylesheets/recipes/_image.scss +36 -0
  10. data/stylesheets/recipes/_media-queries.scss +24 -62
  11. data/stylesheets/recipes/_text.scss +1 -0
  12. data/stylesheets/recipes/_ui.scss +2 -2
  13. data/stylesheets/recipes/_utilities.scss +6 -0
  14. data/stylesheets/recipes/background/{_cicada.scss → _cicada-stripes.scss} +1 -1
  15. data/stylesheets/recipes/background/_gradients.scss +25 -16
  16. data/stylesheets/recipes/background/_metal.scss +57 -0
  17. data/stylesheets/recipes/color/_scheme.scss +8 -0
  18. data/stylesheets/recipes/color/scheme/_analog.scss +11 -0
  19. data/stylesheets/recipes/color/scheme/_complementary.scss +21 -0
  20. data/stylesheets/recipes/color/scheme/_split.scss +11 -0
  21. data/stylesheets/recipes/color/scheme/_subtle.scss +21 -0
  22. data/stylesheets/recipes/color/scheme/_tetra.scss +11 -0
  23. data/stylesheets/recipes/color/scheme/_triad.scss +11 -0
  24. data/stylesheets/recipes/effect/_corners-tucked.scss +2 -1
  25. data/stylesheets/recipes/effect/_folded-corner.scss +3 -3
  26. data/stylesheets/recipes/effect/_glass.scss +3 -3
  27. data/stylesheets/recipes/effect/_ribbon.scss +32 -25
  28. data/stylesheets/recipes/effect/_tape.scss +4 -4
  29. data/stylesheets/recipes/helper/_gravatar.scss +3 -5
  30. data/stylesheets/recipes/image/_dimensions.scss +69 -0
  31. data/stylesheets/recipes/image/_inline.scss +12 -0
  32. data/stylesheets/recipes/image/_sprite.scss +57 -0
  33. data/stylesheets/recipes/layout/_vertical-align.scss +19 -60
  34. data/stylesheets/recipes/layout/vertical-align/_block.scss +67 -0
  35. data/stylesheets/recipes/media-queries/_orientation.scss +21 -0
  36. data/stylesheets/recipes/media-queries/_resolution.scss +47 -0
  37. data/stylesheets/recipes/media-queries/_size.scss +81 -0
  38. data/stylesheets/recipes/media-queries/size/_height.scss +29 -0
  39. data/stylesheets/recipes/media-queries/size/_width.scss +31 -0
  40. data/stylesheets/recipes/shadow/drop/_lifted-corners.scss +39 -35
  41. data/stylesheets/recipes/shadow/drop/_transform-requirement.scss +3 -3
  42. data/stylesheets/recipes/shape/polygon/_triangle.scss +92 -64
  43. data/stylesheets/recipes/text/_gradient.scss +12 -0
  44. data/stylesheets/recipes/ui/_tooltip.scss +144 -0
  45. data/stylesheets/recipes/ui/menu/_dropdown.scss +1 -1
  46. data/stylesheets/recipes/{shared → utilities}/_block-inline-block.scss +0 -0
  47. data/stylesheets/recipes/{shared → utilities}/_clearfix.scss +0 -0
  48. data/stylesheets/recipes/{shared → utilities}/_list-inline-block.scss +2 -2
  49. data/stylesheets/recipes/utilities/_position.scss +13 -0
  50. data/stylesheets/recipes/utilities/_pseudo-element.scss +23 -0
  51. data/stylesheets/recipes/utilities/_relative-position.scss +85 -0
  52. data/templates/gravatar/README.md +36 -0
  53. data/templates/gravatar/gravatar.js +102 -105
  54. data/templates/gravatar/manifest.rb +3 -2
  55. data/templates/icon-fonts/README.md +149 -0
  56. data/templates/icon-fonts/icons/broccolidry/broccolidry.eot +0 -0
  57. data/templates/icon-fonts/icons/broccolidry/broccolidry.svg +759 -0
  58. data/templates/icon-fonts/icons/broccolidry/broccolidry.ttf +0 -0
  59. data/templates/icon-fonts/icons/broccolidry/broccolidry.woff +0 -0
  60. data/templates/icon-fonts/icons/broccolidry/license.txt +2 -0
  61. data/templates/icon-fonts/icons/cuticons/cuticons.eot +0 -0
  62. data/templates/icon-fonts/icons/cuticons/cuticons.svg +165 -0
  63. data/templates/icon-fonts/icons/cuticons/cuticons.ttf +0 -0
  64. data/templates/icon-fonts/icons/cuticons/cuticons.woff +0 -0
  65. data/templates/icon-fonts/icons/cuticons/license.txt +2 -0
  66. data/templates/icon-fonts/icons/ecoico/ecoico.eot +0 -0
  67. data/templates/icon-fonts/icons/ecoico/ecoico.svg +180 -0
  68. data/templates/icon-fonts/icons/ecoico/ecoico.ttf +0 -0
  69. data/templates/icon-fonts/icons/ecoico/ecoico.woff +0 -0
  70. data/templates/icon-fonts/icons/ecoico/license.txt +2 -0
  71. data/templates/icon-fonts/icons/entypo/entypo.eot +0 -0
  72. data/templates/icon-fonts/icons/entypo/entypo.svg +792 -0
  73. data/templates/icon-fonts/icons/entypo/entypo.ttf +0 -0
  74. data/templates/icon-fonts/icons/entypo/entypo.woff +0 -0
  75. data/templates/icon-fonts/icons/fontawesome/README.md +18 -0
  76. data/templates/icon-fonts/icons/fontawesome/fontawesome.eot +0 -0
  77. data/templates/icon-fonts/icons/fontawesome/fontawesome.svg +255 -0
  78. data/templates/icon-fonts/icons/fontawesome/fontawesome.ttf +0 -0
  79. data/templates/icon-fonts/icons/fontawesome/fontawesome.woff +0 -0
  80. data/fonts/icons/heydings-controls/SIL Open Font License 1.1.txt b/data/templates/icon-fonts/icons/heydings_controls/SIL Open Font License → 1.1.txt +0 -0
  81. data/{fonts/icons/heydings-controls/heydings_controls-webfont.eot → templates/icon-fonts/icons/heydings_controls/heydings_controls.eot} +0 -0
  82. data/{fonts/icons/heydings-controls/heydings_controls-webfont.svg → templates/icon-fonts/icons/heydings_controls/heydings_controls.svg} +0 -0
  83. data/{fonts/icons/heydings-controls/heydings_controls-webfont.ttf → templates/icon-fonts/icons/heydings_controls/heydings_controls.ttf} +0 -0
  84. data/{fonts/icons/heydings-controls/heydings_controls-webfont.woff → templates/icon-fonts/icons/heydings_controls/heydings_controls.woff} +0 -0
  85. data/fonts/icons/heydings/SIL Open Font License 1.1.txt b/data/templates/icon-fonts/icons/heydings_icons/SIL Open Font License → 1.1.txt +0 -0
  86. data/{fonts/icons/heydings/heydings_icons-webfont.eot → templates/icon-fonts/icons/heydings_icons/heydings_icons.eot} +0 -0
  87. data/{fonts/icons/heydings/heydings_icons-webfont.svg → templates/icon-fonts/icons/heydings_icons/heydings_icons.svg} +0 -0
  88. data/{fonts/icons/heydings/heydings_icons-webfont.ttf → templates/icon-fonts/icons/heydings_icons/heydings_icons.ttf} +0 -0
  89. data/{fonts/icons/heydings/heydings_icons-webfont.woff → templates/icon-fonts/icons/heydings_icons/heydings_icons.woff} +0 -0
  90. data/templates/icon-fonts/icons/icomoon/License.txt +2 -0
  91. data/templates/icon-fonts/icons/icomoon/icomoon.eot +0 -0
  92. data/templates/icon-fonts/icons/icomoon/icomoon.svg +1348 -0
  93. data/templates/icon-fonts/icons/icomoon/icomoon.ttf +0 -0
  94. data/templates/icon-fonts/icons/icomoon/icomoon.woff +0 -0
  95. data/fonts/icons/iconic/SIL Open Font License 1.1.txt b/data/templates/icon-fonts/icons/iconic_fill/SIL Open Font License → 1.1.txt +0 -0
  96. data/templates/icon-fonts/icons/iconic_fill/iconic_fill.eot +0 -0
  97. data/templates/icon-fonts/icons/iconic_fill/iconic_fill.svg +539 -0
  98. data/templates/icon-fonts/icons/iconic_fill/iconic_fill.ttf +0 -0
  99. data/templates/icon-fonts/icons/iconic_fill/iconic_fill.woff +0 -0
  100. data/templates/icon-fonts/fonts/icons/heydings-controls/SIL Open Font License 1.1.txt b/data/templates/icon-fonts/icons/iconic_stroke/SIL Open Font License → 1.1.txt +0 -0
  101. data/templates/icon-fonts/icons/iconic_stroke/iconic_stroke.eot +0 -0
  102. data/templates/icon-fonts/icons/iconic_stroke/iconic_stroke.svg +553 -0
  103. data/templates/icon-fonts/icons/iconic_stroke/iconic_stroke.ttf +0 -0
  104. data/templates/icon-fonts/icons/iconic_stroke/iconic_stroke.woff +0 -0
  105. data/templates/icon-fonts/icons/iconminia/iconminia.eot +0 -0
  106. data/templates/icon-fonts/icons/iconminia/iconminia.svg +357 -0
  107. data/templates/icon-fonts/icons/iconminia/iconminia.ttf +0 -0
  108. data/templates/icon-fonts/icons/iconminia/iconminia.woff +0 -0
  109. data/templates/icon-fonts/icons/iconminia/license.txt +2 -0
  110. data/templates/icon-fonts/icons/meteocons/license.txt +2 -0
  111. data/templates/icon-fonts/icons/meteocons/meteocons.eot +0 -0
  112. data/templates/icon-fonts/icons/meteocons/meteocons.svg +511 -0
  113. data/templates/icon-fonts/icons/meteocons/meteocons.ttf +0 -0
  114. data/templates/icon-fonts/icons/meteocons/meteocons.woff +0 -0
  115. data/fonts/icons/modern-pictograms/Modern Pictograms SIL OFL Font License 1.1.txt b/data/templates/icon-fonts/icons/modern_pictograms/SIL OFL Font License → 1.1.txt +0 -0
  116. data/{fonts/icons/modern-pictograms/modernpics-webfont.eot → templates/icon-fonts/icons/modern_pictograms/modern_pictograms.eot} +0 -0
  117. data/{fonts/icons/modern-pictograms/modernpics-webfont.svg → templates/icon-fonts/icons/modern_pictograms/modern_pictograms.svg} +0 -0
  118. data/{fonts/icons/modern-pictograms/modernpics-webfont.ttf → templates/icon-fonts/icons/modern_pictograms/modern_pictograms.ttf} +0 -0
  119. data/{fonts/icons/modern-pictograms/modernpics-webfont.woff → templates/icon-fonts/icons/modern_pictograms/modern_pictograms.woff} +0 -0
  120. data/templates/icon-fonts/icons/silkcons/license.txt +2 -0
  121. data/templates/icon-fonts/icons/silkcons/silkcons.eot +0 -0
  122. data/templates/icon-fonts/icons/silkcons/silkcons.svg +301 -0
  123. data/templates/icon-fonts/icons/silkcons/silkcons.ttf +0 -0
  124. data/templates/icon-fonts/icons/silkcons/silkcons.woff +0 -0
  125. data/{fonts → templates/icon-fonts}/icons/socialico/FFF_EULA_license.pdf +0 -0
  126. data/{fonts/icons/socialico/socialico-webfont.eot → templates/icon-fonts/icons/socialico/socialico.eot} +0 -0
  127. data/{fonts/icons/socialico/Socialico-webfont.otf → templates/icon-fonts/icons/socialico/socialico.otf} +0 -0
  128. data/{fonts/icons/socialico/socialico-webfont.svg → templates/icon-fonts/icons/socialico/socialico.svg} +0 -0
  129. data/{fonts/icons/socialico/socialico-webfont.ttf → templates/icon-fonts/icons/socialico/socialico.ttf} +0 -0
  130. data/{fonts/icons/socialico/socialico-webfont.woff → templates/icon-fonts/icons/socialico/socialico.woff} +0 -0
  131. data/templates/icon-fonts/icons/typicons/license.txt +2 -0
  132. data/templates/icon-fonts/icons/typicons/typicons.eot +0 -0
  133. data/templates/icon-fonts/icons/typicons/typicons.svg +329 -0
  134. data/templates/icon-fonts/icons/typicons/typicons.ttf +0 -0
  135. data/templates/icon-fonts/icons/typicons/typicons.woff +0 -0
  136. data/{fonts → templates/icon-fonts}/icons/websymbols/OFL-FAQ.txt +0 -0
  137. data/{fonts → templates/icon-fonts}/icons/websymbols/OFL.txt +0 -0
  138. data/{fonts/icons/websymbols/websymbols-regular-webfont.eot → templates/icon-fonts/icons/websymbols/websymbols.eot} +0 -0
  139. data/{fonts/icons/websymbols/websymbols-regular-webfont.svg → templates/icon-fonts/icons/websymbols/websymbols.svg} +0 -0
  140. data/{fonts/icons/websymbols/websymbols-regular-webfont.ttf → templates/icon-fonts/icons/websymbols/websymbols.ttf} +0 -0
  141. data/{fonts/icons/websymbols/websymbols-regular-webfont.woff → templates/icon-fonts/icons/websymbols/websymbols.woff} +0 -0
  142. data/templates/icon-fonts/icons/wpzoom/license.txt +2 -0
  143. data/templates/icon-fonts/icons/wpzoom/wpzoom.eot +0 -0
  144. data/templates/icon-fonts/icons/wpzoom/wpzoom.svg +887 -0
  145. data/templates/icon-fonts/icons/wpzoom/wpzoom.ttf +0 -0
  146. data/templates/icon-fonts/icons/wpzoom/wpzoom.woff +0 -0
  147. data/templates/icon-fonts/manifest.rb +3 -3
  148. data/templates/media-queries-for-js/README.md +45 -0
  149. data/templates/media-queries-for-js/manifest.rb +18 -0
  150. data/templates/media-queries-for-js/media-queries.js +21 -0
  151. metadata +157 -143
  152. data/fonts/icons/entypo/entypo-webfont.eot +0 -0
  153. data/fonts/icons/entypo/entypo-webfont.svg +0 -198
  154. data/fonts/icons/entypo/entypo-webfont.ttf +0 -0
  155. data/fonts/icons/entypo/entypo-webfont.woff +0 -0
  156. data/fonts/icons/heydings-controls/demo.html +0 -33
  157. data/fonts/icons/heydings-controls/stylesheet.css +0 -16
  158. data/fonts/icons/heydings/demo.html +0 -33
  159. data/fonts/icons/heydings/stylesheet.css +0 -16
  160. data/fonts/icons/icomoon/License.txt +0 -1
  161. data/fonts/icons/icomoon/Read Me.txt +0 -5
  162. data/fonts/icons/icomoon/icomoon.eot +0 -0
  163. data/fonts/icons/icomoon/icomoon.svg +0 -35
  164. data/fonts/icons/icomoon/icomoon.ttf +0 -0
  165. data/fonts/icons/icomoon/icomoon.woff +0 -0
  166. data/fonts/icons/iconic/demo.html +0 -38
  167. data/fonts/icons/iconic/iconic_fill.eot +0 -0
  168. data/fonts/icons/iconic/iconic_fill.svg +0 -475
  169. data/fonts/icons/iconic/iconic_fill.ttf +0 -0
  170. data/fonts/icons/iconic/iconic_fill.woff +0 -0
  171. data/fonts/icons/iconic/iconic_stroke.eot +0 -0
  172. data/fonts/icons/iconic/iconic_stroke.svg +0 -492
  173. data/fonts/icons/iconic/iconic_stroke.ttf +0 -0
  174. data/fonts/icons/iconic/iconic_stroke.woff +0 -0
  175. data/fonts/icons/iconic/stylesheet.css +0 -28
  176. data/fonts/icons/modern-pictograms/demo.html +0 -33
  177. data/fonts/icons/modern-pictograms/stylesheet.css +0 -16
  178. data/lib/compass-recipes/sass_extensions/math.rb +0 -8
  179. data/stylesheets/recipes/_base.scss +0 -1
  180. data/stylesheets/recipes/_shared.scss +0 -4
  181. data/stylesheets/recipes/base/_normalize.scss +0 -587
  182. data/stylesheets/recipes/shared/_pseudo-element.scss +0 -30
  183. data/stylesheets/recipes/ui/_helper.scss +0 -1
  184. data/stylesheets/recipes/ui/helper/_arrow.scss +0 -78
  185. data/templates/gravatar/getElementsByClassName.js +0 -23
  186. data/templates/icon-fonts/fonts/icons/entypo/entypo-webfont.eot +0 -0
  187. data/templates/icon-fonts/fonts/icons/entypo/entypo-webfont.svg +0 -198
  188. data/templates/icon-fonts/fonts/icons/entypo/entypo-webfont.ttf +0 -0
  189. data/templates/icon-fonts/fonts/icons/entypo/entypo-webfont.woff +0 -0
  190. data/templates/icon-fonts/fonts/icons/heydings-controls/demo.html +0 -33
  191. data/templates/icon-fonts/fonts/icons/heydings-controls/heydings_controls-webfont.eot +0 -0
  192. data/templates/icon-fonts/fonts/icons/heydings-controls/heydings_controls-webfont.svg +0 -85
  193. data/templates/icon-fonts/fonts/icons/heydings-controls/heydings_controls-webfont.ttf +0 -0
  194. data/templates/icon-fonts/fonts/icons/heydings-controls/heydings_controls-webfont.woff +0 -0
  195. data/templates/icon-fonts/fonts/icons/heydings-controls/stylesheet.css +0 -16
  196. data/templates/icon-fonts/fonts/icons/heydings/SIL Open Font License 1.1.txt +0 -91
  197. data/templates/icon-fonts/fonts/icons/heydings/demo.html +0 -33
  198. data/templates/icon-fonts/fonts/icons/heydings/heydings_icons-webfont.eot +0 -0
  199. data/templates/icon-fonts/fonts/icons/heydings/heydings_icons-webfont.svg +0 -94
  200. data/templates/icon-fonts/fonts/icons/heydings/heydings_icons-webfont.ttf +0 -0
  201. data/templates/icon-fonts/fonts/icons/heydings/heydings_icons-webfont.woff +0 -0
  202. data/templates/icon-fonts/fonts/icons/heydings/stylesheet.css +0 -16
  203. data/templates/icon-fonts/fonts/icons/icomoon/License.txt +0 -1
  204. data/templates/icon-fonts/fonts/icons/icomoon/Read Me.txt +0 -5
  205. data/templates/icon-fonts/fonts/icons/icomoon/icomoon.eot +0 -0
  206. data/templates/icon-fonts/fonts/icons/icomoon/icomoon.svg +0 -35
  207. data/templates/icon-fonts/fonts/icons/icomoon/icomoon.ttf +0 -0
  208. data/templates/icon-fonts/fonts/icons/icomoon/icomoon.woff +0 -0
  209. data/templates/icon-fonts/fonts/icons/iconic/SIL Open Font License 1.1.txt +0 -91
  210. data/templates/icon-fonts/fonts/icons/iconic/demo.html +0 -38
  211. data/templates/icon-fonts/fonts/icons/iconic/iconic_fill.eot +0 -0
  212. data/templates/icon-fonts/fonts/icons/iconic/iconic_fill.svg +0 -475
  213. data/templates/icon-fonts/fonts/icons/iconic/iconic_fill.ttf +0 -0
  214. data/templates/icon-fonts/fonts/icons/iconic/iconic_fill.woff +0 -0
  215. data/templates/icon-fonts/fonts/icons/iconic/iconic_stroke.eot +0 -0
  216. data/templates/icon-fonts/fonts/icons/iconic/iconic_stroke.svg +0 -492
  217. data/templates/icon-fonts/fonts/icons/iconic/iconic_stroke.ttf +0 -0
  218. data/templates/icon-fonts/fonts/icons/iconic/iconic_stroke.woff +0 -0
  219. data/templates/icon-fonts/fonts/icons/iconic/stylesheet.css +0 -28
  220. data/templates/icon-fonts/fonts/icons/modern-pictograms/Modern Pictograms SIL OFL Font License 1.1.txt +0 -94
  221. data/templates/icon-fonts/fonts/icons/modern-pictograms/demo.html +0 -33
  222. data/templates/icon-fonts/fonts/icons/modern-pictograms/modernpics-webfont.eot +0 -0
  223. data/templates/icon-fonts/fonts/icons/modern-pictograms/modernpics-webfont.svg +0 -136
  224. data/templates/icon-fonts/fonts/icons/modern-pictograms/modernpics-webfont.ttf +0 -0
  225. data/templates/icon-fonts/fonts/icons/modern-pictograms/modernpics-webfont.woff +0 -0
  226. data/templates/icon-fonts/fonts/icons/modern-pictograms/stylesheet.css +0 -16
  227. data/templates/icon-fonts/fonts/icons/socialico/FFF_EULA_license.pdf +0 -0
  228. data/templates/icon-fonts/fonts/icons/socialico/Socialico-webfont.otf +0 -0
  229. data/templates/icon-fonts/fonts/icons/socialico/socialico-webfont.eot +0 -0
  230. data/templates/icon-fonts/fonts/icons/socialico/socialico-webfont.svg +0 -123
  231. data/templates/icon-fonts/fonts/icons/socialico/socialico-webfont.ttf +0 -0
  232. data/templates/icon-fonts/fonts/icons/socialico/socialico-webfont.woff +0 -0
  233. data/templates/icon-fonts/fonts/icons/websymbols/OFL-FAQ.txt +0 -369
  234. data/templates/icon-fonts/fonts/icons/websymbols/OFL.txt +0 -97
  235. data/templates/icon-fonts/fonts/icons/websymbols/websymbols-regular-webfont.eot +0 -0
  236. data/templates/icon-fonts/fonts/icons/websymbols/websymbols-regular-webfont.svg +0 -108
  237. data/templates/icon-fonts/fonts/icons/websymbols/websymbols-regular-webfont.ttf +0 -0
  238. data/templates/icon-fonts/fonts/icons/websymbols/websymbols-regular-webfont.woff +0 -0
data/README.md CHANGED
@@ -4,23 +4,24 @@ A series of Compass and Sass mixins and functions for creating delicious CSS eff
4
4
 
5
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
6
 
7
- ## [Demos](http://moox.github.com/compass-recipes/)
8
-
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_
10
-
11
- ## Types of Recipes
12
-
13
- * **[Backgrounds](http://moox.github.com/compass-recipes/recipes/background/)** - Background patterns, gradients.
14
- * **Color** Variables Names & Advanced color functions like `brightness()`
15
- * **[Effects](http://moox.github.com/compass-recipes/recipes/effect/)** - Visual effects like `bevel` and `cutout`
16
- * **[Form skins](http://moox.github.com/compass-recipes/recipes/form/skin/)** - Only one at the moment.
17
- * **[Icon Fonts](http://moox.github.com/compass-recipes/recipes/icon-fonts)** - Includes icon fonts helper and a few open source fonts.
18
- * **[Layout](http://moox.github.com/compass-recipes/recipes/layout)** - Vertical centering and box layout shortcuts.
19
- * **[Media queries](http://moox.github.com/compass-recipes/recipes/media-queries)** - Predefined queries for common device widths. *Experimental: Uses `sass --pre`*
20
- * **[Shadows](http://moox.github.com/compass-recipes/recipes/shadow/)** - A wide collection of shadows which use pseudo elements to create fold effects, etc.
21
- * **[Shapes](http://moox.github.com/compass-recipes/recipes/shape/)** - Geometric and iconic shapes, created only with CSS
22
- * **[Shared](http://moox.github.com/compass-recipes/recipes/shared/)** - Common CSS tricks and hacks.
23
- * **[UI](http://moox.github.com/compass-recipes/recipes/ui/)** Lots of element styling for menu, buttons, loader, etc.
7
+ ## [Online Demos](http://moox.github.com/compass-recipes/tests/)
8
+
9
+ If you want to view the Sass(scss) source of a demo, remember to find the appropriate `.scss` file of the deserved `s.css` (e.g. : open it from the source & switch extension).
10
+
11
+ ## Availables Recipes
12
+
13
+ * **[Backgrounds](http://moox.github.com/compass-recipes/tests/recipes/background/)** - Background patterns, gradients.
14
+ * **[Color](http://moox.github.com/compass-recipes/tests/recipes/color/)** Variables Names, advanced color functions like `brightness()` & color scheme functions
15
+ * **[Effects](http://moox.github.com/compass-recipes/tests/recipes/effect/)** - Visual effects like `glass`, `bevel`, `cutout` or `ribbon`
16
+ * **[Form skins](http://moox.github.com/compass-recipes/tests/recipes/form/skin/)** - Only one at the moment. Please add yours :)
17
+ * **[Icon Fonts](http://moox.github.com/compass-recipes/tests/recipes/icon-font/)** - Includes icon fonts helper and a few open source fonts as a compass extension ([more info](https://github.com/MoOx/compass-recipes/blob/master/templates/icon-fonts/README.md))
18
+ * **[Image](http://moox.github.com/compass-recipes/tests/recipes/image/)** - More image mixins (& functions) than Compass deserve (dimensions, inline, simple spriting)
19
+ * **[Layout](http://moox.github.com/compass-recipes/tests/recipes/layout/)** - Vertical centering and box layout shortcuts.
20
+ * **[Media queries](http://moox.github.com/compass-recipes/tests/recipes/media-queries/)** - Shortcuts for media queries.
21
+ * **[Shadows](http://moox.github.com/compass-recipes/tests/recipes/shadow/)** - A wide collection of shadows which use pseudo elements to create fold effects, etc.
22
+ * **[Shapes](http://moox.github.com/compass-recipes/tests/recipes/shape/)** - Geometric and iconic shapes, created only with CSS
23
+ * **[UI](http://moox.github.com/compass-recipes/tests/recipes/ui/)** Lots of element styling for loader, menu, overlay, separator, tooltip, etc.
24
+ * **[Utilities](http://moox.github.com/compass-recipes/tests/recipes/utilities/)** Very usefull utilities, trick, hacks
24
25
  * [View other potential icoming items](https://github.com/MoOx/compass-recipes/issues?labels=enhancement%2Cfeature)
25
26
 
26
27
  ## Installation
@@ -80,7 +81,7 @@ There is also an IRC channel, **#compass-recipes** on _irc.freenode.net_.
80
81
 
81
82
  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.
82
83
 
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.
84
+ If you have a longer question (or no one’s around on IRC at the moment), drop a mail at [compass-recipes@moox.fr](mailto:compass-recipes@moox.fr). You’ll usually get a response within a couple hours or so.
84
85
 
85
86
  ## Open to All
86
87
 
@@ -94,7 +95,7 @@ Licences are distributed with the fonts.
94
95
  ## Build Documentation
95
96
 
96
97
  *You do not need to build documentation for testing your recipes.*
97
- *Just run `compass watch/compile` at the root of the repositorie.*
98
+ *Just run `compass watch/compile` at the root of the repository.*
98
99
 
99
100
  First you need bundle
100
101
 
@@ -104,17 +105,13 @@ Then, to build the gh-pages from the `tests/`, you need to call
104
105
 
105
106
  ```bundle exec rake pages```
106
107
 
107
- This process create the pages & push them to your gh-pages branch.
108
+ This process create the pages & commit them to your gh-pages branch.
108
109
 
109
110
  ## Authors/Maintainers
110
111
 
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
+ Compass Recipes is maintained by [Maxime Thirouin](http://moox.fr), a french front-end web developer, and [David Kaneda](http://www.davidkaneda.com), previously creative director at [Sencha](http://www.sencha.com).
112
113
 
113
- ### Recurrent Contributors
114
-
115
- * [@canarymason](https://github.com/canarymason)
116
-
117
- #### Sous Chefs
114
+ [See all contributors](https://github.com/MoOx/compass-recipes/graphs/contributors)
118
115
 
119
116
  While Maxime and David are the primary project maintainers, most of the core ideas and techniques in the recipes are not from them.
120
117
 
@@ -124,7 +121,7 @@ Credits & Thanks:
124
121
  * [@leaverou](https://github.com/leaverou) (backgrounds patterns)
125
122
  * [@necolas](https://github.com/necolas) (normalize & tricks)
126
123
  * [@simurai](https://github.com/simurai) (awesomes design stuffs)
127
- * All of the people who contribute to the recipes (all names are in each recipes)
124
+ * All of the people who contribute to the recipes (all names should be in each recipes source)
128
125
 
129
126
  ### Additional Resources
130
127
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0.alpha.2
1
+ 0.3.0
@@ -2,7 +2,7 @@
2
2
  # Sass extensions for Compass Recipes
3
3
  ##
4
4
 
5
- %w(_error background_noise gravatar math).each do |lib|
5
+ %w(_error background_noise gravatar).each do |lib|
6
6
  require File.join(File.dirname(__FILE__), 'sass_extensions', lib)
7
7
  end
8
8
 
@@ -1,6 +1,5 @@
1
1
  @import "recipes/animation";
2
2
  @import "recipes/background";
3
- @import "recipes/base";
4
3
  @import "recipes/color";
5
4
  @import "recipes/effect";
6
5
  @import "recipes/font";
@@ -8,9 +7,10 @@
8
7
  @import "recipes/google-webfont";
9
8
  @import "recipes/icon-font";
10
9
  @import "recipes/icons";
10
+ @import "recipes/image";
11
11
  @import "recipes/layout";
12
12
  @import "recipes/media-queries";
13
13
  @import "recipes/shadow";
14
14
  @import "recipes/shape";
15
- @import "recipes/shared";
16
- @import "recipes/ui";
15
+ @import "recipes/ui";
16
+ @import "recipes/utilities";
@@ -1,15 +1,16 @@
1
- @import "recipes/background/noise";
2
- @import "recipes/background/gradients";
3
1
  @import "recipes/background/blueprint-grid";
4
- @import "recipes/background/radial-overlay";
5
- @import "recipes/background/tartan";
6
2
  @import "recipes/background/carbon-fiber";
7
- @import "recipes/background/stripes";
8
- @import "recipes/background/cicada";
9
- @import "recipes/background/tablecloth";
10
- @import "recipes/background/lined-paper";
11
- @import "recipes/background/madras";
12
3
  @import "recipes/background/checkerboard";
4
+ @import "recipes/background/cicada-stripes";
5
+ @import "recipes/background/gradients";
13
6
  @import "recipes/background/houndstooth";
7
+ @import "recipes/background/lined-paper";
8
+ @import "recipes/background/madras";
9
+ @import "recipes/background/metal";
10
+ @import "recipes/background/noise";
14
11
  @import "recipes/background/polka-dot";
12
+ @import "recipes/background/radial-overlay";
15
13
  @import "recipes/background/rainbow";
14
+ @import "recipes/background/stripes";
15
+ @import "recipes/background/tablecloth";
16
+ @import "recipes/background/tartan";
@@ -4,7 +4,8 @@
4
4
  // @author David Kaneda - http://www.davidkaneda.com
5
5
  ///
6
6
 
7
- @import "color/name";
7
+ @import "recipes/color/name";
8
+ @import "recipes/color/scheme";
8
9
 
9
10
  ////
10
11
  // Returns the brightness (out of 100) of a specified color.
@@ -78,7 +79,7 @@
78
79
  @if $inverse == true {
79
80
  $mode: reverse-color-mode($mode);
80
81
  }
81
-
82
+
82
83
  @if ($mode == light) {
83
84
  @return rgba(lighten($flat_color, $contrast), opacity($color));
84
85
  } @else if ($mode == dark) {
@@ -110,7 +111,7 @@
110
111
  @function color-by-background($bg-color, $contrast: $default-text-contrast) {
111
112
  $bg-color: check-opacity($bg-color);
112
113
  $tmpmode: get-color-mode($bg-color);
113
-
114
+
114
115
  @return color-offset($bg-color, $contrast, $tmpmode, $inverse: true);
115
116
  }
116
117
 
@@ -136,7 +137,7 @@
136
137
  } @else {
137
138
  color: color-by-background($bg-color, $contrast);
138
139
  }
139
-
140
+
140
141
  @if $inset-text {
141
142
  @include inset-by-background($bg-color);
142
143
  }
@@ -149,7 +150,7 @@
149
150
  @if ($box == true) {
150
151
  @include box-shadow(color-offset($bg-color, $contrast, $mode: get-color-mode($bg-color)) 0 $offset 0);
151
152
  }
152
-
153
+
153
154
  @include text-shadow(color-offset($bg-color, $contrast, $mode: get-color-mode($bg-color)) 0 $offset 0);
154
155
  }
155
156
 
@@ -161,7 +162,20 @@ $base-gradient: matte !default;
161
162
  $default-text-contrast: 85% !default;
162
163
  $color-mode: get-color-mode($neutral-color) !default;
163
164
 
164
- // @debug color-difference(#95419F, #0FFF90);
165
- // @debug brightness(#cbea0d) - brightness(#ea850d);
166
- // @debug contrast-ratio(#95419F, #0FFF90);
167
- // @debug brightness(#E0F200);
165
+ // Default black used for the black() helper
166
+ $default-black: #000 !default;
167
+
168
+ // Helper to generate transparent black
169
+ // $opacity - opacity. Default to 1 (no opacity)
170
+ @function black($opacity: 1) {
171
+ @return rgba($default-black, $opacity);
172
+ }
173
+
174
+ // Default white used for the white() helper
175
+ $default-white: #fff !default;
176
+
177
+ // Helper to generate transparent white
178
+ // $opacity - opacity. Default to 1 (no opacity)
179
+ @function white($opacity: 1) {
180
+ @return rgba($default-white, $opacity)
181
+ }
@@ -10,32 +10,28 @@
10
10
 
11
11
  @import "compass/css3/font-face";
12
12
 
13
- @mixin font-face-kit($font-name, $font-id, $font-file-suffix: auto, $font-dir: auto)
13
+ @mixin font-face-kit($name, $id, $location: auto)
14
14
  {
15
- @if ($font-file-suffix == auto)
15
+ @if ($location == auto)
16
16
  {
17
- $font-file-suffix: $font-name + '-webfont';
17
+ $location: $name;
18
18
  }
19
- @if ($font-dir == auto)
19
+ // append / if location present
20
+ @if ($location != false)
20
21
  {
21
- $font-dir: $font-name;
22
- }
23
- // append / if font-dir present
24
- @if ($font-dir != false)
25
- {
26
- $font-dir: $font-dir + "/";
22
+ $location: $location + "/";
27
23
  }
28
24
  @else
29
25
  {
30
- $font-dir: "";
26
+ $location: "";
31
27
  }
32
28
  @include font-face(
33
- "#{$font-name}",
29
+ "#{$name}",
34
30
  font-files(
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}"
31
+ "#{$location}#{$name}.eot?#iefix",
32
+ "#{$location}#{$name}.woff",
33
+ "#{$location}#{$name}.ttf",
34
+ "#{$location}#{$name}.svg##{$id}"
39
35
  )
40
36
  );
41
37
  }
@@ -1,6 +1,6 @@
1
1
  ////
2
2
  // Icon Fonts helpers
3
- //
3
+ //
4
4
  // Great to use with the some pictos fonts
5
5
  ///
6
6
 
@@ -10,197 +10,282 @@
10
10
  @import "compass/typography/text/replacement";
11
11
 
12
12
  @import "recipes/font";
13
+ @import "recipes/text/gradient";
13
14
  @import "recipes/background/gradients";
14
15
 
15
- // @todo add http://fortaweso.me/font-awesome
16
+ // The default dir where webfont icons are located.
17
+ // Not need to specify Compass fonts_dir (automatically prefixed).
18
+ $icon-font-dir: 'icons' !default;
16
19
 
17
- $icon-font-class-suffix: icon-font !default;
18
- $icon-font-base-class: "#{$icon-font-class-suffix}-base" !default;
20
+ // The default suffix for all placeholders.
21
+ $icon-font-placeholder-suffix: icon-font !default;
19
22
 
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
- $icon-font-base-color: #999 !default;
23
+ // The default placeholder name for icon parent container.
24
+ $icon-font-parent-placeholder: "#{$icon-font-placeholder-suffix}-parent" !default;
27
25
 
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
- $icon-font-default-stroke: darken($icon-font-base-color, 10) !default;
26
+ // The default placeholder name for icon base style.
27
+ $icon-font-base-placeholder: "#{$icon-font-placeholder-suffix}-base" !default;
35
28
 
36
- $icon-font-highlight-color: #3778E5 !default;
29
+ // The default attribute name which contains the icon character code.
30
+ $icon-font-attr-name: data-icon !default;
37
31
 
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
- $icon-font-default-gradient: matte !default;
45
-
46
- // Base style for pseudo-selectors
47
- // @todo Doc me yo
48
-
49
- %#{$icon-font-base-class}
50
- {
51
- color: transparent;
52
- @include background-clip(text);
53
- position: absolute;
54
- top: 0;
55
- left: 0;
56
- text-indent: 0;
57
- @include text-shadow(none);
58
- @include user-select(none);
32
+ // The default icon font size
33
+ $icon-font-size: 1em !default;
34
+
35
+ // The default color of the icon.
36
+ $icon-font-color: #999 !default;
37
+
38
+ // The default color of the icon.
39
+ $icon-font-color-hover: darken($icon-font-color, 10%) !default;
40
+
41
+ // $icon-font-color - The default color of the icon.
42
+ $icon-font-color-active: darken($icon-font-color, 20%) !default;
43
+
44
+ // The default gradient type of the icon.
45
+ // Compatibility Webkit only
46
+ $icon-font-gradient-type: matte !default;
47
+
48
+ // The default gradient type of the icon when state is :hover.
49
+ // Compatibility in Webkit only
50
+ $icon-font-gradient-type-hover: $icon-font-gradient-type !default;
51
+
52
+ // The default gradient type of the icon when state is :active.
53
+ // Compatibility in Webkit only
54
+ $icon-font-gradient-type-active: recessed !default;
55
+
56
+ // The default shadow type of the icon.
57
+ $icon-font-shadow: rgba(#000, .6) 0 1px 0 !default;
58
+
59
+ // The default shadow type of the icon when state is :hover.
60
+ $icon-font-shadow-hover: rgba(#000, .8) 0 1px 0 !default;
61
+
62
+ // The default shadow type of the icon when state is :active.
63
+ $icon-font-shadow-active: $icon-font-shadow !default;
64
+
65
+ // The default color to use on the border of icons
66
+ // Compatibility in Webkit only
67
+ $icon-font-stroke: null !default;
68
+
69
+ // Common base style for icon parent container
70
+ %#{$icon-font-parent-placeholder} {
71
+ position: relative;
72
+ display: inline-block;
73
+ overflow: visible;
74
+ }
75
+
76
+ // Common base style for pseudo-selectors
77
+ %#{$icon-font-base-placeholder} {
78
+ position: absolute;
79
+ top: 0;
80
+ left: 0;
81
+ text-indent: 0;
82
+ @include text-shadow(none);
83
+ @include user-select(none);
84
+ }
85
+
86
+ // automatically apply the good font family from the font name
87
+ // Use @extend
88
+ @mixin icon-font-family($name) {
89
+ @if ($name != null) {
90
+ @extend %#{$icon-font-placeholder-suffix}-#{$name};
91
+ }
59
92
  }
60
93
 
94
+ // Icon font declaration using font face
61
95
  // http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax
96
+ // $name - font name
97
+ // $id - font svg #id. Default to the font name
98
+ // $location - directory where the icon font is located. Default to auto (=> fonts_dir/$icon-font-dir/$name)
99
+ @mixin icon-font-face($name, $id: $name, $location: auto) {
100
+ @if ($location == auto) {
101
+ $location: '#{$icon-font-dir}/#{$name}';
102
+ }
62
103
 
63
- @mixin icon-font-face($font-name, $font-id, $font-file-suffix: auto, $font-dir: auto)
64
- {
65
- @include font-face-kit($font-name, $font-id, $font-file-suffix, $font-dir);
104
+ // include the font
105
+ @include font-face-kit($name, $id, $location);
66
106
 
67
- %#{$icon-font-class-suffix}-#{$font-name}
68
- {
69
- font-family: #{$font-name};
70
- @extend %#{$icon-font-base-class};
71
- }
107
+ // declare the icon font family placeholder
108
+ %#{$icon-font-placeholder-suffix}-#{$name} {
109
+ font-family: #{$name};
110
+ }
72
111
  }
73
112
 
74
- @mixin icon-font-face-entypo() { @include icon-font-face(entypo, EntypoRegular, entypo-webfont, icons/entypo); }
75
- @mixin icon-font-face-heydings() { @include icon-font-face(heydings, HeydingsCommonIconsRegular, heydings_icons-webfont, icons/heydings); }
76
- @mixin icon-font-face-heydings_controls() { @include icon-font-face(heydings_controls, HeydingsControlsRegular, heydings_controls-webfont, icons/heydings-controls); }
77
- @mixin icon-font-face-iconic_fill() { @include icon-font-face(iconic_fill, IconicFill, iconic_fill, icons/iconic); }
78
- @mixin icon-font-face-iconic_stroke() { @include icon-font-face(iconic_stroke, IconicStroke, iconic_stroke, icons/iconic); }
79
- @mixin icon-font-face-icomoon() { @include icon-font-face(icomoon, IcoMoonRegular, icomoon, icons/icomoon); }
80
- @mixin icon-font-face-modern-pictograms() { @include icon-font-face(modern-pictograms, ModernPictogramsNormal, modernpics-webfont, icons/modern-pictograms);}
81
- @mixin icon-font-face-socialico() { @include icon-font-face(socialico, SocialicoRegular, socialico-webfont, icons/socialico); }
82
- @mixin icon-font-face-websymbols() { @include icon-font-face(websymbols, WebSymbolsRegular, websymbols-regular-webfont, icons/websymbols); }
113
+ // Include the icon font broccolidry
114
+ @mixin icon-font-face-broccolidry() { @include icon-font-face(broccolidry); }
115
+ // Include the icon font cuticons
116
+ @mixin icon-font-face-cuticons() { @include icon-font-face(cuticons); }
117
+ // Include the icon font ecoico
118
+ @mixin icon-font-face-ecoico() { @include icon-font-face(ecoico); }
119
+ // Include the icon font entypo
120
+ @mixin icon-font-face-entypo() { @include icon-font-face(entypo, EntypoRegular); }
121
+ // Include the icon font fontawesome
122
+ @mixin icon-font-face-fontawesome() { @include icon-font-face(fontawesome, FontAwesomeRegular); }
123
+ // Include the icon font heydings_controls
124
+ @mixin icon-font-face-heydings_controls() { @include icon-font-face(heydings_controls, HeydingsControlsRegular); }
125
+ // Include the icon font heydings_icons
126
+ @mixin icon-font-face-heydings_icons() { @include icon-font-face(heydings_icons, HeydingsCommonIconsRegular); }
127
+ // Include the icon font icomoon
128
+ @mixin icon-font-face-icomoon() { @include icon-font-face(icomoon, IcoMoonRegular); }
129
+ // Include the icon font iconic_fill
130
+ @mixin icon-font-face-iconic_fill() { @include icon-font-face(iconic_fill, IconicFill); }
131
+ // Include the icon font iconic_stroke
132
+ @mixin icon-font-face-iconic_stroke() { @include icon-font-face(iconic_stroke, IconicStroke); }
133
+ // Include the icon font iconminia
134
+ @mixin icon-font-face-iconminia() { @include icon-font-face(iconminia); }
135
+ // Include the icon font meteocons
136
+ @mixin icon-font-face-meteocons() { @include icon-font-face(meteocons); }
137
+ // Include the icon font modern_pictograms
138
+ @mixin icon-font-face-modern_pictograms() { @include icon-font-face(modern_pictograms, ModernPictogramsNormal);}
139
+ // Include the icon font silkcons
140
+ @mixin icon-font-face-silkcons() { @include icon-font-face(silkcons); }
141
+ // Include the icon font socialico
142
+ @mixin icon-font-face-socialico() { @include icon-font-face(socialico, SocialicoRegular); }
143
+ // Include the icon font typicons
144
+ @mixin icon-font-face-typicons() { @include icon-font-face(typicons); }
145
+ // Include the icon font websymbols
146
+ @mixin icon-font-face-websymbols() { @include icon-font-face(websymbols, WebSymbolsRegular); }
147
+ // Include the icon font wpzoom
148
+ @mixin icon-font-face-wpzoom() { @include icon-font-face(wpzoom); }
83
149
 
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
150
+ // Includes a icon font from a character code (Unicode), styled as an icon.
94
151
  //
95
- // @param {color} $stroke
96
- // The color of the border. Defautls to {@link #$icon-font-default-border $icon-font-default-border}.
152
+ // $character - font character code used. Default to the attribute specified by $icon-font-attr-name
153
+ // $size - size of the icon. Default to $icon-font-size
154
+ // $font - icon font family to use. If you use a lot of icon, prefer to use icon-font-attr-rules() mixin to define font globally
155
+ // $color - The color of the icon. Defaults to $icon-font-color.
156
+ // $color-hover - The color of the icon when :hover. Default to $icon-font-color-hover,
157
+ // $color-active - The color of the icon when :active. Default to $icon-font-color-active,
158
+
159
+ // $gradient-type - The gradient type of the icon. Default to $icon-font-gradient-type. See @function background-gradient() for available types.
160
+ // $gradient-type-hover - The gradient type of the icon when :hover. Default to $icon-font-gradient-type-hover. See @function background-gradient() for available types.
161
+ // $gradient-type-active - The gradient type of the icon when :active. Default to $icon-font-gradient-type-active. See @function background-gradient() for available types.
162
+
163
+ // $shadow - The shadow of the icon. Default to $icon-font-shadow,
164
+ // $shadow-hover - The shadow of the icon when :hover. Default to $icon-font-shadow-hover,
165
+ // $shadow-active - The shadow of the icon when :active. Default to $icon-font-shadow-active,
166
+
167
+ // $stroke - The stroke color of the icon. Default to $icon-font-stroke (null)
168
+ // $stroke-hover - The stroke color of the icon when :hover. Default to null,
169
+ // $stroke-active - The stroke color of the icon when :active. Default to null,
170
+
171
+ // $include-states - Whether to include or not :hover & :active states. Default to true,
172
+ // $hidetext - Whether to hide the default text of the element. Default to true.
97
173
  //
98
- // @param {boolean} $include-staes
99
- // True to include states for hover and active. Defaults to `true`.
100
- ///
174
+ // Compatibility in Chrome, Safari, Firefox, Opera & IE8+
101
175
  @mixin icon-font(
102
- $character: attr(data-icon),
103
- $size: 48px,
104
- $class: 'base',
105
-
106
- $color: $icon-font-base-color,
107
- $color-hover: $icon-font-highlight-color,
108
- $color-active: darken($color-hover, 7%),
176
+ $character: attr(#{$icon-font-attr-name}),
177
+ $size: $icon-font-size,
178
+ $font: null,
109
179
 
110
- $glow: null,
111
- $glow-hover: $icon-font-highlight-color 0 0 10px,
112
- $glow-active: $glow-hover,
180
+ $color: $icon-font-color,
181
+ $color-hover: $icon-font-color-hover,
182
+ $color-active: $icon-font-color-active,
113
183
 
114
- $shadow: rgba(#000, .5) 0 1px 3px, // Shadow doesn't change, but hover does
184
+ $gradient-type: $icon-font-gradient-type,
185
+ $gradient-type-hover: $icon-font-gradient-type-hover,
186
+ $gradient-type-active: $icon-font-gradient-type-active,
115
187
 
116
- $stroke: false,
117
- $stroke-hover: 1px darken($color-hover, 5),
118
- $stroke-active: 1px darken($color-active, 5),
188
+ $shadow: $icon-font-shadow,
189
+ $shadow-hover: $icon-font-shadow-hover,
190
+ $shadow-active: $icon-font-shadow-active,
119
191
 
120
- $gradient: $icon-font-default-gradient,
121
- $gradient-hover: $gradient,
122
- $gradient-active: recessed,
192
+ $stroke: null,
193
+ $stroke-hover: null,
194
+ $stroke-active: null,
123
195
 
124
- $include-states: true,
125
- $hidetext: true
196
+ $include-states: true,
197
+ $hidetext: true
126
198
  ) {
127
- position: relative;
128
- @include background-clip(text);
129
- overflow: visible;
130
- display: inline-block;
131
-
132
- // icon are square
133
- width: $size;
134
- line-height: $size;
135
- height: $size;
136
-
137
- @if ($hidetext == true)
138
- {
139
- text-indent: -9999px;
140
- //@include hide-text();
141
- }
142
-
143
- @if $stroke
144
- {
145
- -webkit-text-stroke: if($stroke == true, darken($color, 10), $stroke);
146
- text-stroke: if($stroke == true, darken($color, 10), $stroke);
147
- }
148
-
149
- &:after,
150
- &:before
151
- {
152
- @extend %#{$icon-font-class-suffix}-#{$class};
153
- font-size: $size;
154
- content: $character;
155
-
156
- @include background-gradient($color, $gradient);
157
- }
158
-
159
- &:before
160
- {
161
- // @include background-clip(padding-box);
162
- background: none;
163
- @include text-shadow($shadow);
164
- }
165
-
166
- @if $include-states {
167
- &:hover {
168
- @if $stroke-hover and $stroke {
169
- -webkit-text-stroke: $stroke-hover;
170
- text-stroke: $stroke-hover;
171
- }
172
-
173
- &:before {
174
- @include text-shadow($shadow, $glow-hover);
175
- }
176
- &:after {
177
- @include background-gradient($color-hover, $gradient-hover);
178
- }
179
- }
180
- &:active {
181
- @if $stroke-active and $stroke {
182
- -webkit-text-stroke: $stroke-active;
183
- text-stroke: $stroke-active;
184
- }
185
- &:before {
186
- @include text-shadow($shadow, $glow-active);
187
- }
188
- &:after {
189
- @include background-gradient($color-active, $gradient-active);
190
- }
191
- }
192
- }
199
+ @extend %#{$icon-font-parent-placeholder};
200
+
201
+ // icon are square
202
+ width: $size;
203
+ height: $size;
204
+ line-height: $size;
205
+
206
+ @if $hidetext {
207
+ text-indent: -9999px;
208
+ //@include hide-text();
209
+ }
210
+
211
+ // before is for the shadow
212
+ &:before,
213
+ // after is for the gradient text trick
214
+ &:after {
215
+ @extend %#{$icon-font-base-placeholder};
216
+ @include icon-font-family($font);
217
+ content: $character;
218
+ font-size: $size;
219
+ }
220
+
221
+ // Since :after is using text-fill-color: transparent, :before is only used for the shadow;
222
+ &:before {
223
+ color: transparent;
224
+ }
225
+
226
+ @include icon-font-effect($color, $gradient-type, $shadow, $stroke);
227
+
228
+ @if $include-states {
229
+ &:hover {
230
+ @include icon-font-effect($color-hover, $gradient-type-hover, $shadow-hover, $stroke-hover)
231
+ }
232
+ &:active {
233
+ @include icon-font-effect($color-active, $gradient-type-active, $shadow-active, $stroke-active)
234
+ }
235
+ }
193
236
  }
194
237
 
195
- $icon-font-attr-name: data-icon !default;
196
- $icon-font-attr-default-pseudo: before !default;
197
-
198
- @mixin icon-font-attr-rules()
199
- {
200
- [#{$icon-font-attr-name}]:#{$icon-font-attr-default-pseudo},
201
- [#{$icon-font-attr-name}-before]:before,
202
- [#{$icon-font-attr-name}-after]:after
203
- {
204
- content: attr($icon-font-attr-name);
205
- }
238
+ // Mixin to include icon-font color, shadow & stroke
239
+ // Used by @mixin icont-font()
240
+ //
241
+ // $color - The color of the icon
242
+ // $gradient-type - The gradient-type
243
+ // $color - The color of the icon
244
+ @mixin icon-font-effect($color, $gradient-type, $shadow, $stroke) {
245
+ @if $shadow {
246
+ &:before {
247
+ @include text-shadow($shadow);
248
+ }
249
+ }
250
+
251
+ @if $color and $gradient-type {
252
+ &:after {
253
+ @include text-gradient($color, $gradient-type);
254
+ }
255
+ }
256
+
257
+ @if $stroke {
258
+ -webkit-text-stroke: $stroke;
259
+ text-stroke: $stroke;
260
+ }
261
+ }
262
+
263
+ @mixin icon-font-from-attr($font, $attr-name: $icon-font-attr-name) {
264
+ [#{$attr-name}] {
265
+ @include icon-font(attr($attr-name), $font: $font);
266
+ @content;
267
+ }
268
+ }
269
+
270
+ @mixin icon-font-attr-pseudo($pseudo: before, $font: null) {
271
+ $attr: #{$icon-font-attr-name}-#{$pseudo};
272
+ [#{$attr}]:#{$pseudo} {
273
+ content: attr($attr);
274
+ @include icon-font-family($name);
275
+ @content;
276
+ }
277
+ }
278
+
279
+ @mixin icon-font-before($font: null) {
280
+ @include icon-font-attr-pseudo(before, $font) { @content; }
281
+ }
282
+
283
+ @mixin icon-font-after($font: null) {
284
+ @include icon-font-attr-pseudo(after, $font) { @content; }
285
+ }
286
+
287
+ @mixin icon-font-attr-rules($font: null, $from-attr-pseudo: before) {
288
+ @include icon-font-from-attr($font, $pseudo: $from-attr-pseudo);
289
+ @include icon-font-attr-before($font);
290
+ @include icon-font-attr-after($font);
206
291
  }