compass-susy-plugin 0.6.3 → 0.7.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,211 +1,81 @@
1
+ //** Susy Utilities **//
2
+ // Updated 11.20.2009 by Eric A. Meyer
3
+
4
+
5
+ // An extension of the Compass Core Utilities
1
6
  @import compass/utilities.sass
2
7
 
3
- //**
4
- removes all background images and colors from the element and offspring
5
- then adds a grid image of your choosing. highlights divs on modern browsers
8
+
9
+ // Apply to you container element(s) to show a grid image.
10
+ // - You need to supply the image. Susy can't do everything.
6
11
  =show-grid(!src)
7
- :background
8
- :image= image_url(!src)
9
- :repeat repeat
10
- :position= side_gutter() + "% 0"
11
- *
12
- :background transparent
13
- div
14
- :background rgba(0,0,0,.125)
12
+ background:
13
+ image= image_url(!src)
14
+ repeat: repeat
15
+ position= side_gutter() + "% 0"
16
+
15
17
 
16
- //**
17
- brings IE in line with inline-block display
18
- - using hacks if called automatically because !hacks == true
19
- - or without if you call it from ie.sass
18
+ // Brings IE in line with inline-block display
19
+ // - Using hacks if called automatically because !hacks == true
20
+ // - Or not, if you call it from ie.sass because !hacks == false
20
21
  =ie-inline-block(!hack = false)
21
22
  @if !hack
22
23
  /* ugly hacks for IE6-7 */
23
- :#display inline
24
+ #display: inline
24
25
  // fixes alignment against native input/button on IE6
25
- :#vertical-align auto
26
+ #vertical-align: auto
26
27
  /* end ugly hacks */
27
28
  @else
28
- :display inline
29
+ display: inline
29
30
  // fixes alignment against native input/button on IE6
30
- :vertical-align auto
31
+ vertical-align: auto
31
32
 
32
- //**
33
- an override for compass inline-block that lets you take advantage
34
- of Susys !hacks constant. if true, hacks. if false, use ie-inline-block
35
- to help ie along in your ie.sass
33
+
34
+ // An override for compass inline-block that lets you take advantage
35
+ // of Susys !hacks constant. if true, hacks. if false, use ie-inline-block
36
+ // to help ie along in your ie.sass
36
37
  =inline-block
37
- :display -moz-inline-box
38
- :-moz-box-orient vertical
39
- :display inline-block
40
- :vertical-align middle
38
+ display: -moz-inline-box
39
+ -moz-box-orient: vertical
40
+ display: inline-block
41
+ vertical-align: middle
41
42
  @if !hacks
42
- +ie-inline-block("*")
43
+ +ie-inline-block(true)
44
+
43
45
 
44
- //**
45
- an inline-block list that works in IE
46
- for those awkward moments when a floated horizontal list just wont cut it
47
- if global !hacks == false:
48
- - you'll need to fix list items in ie.sass with +ie-inline-block
46
+ // An inline-block list that works in IE
47
+ // For those awkward moments when a floated horizontal list just wont cut it
48
+ // NOTE: If global !hacks == false:
49
+ // - you'll need to fix list items in ie.sass with +ie-inline-block
49
50
  =inline-block-list(!hpad = 0)
50
51
  +horizontal-list-container
51
52
  li
52
53
  +no-bullet
53
- :white-space no-wrap
54
54
  +inline-block
55
- :padding
56
- :left= !hpad
57
- :right= !hpad
55
+ white-space: no-wrap
56
+ padding:
57
+ left= !hpad
58
+ right= !hpad
58
59
 
59
- //**
60
- hide an element from the viewport, but keep it around for accessability
60
+
61
+ // Hide an element from the viewport, but keep it around for accessability
61
62
  =hide
62
- :position absolute
63
- :top -9999em
63
+ position: absolute
64
+ top: -9999em
65
+
64
66
 
65
- //**
66
- a skip-to-content accessibility link that will appear on focus
67
- set the location arguments if you care where it appears
67
+ // Apply to skip-to-content accessibility links that will appear on focus.
68
+ // - Set the location arguments if you care where it appears.
68
69
  =skip-link(!t = 0, !r = false, !b = false, !l = false)
69
70
  +hide
70
- :display block
71
+ display: block
71
72
  &:focus
72
73
  @if !t
73
- :top= !t
74
+ top= !t
74
75
  @if !r
75
- :right= !r
76
+ right= !r
76
77
  @if !b
77
- :bottom= !b
78
+ bottom= !b
78
79
  @if !l
79
- :left= !l
80
- :z-index 999
81
-
82
- // EXPERIMENTAL
83
-
84
- //**
85
- [Opacity rules based on those in Compass Core Edge as of 7.18.09]
86
- - These will be removed from Susy once they enter a major Compass release.
87
- Provides cross-browser css opacity.
88
- @param !opacity
89
- A number between 0 and 1, where 0 is transparent and 1 is opaque.
90
- =opacity(!opacity)
91
- :opacity= !opacity
92
- :-moz-opacity= !opacity
93
- :-khtml-opacity= !opacity
94
- :-ms-filter= "progid:DXImageTransform.Microsoft.Alpha(Opacity=" + round(!opacity*100) + ")"
95
- :filter= "alpha(opacity=" + round(!opacity*100) + ")"
96
-
97
- // Make an element completely transparent.
98
- =transparent
99
- +opacity(0)
100
-
101
- // Make an element completely opaque.
102
- =opaque
103
- +opacity(1)
104
-
105
- //**
106
- rounded corners for Mozilla, Webkit and the future
107
- =border-radius(!r)
108
- /* Mozilla (FireFox, Camino)
109
- -moz-border-radius = !r
110
- /* Webkit (Safari, Chrome)
111
- -webkit-border-radius = !r
112
- /* CSS3
113
- border-radius = !r
114
-
115
- =border-corner-radius(!vert, !horz, !r)
116
- /* Mozilla (FireFox, Camino)
117
- -moz-border-radius-#{!vert}#{!horz}= !r
118
- /* Webkit (Safari, Chrome)
119
- -webkit-border-#{!vert}-#{!horz}-radius= !r
120
- /* CSS3
121
- border-#{!vert}-#{!horz}-radius= !r
122
-
123
- =border-top-left-radius(!r)
124
- +border-corner-radius("top", "left", !r)
125
-
126
- =border-top-right-radius(!r)
127
- +border-corner-radius("top", "right", !r)
128
-
129
- =border-bottom-right-radius(!r)
130
- +border-corner-radius("bottom", "right", !r)
131
-
132
- =border-bottom-left-radius(!r)
133
- +border-corner-radius("bottom", "left", !r)
134
-
135
- =border-top-radius(!r)
136
- +border-top-left-radius(!r)
137
- +border-top-right-radius(!r)
138
-
139
- =border-right-radius(!r)
140
- +border-top-right-radius(!r)
141
- +border-bottom-right-radius(!r)
142
-
143
- =border-bottom-radius(!r)
144
- +border-bottom-right-radius(!r)
145
- +border-bottom-left-radius(!r)
146
-
147
- =border-left-radius(!r)
148
- +border-top-left-radius(!r)
149
- +border-bottom-left-radius(!r)
150
-
151
- //**
152
- change the box model for Mozilla, Webkit, IE8 and the future
153
- =box-sizing(!bs)
154
- /* Mozilla (FireFox, Camino)
155
- -moz-box-sizing= !bs
156
- /* Webkit (Safari, Chrome)
157
- -webkit-box-sizing= !bs
158
- /* IE (8)
159
- -ms-box-sizing= !bs
160
- /* CSS3
161
- box-sizing= !bs
162
-
163
- //**
164
- box shadow for Webkit and the future
165
- - arguments are horizontal offset, vertical offset, blur and color
166
- =box-shadow(!ho, !vo, !b, !c )
167
- /* Webkit (Safari, Chrome)
168
- -webkit-box-shadow= !ho !vo !b !c
169
- /* Mozilla (Firefox, Camino)
170
- -moz-box-shadow= !ho !vo !b !c
171
- /* CSS3
172
- box-shadow= !ho !vo !b !c
173
-
174
-
175
- //**
176
- CSS3 columns for Mozilla, Webkit and the Future
177
-
178
- =column-count(!n)
179
- :-moz-column-count= !n
180
- :-webkit-column-count= !n
181
- :column-count= !n
182
-
183
- =column-gap(!u)
184
- :-moz-column-gap= !u
185
- :-webkit-column-gap= !u
186
- :column-gap= !u
187
-
188
- =column-width(!u)
189
- :-moz-column-width= !u
190
- :-webkit-column-width= !u
191
- :column-width= !u
192
-
193
- =column-rule-width(!w)
194
- :-moz-column-rule-width= !w
195
- :-webkit-column-rule-width= !w
196
- :column-rule-width= !w
197
-
198
- =column-rule-style(!s)
199
- :-moz-column-rule-style= !s
200
- :-webkit-column-rule-style= !s
201
- :column-rule-style= !s
202
-
203
- =column-rule-color(!c)
204
- :-moz-column-rule-color= !c
205
- :-webkit-column-rule-color= !c
206
- :column-rule-color= !c
207
-
208
- =column-rule(!w, !s = "solid", !c = " ")
209
- +column-rule-width(!w)
210
- +column-rule-style(!s)
211
- +column-rule-color(!c)
80
+ left= !l
81
+ z-index: 999
@@ -1,215 +1,62 @@
1
1
  //**
2
- // Susy: Elastic-Fluid grids without all the math
3
- // by Eric Meyer and OddBird Collective
2
+ // Susy: Fixed-Elastic-Fluid grids without all the math
3
+ // By: Eric A. Meyer and OddBird Collective
4
4
  // Site: www.oddbird.net/susy/
5
5
  //**
6
6
 
7
- //**
8
- GRID
9
- un-comment and override these values as needed for your grid layout
10
- (defaults are shown)
11
- // !grid_unit = "em"
12
- // !total_cols = 12
13
- // !col_width = 4
14
- // !gutter_width = 1
15
- // !side_gutter_width = !gutter_width
16
-
17
-
18
- //**
19
- OMEGA_FLOAT
20
- By default, +omega elements are floated right.
21
- You can override that globally here:
22
- // !omega_float = "right"
23
-
24
-
25
- //**
26
- HACKS
27
- Are you using hacks or conditional comments? Susy makes both possible.
28
- Leave this as 'true' to use hacks, set it as false for conditional comments.
29
- Conditional comments will require overrides for +omega, +inline-block and
30
- several other mixins.
31
- !hacks = true
32
-
33
- //**
34
- FONT-SIZE
35
- un-comment and override these values as needed (defaults are shown)
36
- - you set the font and line heights in pixels.
37
- - Susy will do the math and give you !base_font_size and !base_line_height
38
- variables, set flexibly against the common browser default of 16px
39
- // !base_font_size_px = 16
40
- // !base_line_height_px = 24
41
-
42
- // SUSY
43
- // (don't move this @import above the GRID and FONT-SIZE overrides)
44
- @import susy/susy.sass
45
-
46
- // COLORS
47
- // set any colors you will need later
48
- !font_color = #444
49
- !quiet_color = !font_color + #333
50
- !loud_color = !font_color - #222
51
- !header_color = !font_color - #111
52
- !link_color = #099
53
- !visited_color = #909
54
- !hover_color = !link_color - #333
55
- !focus_color = !hover_color
56
- !active_color = !hover_color
57
-
58
- // FONTS
59
- // Give yourself some font stacks to work with
60
- =sans-family
61
- :font-family Helvetica, Arial, sans-serif
62
-
63
- =serif-family
64
- :font-family Baskerville, Palatino, serif
65
-
66
- // Remember to add default styles to everything!
67
-
68
- body
69
- +sans-family
70
- :color= !font_color
71
-
72
- /* @group links */
73
-
74
- \:focus
75
- :outline= 1px "dotted" !quiet_color
76
- :color= !hover_color
77
-
78
- a
79
- &:link
80
- :color= !link_color
81
- &:visited
82
- :color= !visited_color
83
- &:focus, &:hover, &:active
84
- :color= !hover_color
85
- :text-decoration none
86
-
87
- /* @end */
88
-
89
-
90
- /* @group headers */
91
-
92
- h1, h2, h3, h4, h5, h6
93
- :color= !header_color
94
- :font-weight bold
95
-
96
- h1, h2, h3
97
- +serif-family
98
-
99
- h1
100
- :font-size= !base_line_height
101
-
102
- /* @end */
103
-
104
-
105
- /* @group forms */
106
-
107
- form *:focus
108
- :outline none
7
+ // GRID
8
+ // Set these values as needed for your grid layout.
9
+ // - defaults are shown.
10
+ !grid_unit = "em"
11
+ !total_cols = 12
12
+ !col_width = 4
13
+ !gutter_width = 1
14
+ !side_gutter_width = !gutter_width
109
15
 
110
- fieldset
111
- :margin= !base_line_height 0
112
16
 
113
- legend
114
- :font-weight bold
115
- :font-variant small-caps
116
-
117
- label
118
- :display block
119
- :margin-top= !base_line_height
120
-
121
- legend + label
122
- :margin-top 0
123
-
124
- textarea, input[type="text"]
125
- :color= !quiet_color
126
- +box-sizing("border-box")
127
- :width 100%
128
-
129
- /* @end */
130
-
131
-
132
- /* @group tables */
133
-
134
- /* tables still need 'cellspacing="0"' in the markup */
135
-
136
- table
137
- :width 100%
138
- :border= 1/16 + "em solid" !quiet_color + #333
139
- :left none
140
- :right none
141
- :padding= 7/16 + "em 0"
142
- :margin= 8/16 + "em 0"
143
-
144
- tbody
145
- :color= !quiet_color
146
-
147
- th
148
- :font-weight bold
149
-
150
- /* @end */
151
-
152
-
153
- /* @group block tags */
154
-
155
- p
156
- :margin= !base_line_height 0
157
-
158
- =list-default(!ol = false)
159
- @if !ol
160
- :list-style decimal
161
- :margin 0 1.5em 1.5em 1.5em
162
- @else
163
- :list-style disc
164
- :margin 0 1.5em 1.5em 1.5em
165
-
166
- =no-style-list
167
- +no-bullets
168
- :margin 0
169
- :padding 0
170
-
171
- ol
172
- +list-default("ol")
173
-
174
- ul
175
- +list-default
176
-
177
- blockquote
178
- :margin= !base_line_height
179
- :color= !quiet_color
180
-
181
- /* @end */
17
+ // OMEGA_FLOAT
18
+ // By default, +omega elements are floated right.
19
+ // You can override that globally here:
20
+ // !omega_float = "right"
182
21
 
183
22
 
184
- /* @group inline tags */
23
+ // HACKS
24
+ // Are you using hacks or conditional comments? Susy makes both possible.
25
+ // Leave this as 'true' to use hacks, set it as false for conditional comments.
26
+ // Conditional comments will require overrides for +omega, +inline-block and
27
+ // several other mixins.
28
+ // !hacks = true
185
29
 
186
- cite
187
- :font-style italic
188
- :color= !quiet_color
189
30
 
190
- em
191
- :font-style italic
31
+ // FONT-SIZE
32
+ // Override these values as needed (defaults are shown)
33
+ // - You set the font and line heights in pixels.
34
+ // - Susy will do the math and give you !base_font_size and !base_line_height
35
+ // variables, set flexibly against the common browser default of 16px
36
+ !base_font_size_px = 16
37
+ !base_line_height_px = 24
192
38
 
193
- strong
194
- :font-weight bold
195
39
 
196
- ins
197
- :text-decoration underline
40
+ // SUSY
41
+ // Don't move this @import above the GRID and FONT-SIZE overrides.
42
+ @import susy/susy.sass
198
43
 
199
- del
200
- :text-decoration line-through
201
44
 
202
- q
203
- :font-style italic
204
- em
205
- :font-style normal
45
+ // COLORS
46
+ // Set any colors you will need later.
47
+ !main = #194C66
48
+ !alt = #CC6633
206
49
 
207
- /* @end */
208
50
 
51
+ // FONTS
52
+ // Give yourself some font stacks to work with.
53
+ =sans-family
54
+ font-family: Helvetica, Arial, sans-serif
209
55
 
210
- /* @group replaced tags */
56
+ =serif-family
57
+ font-family: Baskerville, Palatino, serif
211
58
 
212
- img
213
- :vertical-align bottom
214
59
 
215
- /* @end */
60
+ // OTHER MIXINS
61
+ // Mixins set here will be available in defaults, screen, print and IE
62
+ // Or anywhere you import either base.sass or defaults.sass