compass-recipes 0.1.0 → 0.2.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 (34) hide show
  1. data/README.md +43 -9
  2. data/VERSION +1 -1
  3. data/stylesheets/recipes/_shadow.scss +2 -2
  4. data/stylesheets/recipes/_shape.scss +10 -8
  5. data/stylesheets/recipes/enhancement/_corner-folded.scss +1 -1
  6. data/stylesheets/recipes/form/element/_inline.scss +10 -11
  7. data/stylesheets/recipes/layout/_vertical-align.scss +8 -3
  8. data/stylesheets/recipes/shadow/_drop.scss +8 -2
  9. data/stylesheets/recipes/shadow/drop/_curled-corners.scss +37 -0
  10. data/stylesheets/recipes/shadow/drop/_curved.scss +72 -0
  11. data/stylesheets/recipes/shadow/drop/_flying.scss +42 -0
  12. data/stylesheets/recipes/shadow/drop/{_lifted.scss → _lifted-corners.scss} +13 -17
  13. data/stylesheets/recipes/shadow/drop/_perspective.scss +26 -0
  14. data/stylesheets/recipes/shadow/drop/_raised.scss +13 -0
  15. data/stylesheets/recipes/shadow/drop/_transform-requirement.scss +22 -0
  16. data/stylesheets/recipes/shape/_ellipse.scss +24 -0
  17. data/stylesheets/recipes/shape/_polygon.scss +14 -0
  18. data/stylesheets/recipes/shape/_symbol.scss +7 -0
  19. data/stylesheets/recipes/shape/polygon/_hexagon.scss +38 -0
  20. data/stylesheets/recipes/shape/polygon/_octagon.scss +41 -0
  21. data/stylesheets/recipes/shape/polygon/_parallelogram.scss +15 -0
  22. data/stylesheets/recipes/shape/polygon/_pentagon.scss +26 -0
  23. data/stylesheets/recipes/shape/polygon/_rectangle.scss +11 -0
  24. data/stylesheets/recipes/shape/polygon/_square.scss +11 -0
  25. data/stylesheets/recipes/shape/polygon/_star.scss +76 -0
  26. data/stylesheets/recipes/shape/polygon/_trapezoid.scss +13 -0
  27. data/stylesheets/recipes/shape/{_triangle.scss → polygon/_triangle.scss} +5 -0
  28. data/stylesheets/recipes/shape/symbol/_heart.scss +37 -0
  29. data/stylesheets/recipes/shape/symbol/_infinity.scss +46 -0
  30. data/stylesheets/recipes/shared/_clearfix.scss +1 -0
  31. data/stylesheets/recipes/ui/_gradient.scss +20 -1
  32. metadata +30 -15
  33. data/stylesheets/recipes/form/element/_border-color.scss +0 -53
  34. data/stylesheets/recipes/form/skin/_default.scss +0 -0
data/README.md CHANGED
@@ -1,21 +1,55 @@
1
- # Compass Recipes ![project status](http://stillmaintained.com/MoOx/Compass-Recipes.png) #
1
+ # Compass Recipes ![project status](http://stillmaintained.com/MoOx/compass-recipes.png) #
2
2
 
3
3
  This project is a collection of Sass mixins using Compass that you can use or learn from.
4
4
 
5
5
  ## Demos
6
6
 
7
- http://moox.github.com/Compass-Recipes/
7
+ http://moox.github.com/compass-recipes/
8
8
 
9
- ## TODO
10
- * Create tests for all existing mixins
11
- * Add all pattern mixins from http://leaverou.me/css3patterns
12
- * Add all shadow/drop mixins from http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ and http://www.creativejuiz.fr/trytotry/css3-box-shadow-after-before/
13
- * Add all shapes from http://css-tricks.com/examples/ShapesOfCSS/
14
- * Add normalize.css from @necolas
9
+ ## Installation
10
+
11
+ [Compass-Recipes is now available as a gem on RubyGems.org](https://rubygems.org/gems/compass-recipes). So installation is quite easy.
12
+
13
+ gem install compass-recipes
14
+
15
+ # Usage
16
+
17
+ When compass-recipes installed, you just need to require the compass plugin in your project
18
+
19
+ require 'compass-recipes'
20
+
21
+ Then you can include some recipes like this
22
+
23
+ @import "recipes/shape/triangle";
24
+ .my-triangle
25
+ {
26
+ @include triangle;
27
+ }
28
+
29
+ Like Compass does, you can include all recipes in a folder like this
30
+
31
+ @import "recipes/shape";
32
+
33
+ .my-triangle
34
+ {
35
+ @include triangle;
36
+ }
37
+
38
+ .my-square
39
+ {
40
+ @include square;
41
+ }
15
42
 
16
43
  ## Author
17
44
 
18
45
  Compass-Recipes is maintained by Maxime Thirouin, a front-end web developer working for Shopbot-inc.com
19
46
 
20
47
  ## Open to All
21
- Anyone who forks this project and submits a patch and pull request will be given commit access after the first patch is accepted.
48
+ Fork, modify, push, submit pull request ! That's easy !
49
+
50
+ *I'm not a Ruby coder, so anyone which want to help me for anything will be appreciated !*
51
+
52
+ ## Thanks (indirect contributors)
53
+
54
+ This project will never exists without these people : @necolas, @simurai, @chriscoyier
55
+ They give me inspiration (and snippets of code!).
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -1,2 +1,2 @@
1
- @import "shadow/drop";
2
- @import "shadow/top-edge";
1
+ @import "recipes/shadow/drop";
2
+ @import "recipes/shadow/top-edge";
@@ -1,9 +1,11 @@
1
1
  /**
2
- * Bundles of shapes
3
- *
4
- * @todo all other shapes that are not here !
5
- *
6
- * @thanks Chris Coyier
7
- * @link http://css-tricks.com/examples/ShapesOfCSS/
8
- */
9
- @import "recipes/shape/triangle";
2
+ * Shapes !
3
+ * Polygons, ellipses and symbols
4
+ *
5
+ * @thanks Chris Coyier @chriscoyier
6
+ * @link http://css-tricks.com/examples/ShapesOfCSS/
7
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
8
+ */
9
+ @import "recipes/shape/ellipse";
10
+ @import "recipes/shape/polygon";
11
+ @import "recipes/shape/symbol";
@@ -5,7 +5,7 @@
5
5
  * IE8 is not supported because it not render properly box-shadow and
6
6
  * pseudo element should be selected with ::element and not :element
7
7
  *
8
- * @thanks to Nicolas Gallagher
8
+ * @thanks Nicolas Gallagher @necolas
9
9
  * @link http://nicolasgallagher.com/pure-css-folded-corner-effect/demo/
10
10
  */
11
11
 
@@ -1,25 +1,24 @@
1
+ /**
2
+ * Form element inline mixin
3
+ * This mixin allow you to have a label inline with your input
4
+ * It's simply based on inline-block behavior
5
+ *
6
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
7
+ */
1
8
  @mixin form-element-inline($label-width: 8em, $input-width: 20em)
2
9
  {
3
10
  label
4
11
  {
5
12
  display: inline-block;
6
13
  width: $label-width;
7
-
8
- // we use valign top for label + textarea
9
- vertical-align: top;
10
-
11
- // so we add a padding top to make the label no valigned on top of the input
12
- padding-top: .4em;
14
+
15
+ vertical-align: middle;
13
16
  }
14
17
 
15
18
  input,
16
19
  textarea
17
20
  {
18
21
  width: $input-width;
19
- }
20
-
21
- textarea
22
- {
23
- height: 50px;
22
+ vertical-align: middle;
24
23
  }
25
24
  }
@@ -13,13 +13,16 @@
13
13
  * HTML
14
14
  * <body>
15
15
  * <div class="v-align-container">
16
- * <div class="v-align-container">
17
- * <div class="v-align-container">
16
+ * <div class="v-align-content-container">
17
+ * <div class="v-align-content">
18
18
  * Your content !
19
19
  * </div>
20
20
  * </div>
21
21
  * </div>
22
22
  * </body>
23
+ *
24
+ * @thanks Chris Coyier @chriscoyier
25
+ * @autor Maxime Thirouin maxime.thirouin@gmail.com @MoOx
23
26
  */
24
27
 
25
28
  @mixin vertical-align-requirement
@@ -27,7 +30,9 @@
27
30
  html,
28
31
  body
29
32
  {
30
- height:100%
33
+ height:100%;
34
+ margin: 0;
35
+ padding: 0;
31
36
  }
32
37
  }
33
38
 
@@ -1,9 +1,15 @@
1
1
  /**
2
2
  * Drop shadow mixins from Nicolas Gallagher demo
3
3
  *
4
- * Thanks to him (@necolas), @simurai, @cameronmoll and @matthamm
4
+ * @thanks Nicolas Gallagher @necolas, @simurai, @cameronmoll, @matthamm
5
5
  *
6
6
  * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
7
7
  */
8
8
 
9
- @import "recipes/shadow/drop/lifted";
9
+ @import "recipes/shadow/drop/curled-corners";
10
+ @import "recipes/shadow/drop/curved";
11
+ //@import "recipes/shadow/drop/flying"; // not ready yet
12
+ @import "recipes/shadow/drop/lifted-corners";
13
+ @import "recipes/shadow/drop/perspective";
14
+ @import "recipes/shadow/drop/raised";
15
+ @import "recipes/shadow/drop/transform-requirement";
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Drop shadow curled
3
+ *
4
+ * @thanks Nicolas Gallagher @necolas
5
+ * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
6
+ */
7
+ @mixin drop-shadow-curled-corners($border-radius: 0 0 120px 120px / 0 0 6px 6px, $box-shadow: 0 8px 12px rgba(#000, .5), $skew: 8deg, $rotate: 3deg, $distance: 10px)
8
+ {
9
+ position: relative;
10
+ @include border-radius($border-radius);
11
+
12
+ &:before,
13
+ &:after
14
+ {
15
+ content: "";
16
+ position: absolute;
17
+ z-index: -2;
18
+
19
+ bottom: $distance*1.2;
20
+
21
+ width: 50%;
22
+ height: 55%;
23
+ @include box-shadow($box-shadow);
24
+ }
25
+
26
+ &:before
27
+ {
28
+ left: $distance;
29
+ @include transform(skew(-$skew) rotate(-$rotate));
30
+ }
31
+
32
+ &:after
33
+ {
34
+ right: $distance;
35
+ @include transform(skew($skew) rotate($rotate));
36
+ }
37
+ }
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Drop shadow curved
3
+ *
4
+ * @thanks Nicolas Gallagher @necolas
5
+ * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
6
+ */
7
+ @mixin drop-shadow-curved($side: 'vertical', $distance: 10px, $box-shadow: 0 0 15px rgba(#000, .6), $radius-1: 10px, $radius-2: 100px)
8
+ {
9
+ position: relative;
10
+
11
+ // vertical by default
12
+ //@if ($side == 'vertical')
13
+ //{
14
+ $top: $distance;
15
+ $bottom: $distance;
16
+ $left: 0;
17
+ $right: 0;
18
+ $border-radius-1: $radius-1;
19
+ $border-radius-2: $radius-2;
20
+ //}
21
+ @if ($side == 'left')
22
+ {
23
+ $right: 50%;
24
+
25
+ }
26
+ @elseif($side == 'right')
27
+ {
28
+ $left: 50%;
29
+ }
30
+
31
+ @elseif ($side == 'horizontal')
32
+ {
33
+ $top:0;
34
+ $bottom:0;
35
+ $left: $distance;
36
+ $right: $distance;
37
+ $border-radius-1: $radius-2;
38
+ $border-radius-2: $radius-1;
39
+ }
40
+ @elseif ($side == 'top')
41
+ {
42
+ $top: 0;
43
+ $bottom: 50%;
44
+ $left: $distance;
45
+ $right: $distance;
46
+ $border-radius-1: $radius-2;
47
+ $border-radius-2: $radius-1;
48
+ }
49
+ @elseif ($side == 'bottom')
50
+ {
51
+ $top: 50%;
52
+ $bottom: 0;
53
+ $left: $distance;
54
+ $right: $distance;
55
+ $border-radius-1: $radius-2;
56
+ $border-radius-2: $radius-1;
57
+ }
58
+
59
+ &:before
60
+ {
61
+ content: "";
62
+ position: absolute;
63
+ z-index: -2;
64
+
65
+ top: $top;
66
+ bottom: $bottom;
67
+ left: $left;
68
+ right: $right;
69
+ @include box-shadow($box-shadow);
70
+ @include border-radius($border-radius-1 / $border-radius-2);
71
+ }
72
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Drop shadow flying
3
+ *
4
+ * @thanks Geoffrey Crofte @geoffrey_crofte
5
+ * @link http://www.creativejuiz.fr/trytotry/css3-box-shadow-after-before/
6
+ */
7
+ @mixin drop-shadow-flying($box-shadow-radius: 10px, $color: #000)
8
+ {
9
+ position: relative;
10
+
11
+ &:before,
12
+ &:after
13
+ {
14
+ content: " ";
15
+ position: absolute;
16
+ z-index: -2;
17
+
18
+ bottom: -1em;
19
+ }
20
+
21
+ &:before
22
+ {
23
+ left: 0;
24
+ width: 100%;
25
+ height: 4%;
26
+ background: #AAA;
27
+ @include border-radius(140px / 2px);
28
+ @include box-shadow(0 0 $box-shadow-radius/2 rgba(#000, .2), 0 0 $box-shadow-radius rgba(#000, .3), 0 0 $box-shadow-radius*1.5 rgba(#000, .4));
29
+ }
30
+
31
+ &:after
32
+ {
33
+ $height: .15em;
34
+
35
+ left: 5%;
36
+ width: 90%;
37
+ height: $height;
38
+ background: rgba(#000, .2);
39
+ @include border-radius(125px / 1px);
40
+ @include box-shadow(0 #{-$height} $box-shadow-radius/2 rgba(#000, .3), 0 #{-$height} $box-shadow-radius*.8 rgba(#000, .2), 0 #{-$height} $box-shadow-radius/2 rgba(#000, .1));
41
+ }
42
+ }
@@ -1,20 +1,12 @@
1
1
  /**
2
- * Drop shadow mixins from Nicolas Gallagher demo
3
- *
2
+ * Drop shadow w/ lifted corners
3
+ *
4
+ * @thanks Nicolas Gallagher @necolas
4
5
  * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
5
6
  */
6
- @mixin drop-shadow-lifted($height: 15px, $margin: 10px, $angle: 3deg)
7
+ @mixin drop-shadow-lifted-corners($height: 15px, $margin: 10px, $angle: 4deg, $color: rgba(#000, .7))
7
8
  {
8
- & > :last-child::before
9
- {
10
- content:"";
11
- position: absolute;
12
- z-index: -1;
13
- top: 0;
14
- bottom: 0;
15
- left: 0;
16
- right: 0;
17
- }
9
+ position: relative;
18
10
 
19
11
  &::before,
20
12
  &::after
@@ -24,19 +16,23 @@
24
16
  z-index: -2;
25
17
 
26
18
  bottom: $height;
27
- left: $margin;
19
+
28
20
  width: 50%;
29
21
  height: 20%;
30
22
 
31
- @include box-shadow(0 $height 10px rgba(0, 0, 0, .7));
23
+ @include box-shadow(0 $height $margin $color);
24
+
25
+ }
26
+
27
+ &::before
28
+ {
29
+ left: $margin;
32
30
  @include transform(rotate(-$angle));
33
31
  }
34
32
 
35
33
  &::after
36
34
  {
37
35
  right: $margin;
38
- left: auto;
39
-
40
36
  @include transform(rotate($angle));
41
37
  }
42
38
  }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Drop shadow w/ perspective
3
+ *
4
+ * @thanks Nicolas Gallagher @necolas
5
+ * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
6
+ */
7
+ @mixin drop-shadow-perspective($skew: 50deg, $distance-x: 80px, $distance-y: 5px, $box-shadow-radius: 8px, $color: rgba(#000, .4))
8
+ {
9
+ position: relative;
10
+
11
+ &:before
12
+ {
13
+ content:"";
14
+ position:absolute;
15
+ z-index:-2;
16
+
17
+ left: $distance-x;
18
+ bottom: $distance-y;
19
+ width: 50%;
20
+ height: 35%;
21
+
22
+ @include box-shadow(-$distance-x 0 $box-shadow-radius $color);
23
+ @include transform(skew($skew));
24
+ @include transform-origin(0 100%);
25
+ }
26
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Drop shadow raised
3
+ *
4
+ * @thanks Nicolas Gallagher @necolas
5
+ * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
6
+ */
7
+ @mixin drop-shadow-raised($height: 10px, $color: #000)
8
+ {
9
+ @include box-shadow(
10
+ 0 $height*1.5 $height #{-$height} rgba($color, .5),
11
+ 0 $height/10 $height*.4 rgba($color, .3)
12
+ );
13
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Drop shadow rules required for transform on drop shadow
3
+ *
4
+ * /!\ This is required is you want to apply some transform on the element using drop shadow
5
+ *
6
+ * @thanks Nicolas Gallagher @necolas
7
+ * @link http://nicolasgallagher.com/css-drop-shadows-without-images/demo/
8
+ */
9
+ @mixin drop-shadow-transform-requirement($background: #fff)
10
+ {
11
+ & > :last-child::before
12
+ {
13
+ content: "";
14
+ position: absolute;
15
+ z-index: -1;
16
+ top: 0;
17
+ bottom: 0;
18
+ left: 0;
19
+ right: 0;
20
+ background: $background;
21
+ }
22
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Shape/Ellipse
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @import "compass/css3/border-radius";
7
+
8
+ @mixin ellipse($width: 200px, $height: 100px)
9
+ {
10
+ width: $width;
11
+ height: $height;
12
+
13
+ @if ($width == $height) {
14
+ @include border-radius($width/2);
15
+ }
16
+ @else {
17
+ @include border-radius($width/2, $height/2);
18
+ }
19
+ }
20
+
21
+ @mixin circle($width: 100px)
22
+ {
23
+ @include ellipse($width, $width);
24
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Shape/Polygon
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @import "recipes/shape/polygon/hexagon";
7
+ @import "recipes/shape/polygon/octagon";
8
+ @import "recipes/shape/polygon/parallelogram";
9
+ @import "recipes/shape/polygon/pentagon";
10
+ @import "recipes/shape/polygon/rectangle";
11
+ @import "recipes/shape/polygon/square";
12
+ @import "recipes/shape/polygon/star";
13
+ @import "recipes/shape/polygon/trapezoid";
14
+ @import "recipes/shape/polygon/triangle";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shape/Symbol
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @import "recipes/shape/symbol/heart";
7
+ @import "recipes/shape/symbol/infinity";
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Shape/Polygon/Hexagon
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @mixin hexagon($width: 100px, $height: 55px, $background-color: transparent)
7
+ {
8
+ width: $width;
9
+ height: $height/2;
10
+ background-color: $background-color;
11
+ position: relative;
12
+
13
+ &:before,
14
+ &:after
15
+ {
16
+ content: "";
17
+ position: absolute;
18
+ width: 0;
19
+ height: 0;
20
+
21
+ left: 0;
22
+
23
+ border-left: $width/2 solid transparent;
24
+ border-right: $width/2 solid transparent;
25
+ }
26
+
27
+ &:before
28
+ {
29
+ top: -$width/4;
30
+ border-bottom: $width/4 solid $background-color;
31
+ }
32
+
33
+ &:after
34
+ {
35
+ bottom: -$width/4;
36
+ border-top: $width/4 solid $background-color;
37
+ }
38
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Shape/Polygon/Octagon
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+
7
+ //Don't ask me when the coefficient cames from... I just compute then from original code by @chriscoyier
8
+ @mixin octagon($width: 100px, $height: 100px, $background-color: transparent)
9
+ {
10
+ width: $width;
11
+ height: $height*0.42;
12
+ background: $background-color;
13
+ position: relative;
14
+
15
+ &:before,
16
+ &:after
17
+ {
18
+ content: "";
19
+ position: absolute;
20
+ left: 0;
21
+
22
+ width: $width*0.42;
23
+ height: 0;
24
+
25
+ border-left: $width*0.29 solid transparent;
26
+ border-right: $width*0.29 solid transparent;
27
+
28
+ }
29
+
30
+ &:before
31
+ {
32
+ top: -$height*0.29;
33
+ border-bottom: $height*0.29 solid $background-color;
34
+ }
35
+
36
+ &:after
37
+ {
38
+ bottom: -$height*0.29;
39
+ border-top: $height*0.29 solid $background-color;
40
+ }
41
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Shape/Polygon/Parallelogram
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+
7
+ @import "compass/css3/transform";
8
+
9
+ @mixin parallelogram($width: 150px, $height: 100px, $skew: 20deg, $background: transparent)
10
+ {
11
+ width: $width;
12
+ height: $height;
13
+ @include transform(skew($skew));
14
+ background: $background;
15
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Shape/Polygon/Pentagon
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @mixin pentagon($width: 100px, $height: 100px, $background-color: transparent)
7
+ {
8
+ position: relative;
9
+ width: $width*0.54;
10
+ border-width: $height*0.5 $width*0.18 0;
11
+ border-style: solid;
12
+ border-color: $background-color transparent;
13
+
14
+ &:before
15
+ {
16
+ content: "";
17
+ position: absolute;
18
+ height: 0;
19
+ width: 0;
20
+ top: -$height*0.85;
21
+ left: -$width*0.18;
22
+ border-width: 0 $width*0.45 $height*0.35;
23
+ border-style: solid;
24
+ border-color: transparent transparent $background-color;
25
+ }
26
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Shape/Polygon/Rectangle
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @mixin rectangle($width: 100px, $height: 100px, $background: transparent)
7
+ {
8
+ width: $width;
9
+ height: $height;
10
+ background: $background;
11
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Shape/Polygon/Square
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @mixin square($width: 100px, $background: transparent)
7
+ {
8
+ width: $width;
9
+ height: $width;
10
+ background: $background;
11
+ }
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Shape/Polygon/Star
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+
7
+ // Star (6-points)
8
+ @mixin star-6($width: $width, $background-color: transparent)
9
+ {
10
+ width: 0;
11
+ height: 0;
12
+ border-left: $width/2 solid transparent;
13
+ border-right: $width/2 solid transparent;
14
+ border-bottom: $width solid $background-color;
15
+ position: relative;
16
+
17
+ &:after
18
+ {
19
+ content: "";
20
+ position: absolute;
21
+ width: 0;
22
+ height: 0;
23
+
24
+ border-left: $width/2 solid transparent;
25
+ border-right: $width/2 solid transparent;
26
+ border-top: $width solid $background-color;
27
+
28
+ top: $width*0.3;
29
+ left: -$width/2;
30
+ }
31
+ }
32
+
33
+ // Star (5-points)
34
+ @mixin star-5($width: $width, $background-color: transparent)
35
+ {
36
+ margin: $width/2 0;
37
+ position: relative;
38
+ display: block;
39
+ width: 0;
40
+ height: 0;
41
+
42
+ border-right: $width solid transparent;
43
+ border-bottom: $width*0.7 solid $background-color;
44
+ border-left: $width solid transparent;
45
+ @include transform(rotate(35deg));
46
+
47
+ &:before,
48
+ &:after
49
+ {
50
+ content: '';
51
+ position: absolute;
52
+ display: block;
53
+ width: 0;
54
+ height: 0;
55
+ }
56
+
57
+ &:before
58
+ {
59
+ top: -$width*0.45;
60
+ left: -$width*0.65;
61
+ border-bottom: $width*0.8 solid $background-color;
62
+ border-left: $width*0.3 solid transparent;
63
+ border-right: $width*0.3 solid transparent;
64
+ @include transform(rotate(-35deg));
65
+ }
66
+
67
+ &:after
68
+ {
69
+ top: $width*0.03;
70
+ left: -$width*1.05;
71
+ border-right: $width solid transparent;
72
+ border-bottom: $width*0.7 solid $background-color;
73
+ border-left: $width solid transparent;
74
+ @include transform(rotate(-70deg));
75
+ }
76
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Shape/Polygon/Trapezoid
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @mixin trapezoid($width: 100px, $height: 100px, $background-color: transparent)
7
+ {
8
+ border-bottom: $height solid $background-color;
9
+ border-left: $width/2 solid transparent;
10
+ border-right: $width/2 solid transparent;
11
+ height: 0;
12
+ width: $width;
13
+ }
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Shape/Polygon/Triangle
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
1
6
  @mixin triangle($direction: top, $width: 1em, $height: 0, $color: #000)
2
7
  {
3
8
  @if ($height == 0)
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Shape/Symbol/Heart
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @mixin heart($width: 100px, $height: 90px, $background-color: transparent)
7
+ {
8
+ position: relative;
9
+ width: $width;
10
+ height: $height;
11
+
12
+ &:before,
13
+ &:after
14
+ {
15
+ position: absolute;
16
+ content: "";
17
+ top: 0;
18
+ width: $width/2;
19
+ height: $height;
20
+ background: $background-color;
21
+ @include border-radius($height/2 $height/2 0 0);
22
+ }
23
+
24
+ &:before
25
+ {
26
+ left: $width/2;
27
+ @include transform(rotate(-45deg));
28
+ @include transform-origin(0%, 100%);
29
+ }
30
+
31
+ &:after
32
+ {
33
+ left: 0;
34
+ @include transform(rotate(45deg));
35
+ @include transform-origin(100%, 100%);
36
+ }
37
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Shape/Symbol/Infinity
3
+ *
4
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
5
+ */
6
+ @mixin infinity($width: 212px, $height: 100px, $background-color: transparent)
7
+ {
8
+ $coefficient: 2.12;
9
+ @if $width == false
10
+ {
11
+ $width : $height*$coefficient;
12
+ }
13
+ @if $height == false
14
+ {
15
+ $height : $width/$coefficient;
16
+ }
17
+ position: relative;
18
+ width: $width;
19
+ height: $height;
20
+
21
+ &:before,
22
+ &:after
23
+ {
24
+ content: "";
25
+ position: absolute;
26
+ top: 0;
27
+
28
+ width: $height*.6;
29
+ height: $height*.6;
30
+ border: $height*.2 solid $background-color;
31
+ }
32
+ $radius: $height/2;
33
+ &:before
34
+ {
35
+ left: 0;
36
+ @include border-radius($radius $radius 0 $radius);
37
+ @include transform(rotate(-45deg));
38
+ }
39
+
40
+ &:after
41
+ {
42
+ right: 0;
43
+ @include border-radius($radius $radius $radius 0);
44
+ @include transform(rotate(45deg));
45
+ }
46
+ }
@@ -4,6 +4,7 @@
4
4
  * The clearfix hack is a popular way to clear floats without resorting to using presentational markup. This article presents an update to the clearfix method that further reduces the amount of CSS required.
5
5
  * Known support: Firefox 2+, Safari 2+, Chrome, Opera 9.27+, IE 6+, IE Mac.
6
6
  *
7
+ * @thanks Nicolas Gallagher @necolas
7
8
  * @link http://nicolasgallagher.com/micro-clearfix-hack/
8
9
  */
9
10
  @mixin clearfix
@@ -1,6 +1,25 @@
1
+ /**
2
+ * @author Maxime Thirouin maxime.thirouin@gmail.com @MoOx
3
+ */
4
+ @mixin ui-gradient($color: #ddd, $lighten-top: 10%, $darken-bottom: 10%)
5
+ {
6
+ @include ui-gradient-from-middle($color, $lighten-top, $darken-bottom);
7
+ }
8
+
1
9
  @mixin ui-gradient-from-middle($color: #ddd, $lighten-top: 10%, $darken-bottom: 10%)
2
10
  {
3
- // fallback
4
11
  background: $color;
5
12
  @include background(linear-gradient(lighten($color, $lighten-top), darken($color, $darken-bottom)));
6
13
  }
14
+
15
+ @mixin ui-gradient-from-top($color: #ddd, $darken-bottom: 20%)
16
+ {
17
+ background: $color;
18
+ @include background(linear-gradient($color, darken($color, $darken-bottom)));
19
+ }
20
+
21
+ @mixin ui-gradient-from-bottom($color: #ddd, $lighten-top: 20%)
22
+ {
23
+ background: $color;
24
+ @include background(linear-gradient(lighten($color, $lighten-top), $color));
25
+ }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compass-recipes
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
8
+ - 2
9
9
  - 0
10
- version: 0.1.0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Maxime Thirouin
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-01 00:00:00 +02:00
19
- default_executable:
18
+ date: 2011-07-12 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: compass
@@ -26,12 +25,12 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 49
28
+ hash: 57
30
29
  segments:
31
30
  - 0
32
31
  - 11
33
- - 1
34
- version: 0.11.1
32
+ - 5
33
+ version: 0.11.5
35
34
  type: :runtime
36
35
  version_requirements: *id001
37
36
  description: "A Compass extension to have some sass/compass recipes ready to use ! "
@@ -62,15 +61,32 @@ files:
62
61
  - stylesheets/recipes/enhancement/_corner-folded.scss
63
62
  - stylesheets/recipes/form/_element.scss
64
63
  - stylesheets/recipes/form/_skin.scss
65
- - stylesheets/recipes/form/element/_border-color.scss
66
64
  - stylesheets/recipes/form/element/_inline.scss
67
- - stylesheets/recipes/form/skin/_default.scss
68
65
  - stylesheets/recipes/form/skin/_natural.scss
69
66
  - stylesheets/recipes/layout/_vertical-align.scss
70
67
  - stylesheets/recipes/shadow/_drop.scss
71
68
  - stylesheets/recipes/shadow/_top-edge.scss
72
- - stylesheets/recipes/shadow/drop/_lifted.scss
73
- - stylesheets/recipes/shape/_triangle.scss
69
+ - stylesheets/recipes/shadow/drop/_curled-corners.scss
70
+ - stylesheets/recipes/shadow/drop/_curved.scss
71
+ - stylesheets/recipes/shadow/drop/_flying.scss
72
+ - stylesheets/recipes/shadow/drop/_lifted-corners.scss
73
+ - stylesheets/recipes/shadow/drop/_perspective.scss
74
+ - stylesheets/recipes/shadow/drop/_raised.scss
75
+ - stylesheets/recipes/shadow/drop/_transform-requirement.scss
76
+ - stylesheets/recipes/shape/_ellipse.scss
77
+ - stylesheets/recipes/shape/_polygon.scss
78
+ - stylesheets/recipes/shape/_symbol.scss
79
+ - stylesheets/recipes/shape/polygon/_hexagon.scss
80
+ - stylesheets/recipes/shape/polygon/_octagon.scss
81
+ - stylesheets/recipes/shape/polygon/_parallelogram.scss
82
+ - stylesheets/recipes/shape/polygon/_pentagon.scss
83
+ - stylesheets/recipes/shape/polygon/_rectangle.scss
84
+ - stylesheets/recipes/shape/polygon/_square.scss
85
+ - stylesheets/recipes/shape/polygon/_star.scss
86
+ - stylesheets/recipes/shape/polygon/_trapezoid.scss
87
+ - stylesheets/recipes/shape/polygon/_triangle.scss
88
+ - stylesheets/recipes/shape/symbol/_heart.scss
89
+ - stylesheets/recipes/shape/symbol/_infinity.scss
74
90
  - stylesheets/recipes/shared/_block-inline-block.scss
75
91
  - stylesheets/recipes/shared/_clearfix.scss
76
92
  - stylesheets/recipes/shared/_list-inline-block.scss
@@ -80,8 +96,7 @@ files:
80
96
  - stylesheets/recipes/ui/_gradient.scss
81
97
  - stylesheets/recipes/ui/_menu-dropdown.scss
82
98
  - stylesheets/recipes/ui/border/_bevel.scss
83
- has_rdoc: true
84
- homepage: http://moox.github.com/Compass-Recipes
99
+ homepage: http://moox.github.com/compass-recipes
85
100
  licenses: []
86
101
 
87
102
  post_install_message:
@@ -110,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
125
  requirements: []
111
126
 
112
127
  rubyforge_project: compass-recipes
113
- rubygems_version: 1.6.2
128
+ rubygems_version: 1.8.5
114
129
  signing_key:
115
130
  specification_version: 3
116
131
  summary: Recipes for Compass
@@ -1,53 +0,0 @@
1
- @import "recipes/ui/border/bevel";
2
-
3
-
4
- @mixin fancyElement($border-color: #006ea9, $border-color-active: #ffa43e, $line-height: 24px, $border-width: 1px, $border-width-active: 3px)
5
- {
6
- color: #515151;
7
- font-size: 12px;
8
-
9
- line-height: $line-height;
10
- height: $line-height;
11
- outline: $border-width solid $border-color;
12
- border: $border-width-active - $border-width solid transparent;
13
-
14
- &:focus
15
- {
16
- outline: $border-width solid $border-color-active;
17
- @include fancyInputBorder($border-width-active - $border-width, $border-color-active);
18
- }
19
- }
20
-
21
- @mixin fancyInput($border-color: #006ea9, $border-color-active: #ffa43e, $line-height: 24px, $border-width: 1px, $border-width-active: 3px)
22
- {
23
-
24
- background: -webkit-gradient(linear, left top, left 25%, from(#ebebeb), to(#fff) );
25
- background: -moz-linear-gradient(top, #ebebeb, #fff .25em);
26
- background: linear-gradient(top, #fff, #ebebeb, #fff .25em);
27
- }
28
-
29
- @mixin fancyForm($border-color: #006ea9, $border-color-active: #ffa43e, $line-height: 24px, $border-width: 1px, $border-width-active: 3px)
30
- {
31
- input,
32
- textarea,
33
- select
34
- {
35
- @include fancyElement($border-color, $border-color-active, $line-height, $border-width, $border-width-active);
36
- }
37
-
38
- input,
39
- textarea
40
- {
41
- @include fancyInput($border-color, $border-color-active, $line-height, $border-width, $border-width-active);
42
- }
43
-
44
- button
45
- {
46
- @extend .button-blue;
47
-
48
- &:hover
49
- {
50
- @extend .button-orange;
51
- }
52
- }
53
- }
File without changes