gem_2345 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gem_2345/import-once.rb +28 -0
- data/lib/gem_2345/import-once/activate.rb +20 -0
- data/lib/gem_2345/import-once/engine.rb +36 -0
- data/lib/gem_2345/import-once/importer.rb +81 -0
- data/lib/gem_2345/import-once/version.rb +5 -0
- data/lib/gem_2345/version.rb +1 -1
- data/stylesheets/_compass.scss +3 -0
- data/stylesheets/_lemonade.scss +38 -0
- data/stylesheets/compass/_configuration.scss +54 -0
- data/stylesheets/compass/_css3.scss +21 -0
- data/stylesheets/compass/_layout.scss +3 -0
- data/stylesheets/compass/_reset-legacy.scss +3 -0
- data/stylesheets/compass/_reset.scss +3 -0
- data/stylesheets/compass/_support.scss +447 -0
- data/stylesheets/compass/_typography.scss +4 -0
- data/stylesheets/compass/_utilities.scss +9 -0
- data/stylesheets/compass/css3/_animation.scss +122 -0
- data/stylesheets/compass/css3/_appearance.scss +17 -0
- data/stylesheets/compass/css3/_background-clip.scss +35 -0
- data/stylesheets/compass/css3/_background-origin.scss +37 -0
- data/stylesheets/compass/css3/_background-size.scss +19 -0
- data/stylesheets/compass/css3/_border-radius.scss +107 -0
- data/stylesheets/compass/css3/_box-shadow.scss +88 -0
- data/stylesheets/compass/css3/_box-sizing.scss +21 -0
- data/stylesheets/compass/css3/_box.scss +85 -0
- data/stylesheets/compass/css3/_columns.scss +212 -0
- data/stylesheets/compass/css3/_deprecated-support.scss +272 -0
- data/stylesheets/compass/css3/_filter.scss +50 -0
- data/stylesheets/compass/css3/_flexbox.scss +156 -0
- data/stylesheets/compass/css3/_font-face.scss +48 -0
- data/stylesheets/compass/css3/_hyphenation.scss +71 -0
- data/stylesheets/compass/css3/_images.scss +152 -0
- data/stylesheets/compass/css3/_inline-block.scss +31 -0
- data/stylesheets/compass/css3/_opacity.scss +27 -0
- data/stylesheets/compass/css3/_pie.scss +1 -0
- data/stylesheets/compass/css3/_regions.scss +27 -0
- data/stylesheets/compass/css3/_selection.scss +59 -0
- data/stylesheets/compass/css3/_shared.scss +5 -0
- data/stylesheets/compass/css3/_text-shadow.scss +82 -0
- data/stylesheets/compass/css3/_transform.scss +590 -0
- data/stylesheets/compass/css3/_transition.scss +190 -0
- data/stylesheets/compass/css3/_user-interface.scss +71 -0
- data/stylesheets/compass/layout/_grid-background.scss +178 -0
- data/stylesheets/compass/layout/_sticky-footer.scss +23 -0
- data/stylesheets/compass/layout/_stretching.scss +24 -0
- data/stylesheets/compass/reset/_utilities-legacy.scss +135 -0
- data/stylesheets/compass/reset/_utilities.scss +142 -0
- data/stylesheets/compass/typography/_links.scss +3 -0
- data/stylesheets/compass/typography/_lists.scss +4 -0
- data/stylesheets/compass/typography/_text.scss +4 -0
- data/stylesheets/compass/typography/_units.scss +183 -0
- data/stylesheets/compass/typography/_vertical_rhythm.scss +300 -0
- data/stylesheets/compass/typography/links/_hover-link.scss +5 -0
- data/stylesheets/compass/typography/links/_link-colors.scss +28 -0
- data/stylesheets/compass/typography/links/_unstyled-link.scss +7 -0
- data/stylesheets/compass/typography/lists/_bullets.scss +34 -0
- data/stylesheets/compass/typography/lists/_horizontal-list.scss +63 -0
- data/stylesheets/compass/typography/lists/_inline-block-list.scss +50 -0
- data/stylesheets/compass/typography/lists/_inline-list.scss +47 -0
- data/stylesheets/compass/typography/text/_ellipsis.scss +25 -0
- data/stylesheets/compass/typography/text/_force-wrap.scss +12 -0
- data/stylesheets/compass/typography/text/_nowrap.scss +2 -0
- data/stylesheets/compass/typography/text/_replacement.scss +74 -0
- data/stylesheets/compass/utilities/_color.scss +1 -0
- data/stylesheets/compass/utilities/_general.scss +6 -0
- data/stylesheets/compass/utilities/_links.scss +5 -0
- data/stylesheets/compass/utilities/_lists.scss +6 -0
- data/stylesheets/compass/utilities/_print.scss +17 -0
- data/stylesheets/compass/utilities/_sass.scss +2 -0
- data/stylesheets/compass/utilities/_sprites.scss +2 -0
- data/stylesheets/compass/utilities/_tables.scss +3 -0
- data/stylesheets/compass/utilities/_text.scss +5 -0
- data/stylesheets/compass/utilities/color/_brightness.scss +20 -0
- data/stylesheets/compass/utilities/color/_contrast.scss +52 -0
- data/stylesheets/compass/utilities/general/_clearfix.scss +44 -0
- data/stylesheets/compass/utilities/general/_float.scss +38 -0
- data/stylesheets/compass/utilities/general/_hacks.scss +65 -0
- data/stylesheets/compass/utilities/general/_min.scss +16 -0
- data/stylesheets/compass/utilities/general/_reset.scss +2 -0
- data/stylesheets/compass/utilities/general/_tabs.scss +1 -0
- data/stylesheets/compass/utilities/general/_tag-cloud.scss +18 -0
- data/stylesheets/compass/utilities/links/_hover-link.scss +3 -0
- data/stylesheets/compass/utilities/links/_link-colors.scss +3 -0
- data/stylesheets/compass/utilities/links/_unstyled-link.scss +3 -0
- data/stylesheets/compass/utilities/lists/_bullets.scss +3 -0
- data/stylesheets/compass/utilities/lists/_horizontal-list.scss +3 -0
- data/stylesheets/compass/utilities/lists/_inline-block-list.scss +3 -0
- data/stylesheets/compass/utilities/lists/_inline-list.scss +3 -0
- data/stylesheets/compass/utilities/sass/_lists.scss +16 -0
- data/stylesheets/compass/utilities/sass/_maps.scss +19 -0
- data/stylesheets/compass/utilities/sprites/_base.scss +92 -0
- data/stylesheets/compass/utilities/sprites/_sprite-img.scss +81 -0
- data/stylesheets/compass/utilities/tables/_alternating-rows-and-columns.scss +22 -0
- data/stylesheets/compass/utilities/tables/_borders.scss +38 -0
- data/stylesheets/compass/utilities/tables/_scaffolding.scss +9 -0
- data/stylesheets/compass/utilities/text/_ellipsis.scss +3 -0
- data/stylesheets/compass/utilities/text/_nowrap.scss +3 -0
- data/stylesheets/compass/utilities/text/_replacement.scss +3 -0
- data/templates/ellipsis/ellipsis.sass +9 -0
- data/templates/ellipsis/manifest.rb +27 -0
- data/templates/ellipsis/xml/ellipsis.xml +14 -0
- data/templates/extension/manifest.rb +26 -0
- data/templates/extension/stylesheets/main.sass +1 -0
- data/templates/extension/templates/project/manifest.rb +2 -0
- data/templates/extension/templates/project/screen.sass +2 -0
- data/templates/project/USAGE.markdown +32 -0
- data/templates/project/ie.sass +6 -0
- data/templates/project/manifest.rb +4 -0
- data/templates/project/print.sass +6 -0
- data/templates/project/screen.sass +7 -0
- metadata +113 -10
- data/.gitignore +0 -14
- data/Gemfile +0 -4
- data/LICENSE.txt +0 -22
- data/README.md +0 -31
- data/Rakefile +0 -9
- data/gem_2345.gemspec +0 -25
@@ -0,0 +1,300 @@
|
|
1
|
+
@import "compass/support";
|
2
|
+
@import "compass/layout/grid-background";
|
3
|
+
@import "compass/typography/units";
|
4
|
+
|
5
|
+
// The default font size for all text in pixels
|
6
|
+
$base-font-size: 16px !default;
|
7
|
+
|
8
|
+
// The distance between text baselines (vertical rhythm) in pixels.
|
9
|
+
$base-line-height: 24px !default;
|
10
|
+
|
11
|
+
// The length unit in which to output rhythm values.
|
12
|
+
// Supported values: px, em, rem. Percent units can't be used since they
|
13
|
+
// make calculating padding and margins impractical, and percentage borders are
|
14
|
+
// not valid or supported in css.
|
15
|
+
$rhythm-unit: 'em' !default;
|
16
|
+
|
17
|
+
// Whether to output fallback values in px when using rem as the rhythm-unit.
|
18
|
+
$rem-with-px-fallback: true !default;
|
19
|
+
|
20
|
+
// Default values for rhythm borders properties.
|
21
|
+
// Supports style alone eg. `solid` or list of style and color eg. `solid #aaa`;
|
22
|
+
$default-rhythm-border-width: 1px !default;
|
23
|
+
$default-rhythm-border-style: solid !default;
|
24
|
+
|
25
|
+
// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function
|
26
|
+
// to round the line height to the nearest half line height instead of the
|
27
|
+
// nearest integral line height to avoid large spacing between lines.
|
28
|
+
$round-to-nearest-half-line: false !default;
|
29
|
+
|
30
|
+
// Ensure there is at least this many pixels
|
31
|
+
// of vertical padding above and below the text.
|
32
|
+
$min-line-padding: 2px !default;
|
33
|
+
|
34
|
+
// The leader is the amount of whitespace in a line.
|
35
|
+
// It might be useful in your calculations.
|
36
|
+
$base-leader: convert-length($base-line-height - $base-font-size, $rhythm-unit, $base-font-size);
|
37
|
+
|
38
|
+
// The half-leader is the amount of whitespace above and below a line.
|
39
|
+
// It might be useful in your calculations.
|
40
|
+
$base-half-leader: $base-leader / 2;
|
41
|
+
|
42
|
+
// @private Whether the rhythm output is in absolute units (px) or not (em, rem)
|
43
|
+
$relative-font-sizing: if($rhythm-unit == px, false, true);
|
44
|
+
|
45
|
+
// Validate units
|
46
|
+
@if unit($base-font-size) != 'px' { @warn "$base-font-size must resolve to a pixel unit."; }
|
47
|
+
@if unit($base-line-height) != 'px' { @warn "$base-line-height must resolve to a pixel unit."; }
|
48
|
+
@if $rhythm-unit != 'px' and $rhythm-unit != 'em' and $rhythm-unit != 'rem' {
|
49
|
+
@warn "$rhythm-unit must be `px`, `em` or `rem`.";
|
50
|
+
}
|
51
|
+
|
52
|
+
|
53
|
+
// Calculate rhythm units.
|
54
|
+
@function rhythm($lines: 1, $font-size: $base-font-size, $offset: 0) {
|
55
|
+
$rhythm: convert-length($lines * $base-line-height - $offset, $rhythm-unit, $font-size);
|
56
|
+
@if unit($rhythm) == px {
|
57
|
+
$rhythm: floor($rhythm);
|
58
|
+
}
|
59
|
+
@return $rhythm;
|
60
|
+
}
|
61
|
+
|
62
|
+
// Calculate the minimum multiple of rhythm units needed to contain the font-size.
|
63
|
+
@function lines-for-font-size($font-size) {
|
64
|
+
$lines: if($round-to-nearest-half-line,
|
65
|
+
ceil(2 * $font-size / $base-line-height) / 2,
|
66
|
+
ceil($font-size / $base-line-height));
|
67
|
+
// If lines are cramped include some extra lead.
|
68
|
+
@if ($lines * $base-line-height - $font-size) < ($min-line-padding * 2) {
|
69
|
+
$lines: $lines + if($round-to-nearest-half-line, 0.5, 1);
|
70
|
+
}
|
71
|
+
@return $lines;
|
72
|
+
}
|
73
|
+
|
74
|
+
|
75
|
+
// @private Outputs rhythm values. For rem units, outputs pixel fallbacks
|
76
|
+
// by default.
|
77
|
+
@mixin output-rhythm($property, $values) {
|
78
|
+
@if $rhythm-unit == rem and $rem-with-px-fallback {
|
79
|
+
@include rem($property, $values);
|
80
|
+
}
|
81
|
+
@else {
|
82
|
+
$output: ();
|
83
|
+
@each $value in $values {
|
84
|
+
@if unit($value) == px {
|
85
|
+
// Ensure all pixel values are rounded to the nearest pixel.
|
86
|
+
$output: join($output, round($value));
|
87
|
+
}
|
88
|
+
@else {
|
89
|
+
$output: join($output, $value);
|
90
|
+
}
|
91
|
+
}
|
92
|
+
#{$property}: $output;
|
93
|
+
}
|
94
|
+
}
|
95
|
+
|
96
|
+
// Establishes a font baseline for the given font-size.
|
97
|
+
@mixin establish-baseline($font-size: $base-font-size) {
|
98
|
+
$relative-size: 100% * ($font-size / $browser-default-font-size);
|
99
|
+
|
100
|
+
@if support-legacy-browser(ie, "6") and (not $relative-font-sizing) {
|
101
|
+
// IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts
|
102
|
+
// whose root is set in ems. So we set the root font size in percentages of
|
103
|
+
// the default font size, even if we are using absolute sizes elsewhere.
|
104
|
+
* html { font-size: $relative-size; }
|
105
|
+
}
|
106
|
+
html {
|
107
|
+
font-size: if($relative-font-sizing, $relative-size, $font-size);
|
108
|
+
|
109
|
+
// Webkit has a bug that prevents line-height being set in rem on <html>;
|
110
|
+
// To work around this and simplify output, we can set initial line-height
|
111
|
+
// in ems for all relative rhythm units, even when $rhythm-unit is `rem`.
|
112
|
+
@if $relative-font-sizing {
|
113
|
+
line-height: convert-length($base-line-height, em);
|
114
|
+
}
|
115
|
+
@else {
|
116
|
+
line-height: round($base-line-height);
|
117
|
+
}
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
// Resets the baseline to 1 rhythm unit
|
122
|
+
// Does not work on elements whose font-size is different from $base-font-size.
|
123
|
+
//
|
124
|
+
// @deprecated This mixin will be removed in the next release.
|
125
|
+
// Please use `adjust-leading-to(1)` instead.
|
126
|
+
@mixin reset-baseline($font-size: $base-font-size) {
|
127
|
+
@include adjust-leading-to(1, $font-size);
|
128
|
+
}
|
129
|
+
|
130
|
+
// Show a background image that can be used to debug your alignments.
|
131
|
+
// As this is a development feature, this mixin never outputs pixel fallbacks
|
132
|
+
// for rem output.
|
133
|
+
// Include the $img argument if you would rather use your own image than the
|
134
|
+
// Compass default gradient image.
|
135
|
+
@mixin debug-vertical-alignment($img: false) {
|
136
|
+
@if $img {
|
137
|
+
background: image-url($img);
|
138
|
+
}
|
139
|
+
@else {
|
140
|
+
@include baseline-grid-background(if($round-to-nearest-half-line, rhythm(1/2), rhythm(1)));
|
141
|
+
}
|
142
|
+
}
|
143
|
+
|
144
|
+
// Adjust a block to have a different font size and line height to maintain the
|
145
|
+
// rhythm. $lines specifies how many multiples of the baseline rhythm each line
|
146
|
+
// of this font should use up. It does not have to be an integer, but it
|
147
|
+
// defaults to the smallest integer that is large enough to fit the font.
|
148
|
+
// Use $from-size to adjust from a font-size other than the base font-size.
|
149
|
+
@mixin adjust-font-size-to($to-size, $lines: auto, $from-size: $base-font-size) {
|
150
|
+
$to-size: convert-length($to-size, px, $from-size);
|
151
|
+
@if $lines == auto {
|
152
|
+
$lines: lines-for-font-size($to-size);
|
153
|
+
}
|
154
|
+
@include output-rhythm(font-size, convert-length($to-size, $rhythm-unit, $from-size));
|
155
|
+
@include adjust-leading-to($lines, $to-size);
|
156
|
+
}
|
157
|
+
|
158
|
+
// Adjust a block to have different line height to maintain the rhythm.
|
159
|
+
// $lines specifies how many multiples of the baseline rhythm each line of this
|
160
|
+
// font should use up. It does not have to be an integer, but it defaults to the
|
161
|
+
// smallest integer that is large enough to fit the font.
|
162
|
+
@mixin adjust-leading-to($lines, $font-size: $base-font-size) {
|
163
|
+
@include output-rhythm(line-height, rhythm($lines, $font-size));
|
164
|
+
}
|
165
|
+
|
166
|
+
// Apply leading whitespace. The $property can be margin or padding.
|
167
|
+
@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) {
|
168
|
+
@include output-rhythm(#{$property}-top, rhythm($lines, $font-size));
|
169
|
+
}
|
170
|
+
|
171
|
+
// Apply leading whitespace as padding.
|
172
|
+
@mixin padding-leader($lines: 1, $font-size: $base-font-size) {
|
173
|
+
@include output-rhythm(padding-top, rhythm($lines, $font-size));
|
174
|
+
}
|
175
|
+
|
176
|
+
// Apply leading whitespace as margin.
|
177
|
+
@mixin margin-leader($lines: 1, $font-size: $base-font-size) {
|
178
|
+
@include output-rhythm(margin-top, rhythm($lines, $font-size));
|
179
|
+
}
|
180
|
+
|
181
|
+
// Apply trailing whitespace. The $property can be margin or padding.
|
182
|
+
@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) {
|
183
|
+
@include output-rhythm(#{$property}-bottom, rhythm($lines, $font-size));
|
184
|
+
}
|
185
|
+
|
186
|
+
// Apply trailing whitespace as padding.
|
187
|
+
@mixin padding-trailer($lines: 1, $font-size: $base-font-size) {
|
188
|
+
@include output-rhythm(padding-bottom, rhythm($lines, $font-size));
|
189
|
+
}
|
190
|
+
|
191
|
+
// Apply trailing whitespace as margin.
|
192
|
+
@mixin margin-trailer($lines: 1, $font-size: $base-font-size) {
|
193
|
+
@include output-rhythm(margin-bottom, rhythm($lines, $font-size));
|
194
|
+
}
|
195
|
+
|
196
|
+
// Shorthand mixin to apply whitespace for top and bottom margins and padding.
|
197
|
+
@mixin rhythm(
|
198
|
+
$leader: 1,
|
199
|
+
$padding-leader: 0,
|
200
|
+
$padding-trailer: $padding-leader,
|
201
|
+
$trailer: $leader,
|
202
|
+
$font-size: $base-font-size
|
203
|
+
) {
|
204
|
+
@include leader($leader, $font-size);
|
205
|
+
@include padding-leader($padding-leader, $font-size);
|
206
|
+
@include padding-trailer($padding-trailer, $font-size);
|
207
|
+
@include trailer($trailer, $font-size);
|
208
|
+
}
|
209
|
+
|
210
|
+
// Shorthand mixin to apply whitespace for top and bottom margins.
|
211
|
+
@mixin rhythm-margins(
|
212
|
+
$leader: 1,
|
213
|
+
$trailer: $leader,
|
214
|
+
$font-size: $base-font-size
|
215
|
+
) {
|
216
|
+
@include leader($leader, $font-size);
|
217
|
+
@include trailer($trailer, $font-size);
|
218
|
+
}
|
219
|
+
|
220
|
+
// Shorthand mixin to apply whitespace for top and bottom padding.
|
221
|
+
@mixin rhythm-padding(
|
222
|
+
$padding-leader: 1,
|
223
|
+
$padding-trailer: $padding-leader,
|
224
|
+
$font-size: $base-font-size
|
225
|
+
) {
|
226
|
+
@include padding-leader($padding-leader, $font-size);
|
227
|
+
@include padding-trailer($padding-trailer, $font-size);
|
228
|
+
}
|
229
|
+
|
230
|
+
// Apply a border and whitespace to any side without destroying the vertical
|
231
|
+
// rhythm. The whitespace must be greater than the width of the border.
|
232
|
+
@mixin apply-side-rhythm-border(
|
233
|
+
$side,
|
234
|
+
$width: $default-rhythm-border-width,
|
235
|
+
$lines: 1,
|
236
|
+
$font-size: $base-font-size,
|
237
|
+
$border-style: $default-rhythm-border-style
|
238
|
+
) {
|
239
|
+
// If applying borders to all sides, use shorthand properties
|
240
|
+
$border-prop: if($side == all, border, border-#{$side});
|
241
|
+
@include output-rhythm(#{$border-prop}-width, convert-length($width, $rhythm-unit, $font-size));
|
242
|
+
#{$border-prop}-style: nth($border-style, 1);
|
243
|
+
@if type-of($border-style) == list and length($border-style) > 1 {
|
244
|
+
#{$border-prop}-color: nth($border-style, 2);
|
245
|
+
}
|
246
|
+
$padding-prop: if($side == all, padding, padding-#{$side});
|
247
|
+
@include output-rhythm(#{$padding-prop}, rhythm($lines, $font-size, $offset: $width));
|
248
|
+
}
|
249
|
+
|
250
|
+
// Apply a leading border.
|
251
|
+
// $border-style and $width are deprecated and will be removed in a future version of Compass.
|
252
|
+
@mixin leading-border(
|
253
|
+
$width: $default-rhythm-border-width,
|
254
|
+
$lines: 1,
|
255
|
+
$font-size: $base-font-size,
|
256
|
+
$border-style: $default-rhythm-border-style
|
257
|
+
) {
|
258
|
+
@include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style);
|
259
|
+
}
|
260
|
+
|
261
|
+
// Apply a trailing border.
|
262
|
+
@mixin trailing-border(
|
263
|
+
$width: $default-rhythm-border-width,
|
264
|
+
$lines: 1,
|
265
|
+
$font-size: $base-font-size,
|
266
|
+
$border-style: $default-rhythm-border-style
|
267
|
+
) {
|
268
|
+
@include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style);
|
269
|
+
}
|
270
|
+
|
271
|
+
// Apply both leading and trailing borders.
|
272
|
+
@mixin horizontal-borders(
|
273
|
+
$width: $default-rhythm-border-width,
|
274
|
+
$lines: 1,
|
275
|
+
$font-size: $base-font-size,
|
276
|
+
$border-style: $default-rhythm-border-style
|
277
|
+
) {
|
278
|
+
@include leading-border($width, $lines, $font-size, $border-style);
|
279
|
+
@include trailing-border($width, $lines, $font-size, $border-style);
|
280
|
+
}
|
281
|
+
|
282
|
+
// Alias for `horizontal-borders` mixin.
|
283
|
+
@mixin h-borders(
|
284
|
+
$width: $default-rhythm-border-width,
|
285
|
+
$lines: 1,
|
286
|
+
$font-size: $base-font-size,
|
287
|
+
$border-style: $default-rhythm-border-style
|
288
|
+
) {
|
289
|
+
@include horizontal-borders($width, $lines, $font-size, $border-style);
|
290
|
+
}
|
291
|
+
|
292
|
+
// Apply borders and whitespace equally to all sides.
|
293
|
+
@mixin rhythm-borders(
|
294
|
+
$width: $default-rhythm-border-width,
|
295
|
+
$lines: 1,
|
296
|
+
$font-size: $base-font-size,
|
297
|
+
$border-style: $default-rhythm-border-style
|
298
|
+
) {
|
299
|
+
@include apply-side-rhythm-border(all, $width, $lines, $font-size, $border-style);
|
300
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// Set all the colors for a link with one mixin call.
|
2
|
+
// Order of arguments is:
|
3
|
+
//
|
4
|
+
// 1. normal
|
5
|
+
// 2. hover
|
6
|
+
// 3. active
|
7
|
+
// 4. visited
|
8
|
+
// 5. focus
|
9
|
+
//
|
10
|
+
// Those states not specified will inherit.
|
11
|
+
// Mixin to an anchor link like so:
|
12
|
+
// a
|
13
|
+
// +link-colors(#00c, #0cc, #c0c, #ccc, #cc0)
|
14
|
+
|
15
|
+
@mixin link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) {
|
16
|
+
color: $normal;
|
17
|
+
@if $visited {
|
18
|
+
&:visited {
|
19
|
+
color: $visited; } }
|
20
|
+
@if $focus {
|
21
|
+
&:focus {
|
22
|
+
color: $focus; } }
|
23
|
+
@if $hover {
|
24
|
+
&:hover {
|
25
|
+
color: $hover; } }
|
26
|
+
@if $active {
|
27
|
+
&:active {
|
28
|
+
color: $active; } } }
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// Turn off the bullet for an element of a list
|
2
|
+
@mixin no-bullet {
|
3
|
+
list-style-image : none;
|
4
|
+
list-style-type : none;
|
5
|
+
margin-left : 0;
|
6
|
+
}
|
7
|
+
|
8
|
+
// turns off the bullets for an entire list
|
9
|
+
@mixin no-bullets {
|
10
|
+
list-style: none;
|
11
|
+
li { @include no-bullet; }
|
12
|
+
}
|
13
|
+
|
14
|
+
// Make a list(ul/ol) have an image bullet.
|
15
|
+
//
|
16
|
+
// The mixin should be used like this for an icon that is 5x7:
|
17
|
+
//
|
18
|
+
// ul.pretty
|
19
|
+
// +pretty-bullets("my-icon.png", 5px, 7px)
|
20
|
+
//
|
21
|
+
// Additionally, if the image dimensions are not provided,
|
22
|
+
// The image dimensions will be extracted from the image itself.
|
23
|
+
//
|
24
|
+
// ul.pretty
|
25
|
+
// +pretty-bullets("my-icon.png")
|
26
|
+
//
|
27
|
+
@mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
|
28
|
+
margin-left: 0;
|
29
|
+
li {
|
30
|
+
padding-left: $padding;
|
31
|
+
background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
|
32
|
+
list-style-type: none;
|
33
|
+
}
|
34
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
// Horizontal list layout module.
|
2
|
+
//
|
3
|
+
// Easy mode using simple descendant li selectors:
|
4
|
+
//
|
5
|
+
// ul.nav
|
6
|
+
// +horizontal-list
|
7
|
+
//
|
8
|
+
// Advanced mode:
|
9
|
+
// If you need to target the list items using a different selector then use
|
10
|
+
// +horizontal-list-container on your ul/ol and +horizontal-list-item on your li.
|
11
|
+
// This may help when working on layouts involving nested lists. For example:
|
12
|
+
//
|
13
|
+
// ul.nav
|
14
|
+
// +horizontal-list-container
|
15
|
+
// > li
|
16
|
+
// +horizontal-list-item
|
17
|
+
|
18
|
+
@import "bullets";
|
19
|
+
@import "compass/utilities/general/clearfix";
|
20
|
+
@import "compass/utilities/general/reset";
|
21
|
+
@import "compass/utilities/general/float";
|
22
|
+
@import "compass/support";
|
23
|
+
|
24
|
+
// Can be mixed into any selector that target a ul or ol that is meant
|
25
|
+
// to have a horizontal layout. Used to implement +horizontal-list.
|
26
|
+
@mixin horizontal-list-container {
|
27
|
+
@include reset-box-model;
|
28
|
+
@include clearfix; }
|
29
|
+
|
30
|
+
// Can be mixed into any li selector that is meant to participate in a horizontal layout.
|
31
|
+
// Used to implement +horizontal-list.
|
32
|
+
//
|
33
|
+
// :last-child is not fully supported
|
34
|
+
// see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
|
35
|
+
//
|
36
|
+
// IE8 ignores rules that are included on the same line as :last-child
|
37
|
+
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
|
38
|
+
//
|
39
|
+
// Setting `$padding` to `false` disables the padding between list elements
|
40
|
+
@mixin horizontal-list-item($padding: 4px, $direction: left) {
|
41
|
+
@include no-bullet;
|
42
|
+
white-space: nowrap;
|
43
|
+
@include float($direction);
|
44
|
+
@if $padding {
|
45
|
+
padding: {
|
46
|
+
left: $padding;
|
47
|
+
right: $padding;
|
48
|
+
}
|
49
|
+
&:first-child #{if(support-legacy-browser("ie", "6", $threshold: $css-sel2-support-threshold), ', &.first', '')} { padding-#{$direction}: 0; }
|
50
|
+
&:last-child { padding-#{opposite-position($direction)}: 0; }
|
51
|
+
@if support-legacy-browser("ie", "7", $threshold: $css-sel2-support-threshold) {
|
52
|
+
&.last { padding-#{opposite-position($direction)}: 0; } }
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
// A list(ol,ul) that is layed out such that the elements are floated left and won't wrap.
|
57
|
+
// This is not an inline list.
|
58
|
+
//
|
59
|
+
// Setting `$padding` to `false` disables the padding between list elements
|
60
|
+
@mixin horizontal-list($padding: 4px, $direction: left) {
|
61
|
+
@include horizontal-list-container;
|
62
|
+
li {
|
63
|
+
@include horizontal-list-item($padding, $direction); } }
|
@@ -0,0 +1,50 @@
|
|
1
|
+
// Inline-Block list layout module.
|
2
|
+
//
|
3
|
+
// Easy mode using simple descendant li selectors:
|
4
|
+
//
|
5
|
+
// ul.nav {
|
6
|
+
// @import inline-block-list;
|
7
|
+
// }
|
8
|
+
//
|
9
|
+
// Advanced mode:
|
10
|
+
// If you need to target the list items using a different selector then use
|
11
|
+
// `@include inline-block-list-container` on your ul/ol and
|
12
|
+
// `@include inline-block-list-item` on your li. This may help when working
|
13
|
+
// on layouts involving nested lists. For example:
|
14
|
+
//
|
15
|
+
// ul.nav {
|
16
|
+
// @include inline-block-list-container;
|
17
|
+
// > li {
|
18
|
+
// @include inline-block-list-item;
|
19
|
+
// }
|
20
|
+
// }
|
21
|
+
|
22
|
+
@import "bullets";
|
23
|
+
@import "horizontal-list";
|
24
|
+
@import "compass/utilities/general/float";
|
25
|
+
@import "compass/css3/inline-block";
|
26
|
+
|
27
|
+
// Can be mixed into any selector that target a ul or ol that is meant
|
28
|
+
// to have an inline-block layout. Used to implement `inline-block-list`.
|
29
|
+
@mixin inline-block-list-container {
|
30
|
+
@include horizontal-list-container; }
|
31
|
+
|
32
|
+
// Can be mixed into any li selector that is meant to participate in a horizontal layout.
|
33
|
+
// Used to implement `inline-block-list`.
|
34
|
+
@mixin inline-block-list-item($padding: false) {
|
35
|
+
@include no-bullet;
|
36
|
+
@include inline-block;
|
37
|
+
white-space: nowrap;
|
38
|
+
@if $padding {
|
39
|
+
padding: {
|
40
|
+
left: $padding;
|
41
|
+
right: $padding;
|
42
|
+
};
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap.
|
47
|
+
@mixin inline-block-list($padding: false) {
|
48
|
+
@include inline-block-list-container;
|
49
|
+
li {
|
50
|
+
@include inline-block-list-item($padding); } }
|