simple-compass 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. data/.gitignore +2 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +26 -0
  5. data/Rakefile +8 -0
  6. data/lib/simple-compass.rb +17 -0
  7. data/lib/simple-compass/sass/functions/display.rb +27 -0
  8. data/lib/simple-compass/sass/functions/lists.rb +101 -0
  9. data/lib/simple-compass/sass/functions/selectors.rb +64 -0
  10. data/lib/simple-compass/sass/functions/sprites.rb +218 -0
  11. data/lib/simple-compass/version.rb +3 -0
  12. data/sass/compass.scss +1 -0
  13. data/sass/compass/_css3.scss +20 -0
  14. data/sass/compass/_layout.scss +3 -0
  15. data/sass/compass/_reset-legacy.scss +3 -0
  16. data/sass/compass/_reset.scss +3 -0
  17. data/sass/compass/_support.scss +40 -0
  18. data/sass/compass/_typography.scss +4 -0
  19. data/sass/compass/_utilities.scss +9 -0
  20. data/sass/compass/css3/_appearance.scss +17 -0
  21. data/sass/compass/css3/_background-clip.scss +43 -0
  22. data/sass/compass/css3/_background-origin.scss +42 -0
  23. data/sass/compass/css3/_background-size.scss +26 -0
  24. data/sass/compass/css3/_border-radius.scss +130 -0
  25. data/sass/compass/css3/_box-shadow.scss +76 -0
  26. data/sass/compass/css3/_box-sizing.scss +13 -0
  27. data/sass/compass/css3/_box.scss +111 -0
  28. data/sass/compass/css3/_columns.scss +157 -0
  29. data/sass/compass/css3/_filter.scss +23 -0
  30. data/sass/compass/css3/_font-face.scss +48 -0
  31. data/sass/compass/css3/_hyphenation.scss +77 -0
  32. data/sass/compass/css3/_images.scss +132 -0
  33. data/sass/compass/css3/_inline-block.scss +22 -0
  34. data/sass/compass/css3/_opacity.scss +19 -0
  35. data/sass/compass/css3/_pie.scss +73 -0
  36. data/sass/compass/css3/_regions.scss +22 -0
  37. data/sass/compass/css3/_shared.scss +38 -0
  38. data/sass/compass/css3/_text-shadow.scss +87 -0
  39. data/sass/compass/css3/_transform-legacy.scss +87 -0
  40. data/sass/compass/css3/_transform.scss +598 -0
  41. data/sass/compass/css3/_transition.scss +221 -0
  42. data/sass/compass/css3/_user-interface.scss +17 -0
  43. data/sass/compass/layout/_grid-background.scss +178 -0
  44. data/sass/compass/layout/_sticky-footer.scss +23 -0
  45. data/sass/compass/layout/_stretching.scss +24 -0
  46. data/sass/compass/reset/_utilities-legacy.scss +135 -0
  47. data/sass/compass/reset/_utilities.scss +142 -0
  48. data/sass/compass/typography/_links.scss +3 -0
  49. data/sass/compass/typography/_lists.scss +4 -0
  50. data/sass/compass/typography/_text.scss +4 -0
  51. data/sass/compass/typography/_vertical_rhythm.scss +221 -0
  52. data/sass/compass/typography/links/_hover-link.scss +5 -0
  53. data/sass/compass/typography/links/_link-colors.scss +28 -0
  54. data/sass/compass/typography/links/_unstyled-link.scss +7 -0
  55. data/sass/compass/typography/lists/_bullets.scss +34 -0
  56. data/sass/compass/typography/lists/_horizontal-list.scss +61 -0
  57. data/sass/compass/typography/lists/_inline-block-list.scss +50 -0
  58. data/sass/compass/typography/lists/_inline-list.scss +44 -0
  59. data/sass/compass/typography/text/_ellipsis.scss +25 -0
  60. data/sass/compass/typography/text/_force-wrap.scss +12 -0
  61. data/sass/compass/typography/text/_nowrap.scss +2 -0
  62. data/sass/compass/typography/text/_replacement.scss +68 -0
  63. data/sass/compass/utilities/_color.scss +1 -0
  64. data/sass/compass/utilities/_general.scss +6 -0
  65. data/sass/compass/utilities/_links.scss +5 -0
  66. data/sass/compass/utilities/_lists.scss +6 -0
  67. data/sass/compass/utilities/_print.scss +17 -0
  68. data/sass/compass/utilities/_sprites.scss +2 -0
  69. data/sass/compass/utilities/_tables.scss +3 -0
  70. data/sass/compass/utilities/_text.scss +5 -0
  71. data/sass/compass/utilities/color/_contrast.scss +28 -0
  72. data/sass/compass/utilities/general/_clearfix.scss +44 -0
  73. data/sass/compass/utilities/general/_float.scss +30 -0
  74. data/sass/compass/utilities/general/_hacks.scss +46 -0
  75. data/sass/compass/utilities/general/_min.scss +16 -0
  76. data/sass/compass/utilities/general/_reset.scss +2 -0
  77. data/sass/compass/utilities/general/_tabs.scss +1 -0
  78. data/sass/compass/utilities/general/_tag-cloud.scss +18 -0
  79. data/sass/compass/utilities/links/_hover-link.scss +3 -0
  80. data/sass/compass/utilities/links/_link-colors.scss +3 -0
  81. data/sass/compass/utilities/links/_unstyled-link.scss +3 -0
  82. data/sass/compass/utilities/lists/_bullets.scss +3 -0
  83. data/sass/compass/utilities/lists/_horizontal-list.scss +3 -0
  84. data/sass/compass/utilities/lists/_inline-block-list.scss +3 -0
  85. data/sass/compass/utilities/lists/_inline-list.scss +3 -0
  86. data/sass/compass/utilities/sprites/_base.scss +66 -0
  87. data/sass/compass/utilities/sprites/_sprite-img.scss +79 -0
  88. data/sass/compass/utilities/tables/_alternating-rows-and-columns.scss +22 -0
  89. data/sass/compass/utilities/tables/_borders.scss +33 -0
  90. data/sass/compass/utilities/tables/_scaffolding.scss +9 -0
  91. data/sass/compass/utilities/text/_ellipsis.scss +3 -0
  92. data/sass/compass/utilities/text/_nowrap.scss +3 -0
  93. data/sass/compass/utilities/text/_replacement.scss +3 -0
  94. data/simple-compass.gemspec +21 -0
  95. data/spec/fixtures/headings_test.sass +2 -0
  96. data/spec/fixtures/opacity_test.sass +7 -0
  97. data/spec/fixtures/reset_test.sass +1 -0
  98. data/spec/headings_spec.rb +9 -0
  99. data/spec/opacity_spec.rb +9 -0
  100. data/spec/reset_spec.rb +9 -0
  101. data/spec/spec_helper.rb +7 -0
  102. metadata +169 -0
@@ -0,0 +1,3 @@
1
+ module Compass
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1 @@
1
+ @import "compass/css3";
@@ -0,0 +1,20 @@
1
+ @import "css3/border-radius";
2
+ @import "css3/inline-block";
3
+ @import "css3/opacity";
4
+ @import "css3/box-shadow";
5
+ @import "css3/text-shadow";
6
+ @import "css3/columns";
7
+ @import "css3/box-sizing";
8
+ @import "css3/box";
9
+ @import "css3/images";
10
+ @import "css3/background-clip";
11
+ @import "css3/background-origin";
12
+ @import "css3/background-size";
13
+ @import "css3/font-face";
14
+ @import "css3/transform";
15
+ @import "css3/transition";
16
+ @import "css3/appearance";
17
+ @import "css3/regions";
18
+ @import "css3/hyphenation";
19
+ @import "css3/filter";
20
+ @import "css3/user-interface";
@@ -0,0 +1,3 @@
1
+ @import "layout/grid-background";
2
+ @import "layout/sticky-footer";
3
+ @import "layout/stretching";
@@ -0,0 +1,3 @@
1
+ @import "reset/utilities-legacy";
2
+
3
+ @include global-reset;
@@ -0,0 +1,3 @@
1
+ @import "reset/utilities";
2
+
3
+ @include global-reset;
@@ -0,0 +1,40 @@
1
+ // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
2
+ $legacy-support-for-ie: true !default;
3
+
4
+ // Setting this to false will result in smaller output, but no support for ie6 hacks
5
+ $legacy-support-for-ie6: $legacy-support-for-ie !default;
6
+
7
+ // Setting this to false will result in smaller output, but no support for ie7 hacks
8
+ $legacy-support-for-ie7: $legacy-support-for-ie !default;
9
+
10
+ // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
11
+ $legacy-support-for-ie8: $legacy-support-for-ie !default;
12
+
13
+ // @private
14
+ // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
15
+ // But in case the user set each of those explicitly, we need to sync the value of
16
+ // this combined variable.
17
+ $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
18
+
19
+ // Whether to output legacy support for mozilla.
20
+ // Usually this means hacks to support Firefox 3.6 or earlier.
21
+ $legacy-support-for-mozilla: true;
22
+
23
+ // Support for mozilla in experimental css3 properties (-moz).
24
+ $experimental-support-for-mozilla : true !default;
25
+ // Support for webkit in experimental css3 properties (-webkit).
26
+ $experimental-support-for-webkit : true !default;
27
+ // Support for webkit's original (non-standard) gradient syntax.
28
+ $support-for-original-webkit-gradients : true !default;
29
+ // Support for opera in experimental css3 properties (-o).
30
+ $experimental-support-for-opera : true !default;
31
+ // Support for microsoft in experimental css3 properties (-ms).
32
+ $experimental-support-for-microsoft : true !default;
33
+ // Support for khtml in experimental css3 properties (-khtml).
34
+ $experimental-support-for-khtml : false !default;
35
+ // Support for svg in experimental css3 properties.
36
+ // Setting this to true might add significant size to your
37
+ // generated stylesheets.
38
+ $experimental-support-for-svg : false !default;
39
+ // Support for CSS PIE in experimental css3 properties (-pie).
40
+ $experimental-support-for-pie : false !default;
@@ -0,0 +1,4 @@
1
+ @import "typography/links";
2
+ @import "typography/lists";
3
+ @import "typography/text";
4
+ @import "typography/vertical_rhythm";
@@ -0,0 +1,9 @@
1
+ @import "utilities/color";
2
+ @import "utilities/general";
3
+ @import "utilities/sprites";
4
+ @import "utilities/tables";
5
+
6
+ // deprecated
7
+ @import "typography/links";
8
+ @import "typography/lists";
9
+ @import "typography/text";
@@ -0,0 +1,17 @@
1
+ @import "shared";
2
+
3
+ // Change the appearance for Mozilla, Webkit and possibly the future.
4
+ // The appearance property is currently not present in any newer CSS specification.
5
+ //
6
+ // There is no official list of accepted values, but you might check these source:
7
+ //
8
+ // * [Mozilla](https://developer.mozilla.org/en/CSS/-moz-appearance)
9
+ // * [Webkit](http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365)
10
+ // (search for 'appearance' within the page)
11
+
12
+ @mixin appearance($ap) {
13
+ $ap: unquote($ap);
14
+ @include experimental(appearance, $ap,
15
+ -moz, -webkit, not -o, not -ms, not -khtml, official
16
+ );
17
+ }
@@ -0,0 +1,43 @@
1
+ @import "shared";
2
+
3
+ // The default value is `padding-box` -- the box model used by modern browsers.
4
+ //
5
+ // If you wish to do so, you can override the default constant with `border-box`
6
+ //
7
+ // To override to the default border-box model, use this code:
8
+ // $default-background-clip: border-box
9
+
10
+ $default-background-clip: padding-box !default;
11
+
12
+ // Clip the background (image and color) at the edge of the padding or border.
13
+ //
14
+ // Legal Values:
15
+ //
16
+ // * padding-box
17
+ // * border-box
18
+ // * text
19
+
20
+ @mixin background-clip($clip: $default-background-clip) {
21
+ // webkit and mozilla use the deprecated short [border | padding]
22
+ $clip: unquote($clip);
23
+ $deprecated: $clip;
24
+ @if $clip == padding-box { $deprecated: padding; }
25
+ @if $clip == border-box { $deprecated: border; }
26
+ // Support for webkit and mozilla's use of the deprecated short form
27
+ @include experimental(background-clip, $deprecated,
28
+ -moz,
29
+ -webkit,
30
+ not -o,
31
+ not -ms,
32
+ not -khtml,
33
+ not official
34
+ );
35
+ @include experimental(background-clip, $clip,
36
+ not -moz,
37
+ not -webkit,
38
+ not -o,
39
+ not -ms,
40
+ -khtml,
41
+ official
42
+ );
43
+ }
@@ -0,0 +1,42 @@
1
+ // Override `$default-background-origin` to change the default.
2
+
3
+ @import "shared";
4
+
5
+ $default-background-origin: content-box !default;
6
+
7
+ // Position the background off the edge of the padding, border or content
8
+ //
9
+ // * Possible values:
10
+ // * `padding-box`
11
+ // * `border-box`
12
+ // * `content-box`
13
+ // * browser defaults to `padding-box`
14
+ // * mixin defaults to `content-box`
15
+
16
+
17
+ @mixin background-origin($origin: $default-background-origin) {
18
+ $origin: unquote($origin);
19
+ // webkit and mozilla use the deprecated short [border | padding | content]
20
+ $deprecated: $origin;
21
+ @if $origin == padding-box { $deprecated: padding; }
22
+ @if $origin == border-box { $deprecated: border; }
23
+ @if $origin == content-box { $deprecated: content; }
24
+
25
+ // Support for webkit and mozilla's use of the deprecated short form
26
+ @include experimental(background-origin, $deprecated,
27
+ -moz,
28
+ -webkit,
29
+ not -o,
30
+ not -ms,
31
+ not -khtml,
32
+ not official
33
+ );
34
+ @include experimental(background-origin, $origin,
35
+ not -moz,
36
+ not -webkit,
37
+ -o,
38
+ -ms,
39
+ -khtml,
40
+ official
41
+ );
42
+ }
@@ -0,0 +1,26 @@
1
+ @import "shared";
2
+
3
+ // override to change the default
4
+ $default-background-size: 100% auto !default;
5
+
6
+ // Set the size of background images using px, width and height, or percentages.
7
+ // Currently supported in: Opera, Gecko, Webkit.
8
+ //
9
+ // * percentages are relative to the background-origin (default = padding-box)
10
+ // * mixin defaults to: `$default-background-size`
11
+ @mixin background-size(
12
+ $size-1: $default-background-size,
13
+ $size-2: false,
14
+ $size-3: false,
15
+ $size-4: false,
16
+ $size-5: false,
17
+ $size-6: false,
18
+ $size-7: false,
19
+ $size-8: false,
20
+ $size-9: false,
21
+ $size-10: false
22
+ ) {
23
+ $size-1: if(type-of($size-1) == string, unquote($size-1), $size-1);
24
+ $sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10);
25
+ @include experimental(background-size, $sizes, -moz, -webkit, -o, not -ms, not -khtml);
26
+ }
@@ -0,0 +1,130 @@
1
+ @import "shared";
2
+
3
+ $default-border-radius: 5px !default;
4
+
5
+ // Round all corners by a specific amount, defaults to value of `$default-border-radius`.
6
+ //
7
+ // When two values are passed, the first is the horizontal radius
8
+ // and the second is the vertical radius.
9
+ //
10
+ // Note: webkit does not support shorthand syntax for several corners at once.
11
+ // So in the case where you pass several values only the first will be passed to webkit.
12
+ //
13
+ // Examples:
14
+ //
15
+ // .simple { @include border-radius(4px, 4px); }
16
+ // .compound { @include border-radius(2px 5px, 3px 6px); }
17
+ // .crazy { @include border-radius(1px 3px 5px 7px, 2px 4px 6px 8px)}
18
+ //
19
+ // Which generates:
20
+ //
21
+ // .simple {
22
+ // -webkit-border-radius: 4px 4px;
23
+ // -moz-border-radius: 4px / 4px;
24
+ // -khtml-border-radius: 4px / 4px;
25
+ // border-radius: 4px / 4px; }
26
+ //
27
+ // .compound {
28
+ // -webkit-border-radius: 2px 3px;
29
+ // -moz-border-radius: 2px 5px / 3px 6px;
30
+ // -khtml-border-radius: 2px 5px / 3px 6px;
31
+ // border-radius: 2px 5px / 3px 6px; }
32
+ //
33
+ // .crazy {
34
+ // -webkit-border-radius: 1px 2px;
35
+ // -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
36
+ // -khtml-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
37
+ // border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; }
38
+
39
+ @mixin border-radius($radius: $default-border-radius, $vertical-radius: false) {
40
+
41
+ @if $vertical-radius {
42
+ // Webkit doesn't understand the official shorthand syntax for specifying
43
+ // a vertical radius unless so in case there's several we only take the first.
44
+ @include experimental(border-radius, first-value-of($radius) first-value-of($vertical-radius),
45
+ not -moz,
46
+ -webkit,
47
+ not -o,
48
+ not -ms,
49
+ not -khtml,
50
+ not official
51
+ );
52
+ @include experimental("border-radius", $radius unquote("/") $vertical-radius,
53
+ -moz,
54
+ not -webkit,
55
+ not -o,
56
+ not -ms,
57
+ -khtml,
58
+ official
59
+ );
60
+ }
61
+ @else {
62
+ @include experimental(border-radius, $radius);
63
+ }
64
+ }
65
+
66
+ // Round radius at position by amount.
67
+ //
68
+ // * legal values for `$vert`: `top`, `bottom`
69
+ // * legal values for `$horz`: `left`, `right`
70
+
71
+ @mixin border-corner-radius($vert, $horz, $radius: $default-border-radius) {
72
+ // Support for mozilla's syntax for specifying a corner
73
+ @include experimental("border-radius-#{$vert}#{$horz}", $radius,
74
+ -moz,
75
+ not -webkit,
76
+ not -o,
77
+ not -ms,
78
+ not -khtml,
79
+ not official
80
+ );
81
+ @include experimental("border-#{$vert}-#{$horz}-radius", $radius,
82
+ not -moz,
83
+ -webkit,
84
+ not -o,
85
+ not -ms,
86
+ -khtml,
87
+ official
88
+ );
89
+
90
+ }
91
+
92
+ // Round top-left corner only
93
+
94
+ @mixin border-top-left-radius($radius: $default-border-radius) {
95
+ @include border-corner-radius(top, left, $radius); }
96
+
97
+ // Round top-right corner only
98
+
99
+ @mixin border-top-right-radius($radius: $default-border-radius) {
100
+ @include border-corner-radius(top, right, $radius); }
101
+
102
+ // Round bottom-left corner only
103
+
104
+ @mixin border-bottom-left-radius($radius: $default-border-radius) {
105
+ @include border-corner-radius(bottom, left, $radius); }
106
+
107
+ // Round bottom-right corner only
108
+
109
+ @mixin border-bottom-right-radius($radius: $default-border-radius) {
110
+ @include border-corner-radius(bottom, right, $radius); }
111
+
112
+ // Round both top corners by amount
113
+ @mixin border-top-radius($radius: $default-border-radius) {
114
+ @include border-top-left-radius($radius);
115
+ @include border-top-right-radius($radius); }
116
+
117
+ // Round both right corners by amount
118
+ @mixin border-right-radius($radius: $default-border-radius) {
119
+ @include border-top-right-radius($radius);
120
+ @include border-bottom-right-radius($radius); }
121
+
122
+ // Round both bottom corners by amount
123
+ @mixin border-bottom-radius($radius: $default-border-radius) {
124
+ @include border-bottom-left-radius($radius);
125
+ @include border-bottom-right-radius($radius); }
126
+
127
+ // Round both left corners by amount
128
+ @mixin border-left-radius($radius: $default-border-radius) {
129
+ @include border-top-left-radius($radius);
130
+ @include border-bottom-left-radius($radius); }
@@ -0,0 +1,76 @@
1
+ // @doc off
2
+ // These defaults make the arguments optional for this mixin
3
+ // If you like, set different defaults before importing.
4
+ // @doc on
5
+
6
+ @import "shared";
7
+
8
+
9
+ // The default color for box shadows
10
+ $default-box-shadow-color: #333333 !default;
11
+
12
+ // The default horizontal offset. Positive is to the right.
13
+ $default-box-shadow-h-offset: 0px !default;
14
+
15
+ // The default vertical offset. Positive is down.
16
+ $default-box-shadow-v-offset: 0px !default;
17
+
18
+ // The default blur length.
19
+ $default-box-shadow-blur: 5px !default;
20
+
21
+ // The default spread length.
22
+ $default-box-shadow-spread : false !default;
23
+
24
+ // The default shadow inset: inset or false (for standard shadow).
25
+ $default-box-shadow-inset : false !default;
26
+
27
+ // Provides cross-browser for Webkit, Gecko, and CSS3 box shadows when one or more box
28
+ // shadows are needed.
29
+ // Each shadow argument should adhere to the standard css3 syntax for the
30
+ // box-shadow property.
31
+ @mixin box-shadow(
32
+ $shadow-1 : default,
33
+ $shadow-2 : false,
34
+ $shadow-3 : false,
35
+ $shadow-4 : false,
36
+ $shadow-5 : false,
37
+ $shadow-6 : false,
38
+ $shadow-7 : false,
39
+ $shadow-8 : false,
40
+ $shadow-9 : false,
41
+ $shadow-10: false
42
+ ) {
43
+ @if $shadow-1 == default {
44
+ $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
45
+ }
46
+ $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
47
+ @include experimental(box-shadow, $shadow,
48
+ -moz, -webkit, not -o, not -ms, not -khtml, official
49
+ );
50
+ }
51
+
52
+ // Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
53
+ // Includes default arguments for color, horizontal offset, vertical offset, blur length, spread length, and inset.
54
+ @mixin single-box-shadow(
55
+ $color : $default-box-shadow-color,
56
+ $hoff : $default-box-shadow-h-offset,
57
+ $voff : $default-box-shadow-v-offset,
58
+ $blur : $default-box-shadow-blur,
59
+ $spread : $default-box-shadow-spread,
60
+ $inset : $default-box-shadow-inset
61
+ ) {
62
+ @if not ($inset == true or $inset == false or $inset == inset) {
63
+ @warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset";
64
+ }
65
+
66
+ @if $color == none {
67
+ @include box-shadow(none);
68
+ } @else {
69
+ $full : $hoff $voff;
70
+ @if $blur { $full: $full $blur; }
71
+ @if $spread { $full: $full $spread; }
72
+ @if $color { $full: $full $color; }
73
+ @if $inset { $full: inset $full; }
74
+ @include box-shadow($full);
75
+ }
76
+ }
@@ -0,0 +1,13 @@
1
+ @import "shared";
2
+
3
+ // Change the box model for Mozilla, Webkit, IE8 and the future
4
+ //
5
+ // @param $bs
6
+ // [ content-box | border-box ]
7
+
8
+ @mixin box-sizing($bs) {
9
+ $bs: unquote($bs);
10
+ @include experimental(box-sizing, $bs,
11
+ -moz, -webkit, not -o, not -ms, not -khtml, official
12
+ );
13
+ }