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,47 @@
|
|
1
|
+
@import "compass/support";
|
2
|
+
|
3
|
+
// makes a list inline.
|
4
|
+
@mixin inline-list {
|
5
|
+
list-style-type: none;
|
6
|
+
&, & li {
|
7
|
+
margin: 0;
|
8
|
+
padding: 0;
|
9
|
+
display: inline;
|
10
|
+
}
|
11
|
+
}
|
12
|
+
|
13
|
+
// makes an inline list delimited with the passed string.
|
14
|
+
// Defaults to making a comma-separated list.
|
15
|
+
//
|
16
|
+
// Please make note of the browser support issues before using this mixin:
|
17
|
+
//
|
18
|
+
// use of `content` and `:after` is not fully supported in all browsers.
|
19
|
+
// See quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t15)
|
20
|
+
//
|
21
|
+
// `:last-child` is not fully supported.
|
22
|
+
// see quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t29).
|
23
|
+
//
|
24
|
+
// IE8 ignores rules that are included on the same line as :last-child
|
25
|
+
// see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
|
26
|
+
|
27
|
+
@mixin delimited-list($separator: ", ") {
|
28
|
+
@include inline-list;
|
29
|
+
li {
|
30
|
+
&:after { content: $separator; }
|
31
|
+
&:last-child {
|
32
|
+
&:after { content: ""; }
|
33
|
+
}
|
34
|
+
@if support-legacy-browser("ie", "7", $threshold: $css-sel2-support-threshold) {
|
35
|
+
&.last {
|
36
|
+
&:after { content: ""; }
|
37
|
+
}
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
// See [delimited-list](#mixin-delimited-list)
|
43
|
+
// @deprecated
|
44
|
+
@mixin comma-delimited-list {
|
45
|
+
@warn "comma-delimited-list is deprecated. Please use delimited-list instead.";
|
46
|
+
@include delimited-list;
|
47
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
@import "compass/css3/deprecated-support";
|
2
|
+
|
3
|
+
// To get full firefox support, you must install the ellipsis pattern:
|
4
|
+
//
|
5
|
+
// compass install compass/ellipsis
|
6
|
+
$use-mozilla-ellipsis-binding: false !default;
|
7
|
+
|
8
|
+
// This technique, by [Justin Maxwell](http://code404.com/), was originally
|
9
|
+
// published [here](http://mattsnider.com/css/css-string-truncation-with-ellipsis/).
|
10
|
+
// Firefox implementation by [Rikkert Koppes](http://www.rikkertkoppes.com/thoughts/2008/6/).
|
11
|
+
@mixin ellipsis($no-wrap: true) {
|
12
|
+
@if $no-wrap { white-space: nowrap; }
|
13
|
+
overflow: hidden;
|
14
|
+
@include experimental(text-overflow, ellipsis,
|
15
|
+
not -moz,
|
16
|
+
not -webkit,
|
17
|
+
-o,
|
18
|
+
-ms,
|
19
|
+
not -khtml,
|
20
|
+
official
|
21
|
+
);
|
22
|
+
@if $legacy-support-for-mozilla and $use-mozilla-ellipsis-binding {
|
23
|
+
-moz-binding: stylesheet-url(unquote("xml/ellipsis.xml#ellipsis"));
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// Prevent long urls and text from breaking layouts
|
2
|
+
// [originally from perishablepress.com](http://perishablepress.com/press/2010/06/01/wrapping-content/)
|
3
|
+
@mixin force-wrap {
|
4
|
+
white-space: pre; // CSS 2.0
|
5
|
+
white-space: pre-wrap; // CSS 2.1
|
6
|
+
white-space: pre-line; // CSS 3.0
|
7
|
+
white-space: -pre-wrap; // Opera 4-6
|
8
|
+
white-space: -o-pre-wrap; // Opera 7
|
9
|
+
white-space: -moz-pre-wrap; // Mozilla
|
10
|
+
white-space: -hp-pre-wrap; // HP Printers
|
11
|
+
word-wrap: break-word; // IE 5+
|
12
|
+
}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
@import "compass/support";
|
2
|
+
|
3
|
+
// Indicates the direction you prefer to move your text
|
4
|
+
// when hiding it.
|
5
|
+
//
|
6
|
+
// `left` is more robust, especially in older browsers.
|
7
|
+
// `right` seems have better runtime performance.
|
8
|
+
$hide-text-direction: left !default;
|
9
|
+
|
10
|
+
// Hides html text and replaces it with an image.
|
11
|
+
// If you use this on an inline element, you will need to change the display to block or inline-block.
|
12
|
+
// Also, if the size of the image differs significantly from the font size, you'll need to set the width and/or height.
|
13
|
+
//
|
14
|
+
// Parameters:
|
15
|
+
//
|
16
|
+
// * `img` -- the relative path from the project image directory to the image, or a url literal.
|
17
|
+
// * `x` -- the x position of the background image.
|
18
|
+
// * `y` -- the y position of the background image.
|
19
|
+
@mixin replace-text($img, $x: 50%, $y: 50%) {
|
20
|
+
@include hide-text;
|
21
|
+
background: {
|
22
|
+
@if is-url($img) {
|
23
|
+
image: $img;
|
24
|
+
} @else {
|
25
|
+
image: image-url($img);
|
26
|
+
}
|
27
|
+
repeat: no-repeat;
|
28
|
+
position: $x $y;
|
29
|
+
};
|
30
|
+
}
|
31
|
+
|
32
|
+
// Like the `replace-text` mixin, but also sets the width
|
33
|
+
// and height of the element according the dimensions of the image.
|
34
|
+
//
|
35
|
+
// If you set `$inline` to true, then an inline image (data uri) will be used.
|
36
|
+
@mixin replace-text-with-dimensions($img, $x: 50%, $y: 50%, $inline: false) {
|
37
|
+
@include replace-text(if($inline, inline-image($img), $img), $x, $y);
|
38
|
+
width: image-width($img);
|
39
|
+
height: image-height($img);
|
40
|
+
}
|
41
|
+
|
42
|
+
// Hides text in an element so you can see the background.
|
43
|
+
//
|
44
|
+
// The direction indicates how the text should be moved out of view.
|
45
|
+
//
|
46
|
+
// See `$hide-text-direction` for more information and to set this globally
|
47
|
+
// for your application.
|
48
|
+
@mixin hide-text($direction: $hide-text-direction) {
|
49
|
+
@if $direction == left {
|
50
|
+
$approximate-em-value: 12px / 1em;
|
51
|
+
$wider-than-any-screen: -9999em;
|
52
|
+
text-indent: $wider-than-any-screen * $approximate-em-value;
|
53
|
+
overflow: hidden;
|
54
|
+
text-align: left;
|
55
|
+
} @else {
|
56
|
+
// slightly wider than the box prevents issues with inline-block elements
|
57
|
+
text-indent: 110%;
|
58
|
+
white-space: nowrap;
|
59
|
+
overflow: hidden;
|
60
|
+
}
|
61
|
+
@include for-legacy-browsers((ie: "7"), $critical-usage-threshold) {
|
62
|
+
//Text transform capitalize fixes text-replacement issue when used in a <button> element on ie7
|
63
|
+
text-transform:capitalize;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
// Hides text in an element by squishing the text into oblivion.
|
68
|
+
// Use this if you need to hide text contained in an inline element
|
69
|
+
// but still have it read by a screen reader.
|
70
|
+
@mixin squish-text {
|
71
|
+
font: 0/0 serif;
|
72
|
+
text-shadow: none;
|
73
|
+
color: transparent;
|
74
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
@import "color/contrast";
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// Classes that are useful for controlling what gets printed.
|
2
|
+
// You must mix `+print-utilities` into your print stylesheet
|
3
|
+
// and `+print-utilities(screen)` into your screen stylesheet.
|
4
|
+
// Note: these aren't semantic.
|
5
|
+
@mixin print-utilities($media: print) {
|
6
|
+
@if $media == print {
|
7
|
+
.noprint, .no-print { display: none; }
|
8
|
+
#{elements-of-type(block)} {
|
9
|
+
&.print-only { display: block; }
|
10
|
+
}
|
11
|
+
#{elements-of-type(inline)} {
|
12
|
+
&.print-only { display: inline; }
|
13
|
+
}
|
14
|
+
} @else {
|
15
|
+
.print-only { display: none; }
|
16
|
+
}
|
17
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// Computes the "brightness" of a color
|
2
|
+
//
|
3
|
+
// Brightness is similiar to lightness in HSL but more closely approximates
|
4
|
+
// how humans perceive the intensity of the different RGB components of
|
5
|
+
// a color. Brightness is sometimes called luminance.
|
6
|
+
//
|
7
|
+
// Returns a number between 0% and 100%, where 100% is fully bright
|
8
|
+
// (white) and 0% is fully dark (black) for color values.
|
9
|
+
//
|
10
|
+
// For numbers and percentages it returns the same value to be used
|
11
|
+
// in `@include filter(brightness(1.1))`.
|
12
|
+
@function brightness($color) {
|
13
|
+
@if type-of($color) == color {
|
14
|
+
@return ((red($color) * .299) + (green($color) * .587) + (blue($color) * .114)) / 255 * 100%;
|
15
|
+
}
|
16
|
+
@else {
|
17
|
+
@return unquote("brightness(#{$color})");
|
18
|
+
}
|
19
|
+
}
|
20
|
+
|
@@ -0,0 +1,52 @@
|
|
1
|
+
@import "compass/utilities/color/brightness";
|
2
|
+
|
3
|
+
$contrasted-dark-default: #000 !default;
|
4
|
+
$contrasted-light-default: #fff !default;
|
5
|
+
|
6
|
+
// Returns either the `$light` or `$dark` color
|
7
|
+
// by deciding which contrasts more with `$color`.
|
8
|
+
//
|
9
|
+
// E.g. This can be used to select the more readable foreground color
|
10
|
+
// for a given background color.
|
11
|
+
//
|
12
|
+
// `$dark` defaults to black and `$light` defaults to white.
|
13
|
+
//
|
14
|
+
// When `$color` is `null`, this function returns `null`.
|
15
|
+
@function contrast-color(
|
16
|
+
$color,
|
17
|
+
$dark: $contrasted-dark-default,
|
18
|
+
$light: $contrasted-light-default,
|
19
|
+
$threshold: null
|
20
|
+
) {
|
21
|
+
@if $threshold {
|
22
|
+
// Deprecated in Compass 0.13
|
23
|
+
@warn "The $threshold argment to contrast-color is no longer needed and will be removed in the next release."
|
24
|
+
}
|
25
|
+
@if $color == null {
|
26
|
+
@return null;
|
27
|
+
}
|
28
|
+
@else {
|
29
|
+
$color-brightness: brightness($color);
|
30
|
+
$dark-text-brightness: brightness($dark);
|
31
|
+
$light-text-brightness: brightness($light);
|
32
|
+
|
33
|
+
@return if(abs($color-brightness - $light-text-brightness) > abs($color-brightness - $dark-text-brightness), $light, $dark);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
// Sets the specified background color and calculates a dark or light
|
38
|
+
// contrasted text color. The arguments are passed through to the
|
39
|
+
// [contrast-color function](#function-contrast-color).
|
40
|
+
@mixin contrasted(
|
41
|
+
$background-color,
|
42
|
+
$dark: $contrasted-dark-default,
|
43
|
+
$light: $contrasted-light-default,
|
44
|
+
$threshold: null
|
45
|
+
) {
|
46
|
+
@if $threshold {
|
47
|
+
// Deprecated in Compass 0.13
|
48
|
+
@warn "The $threshold argment to contrasted is no longer needed and will be removed in the next release."
|
49
|
+
}
|
50
|
+
background-color: $background-color;
|
51
|
+
color: contrast-color($background-color, $dark, $light);
|
52
|
+
}
|
@@ -0,0 +1,44 @@
|
|
1
|
+
// @doc off
|
2
|
+
// Extends the bottom of the element to enclose any floats it contains.
|
3
|
+
// @doc on
|
4
|
+
|
5
|
+
@import "hacks";
|
6
|
+
|
7
|
+
// This basic method is preferred for the usual case, when positioned
|
8
|
+
// content will not show outside the bounds of the container.
|
9
|
+
//
|
10
|
+
// Recommendations include using this in conjunction with a width.
|
11
|
+
// Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html)
|
12
|
+
@mixin clearfix {
|
13
|
+
overflow: hidden;
|
14
|
+
@include has-layout;
|
15
|
+
}
|
16
|
+
|
17
|
+
// This older method from Position Is Everything called
|
18
|
+
// [Easy Clearing](http://www.positioniseverything.net/easyclearing.html)
|
19
|
+
// has the advantage of allowing positioned elements to hang
|
20
|
+
// outside the bounds of the container at the expense of more tricky CSS.
|
21
|
+
@mixin legacy-pie-clearfix {
|
22
|
+
&:after {
|
23
|
+
content : "\0020";
|
24
|
+
display : block;
|
25
|
+
height : 0;
|
26
|
+
clear : both;
|
27
|
+
overflow : hidden;
|
28
|
+
visibility : hidden;
|
29
|
+
}
|
30
|
+
@include has-layout;
|
31
|
+
}
|
32
|
+
|
33
|
+
// This is an updated version of the PIE clearfix method that reduces the amount of CSS output.
|
34
|
+
// If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead.
|
35
|
+
//
|
36
|
+
// Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/)
|
37
|
+
@mixin pie-clearfix {
|
38
|
+
&:after {
|
39
|
+
content: "";
|
40
|
+
display: table;
|
41
|
+
clear: both;
|
42
|
+
}
|
43
|
+
@include has-layout;
|
44
|
+
}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
@import "compass/support";
|
2
|
+
|
3
|
+
// The legacy support threshold for float.
|
4
|
+
// Defaults to the $critical-usage-threshold.
|
5
|
+
$legacy-float-support-threshold: $critical-usage-threshold !default;
|
6
|
+
|
7
|
+
// Implementation of float:left with fix for the
|
8
|
+
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
|
9
|
+
@mixin float-left {
|
10
|
+
@include float(left); }
|
11
|
+
|
12
|
+
// Implementation of float:right with fix for the
|
13
|
+
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
|
14
|
+
@mixin float-right {
|
15
|
+
@include float(right); }
|
16
|
+
|
17
|
+
// Direction independent float mixin that fixes the
|
18
|
+
// [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
|
19
|
+
@mixin float($side: left) {
|
20
|
+
float: unquote($side);
|
21
|
+
@if support-legacy-browser("ie", "6", $threshold: $legacy-float-support-threshold) {
|
22
|
+
display: inline; } }
|
23
|
+
|
24
|
+
// Resets floated elements back to their default of `float: none` and defaults
|
25
|
+
// to `display: block` unless you pass `inline` as an argument
|
26
|
+
//
|
27
|
+
// Usage Example:
|
28
|
+
//
|
29
|
+
// body.homepage
|
30
|
+
// #footer li
|
31
|
+
// +float-left
|
32
|
+
// body.signup
|
33
|
+
// #footer li
|
34
|
+
// +reset-float
|
35
|
+
@mixin reset-float($display: block) {
|
36
|
+
float: none;
|
37
|
+
@if support-legacy-browser("ie", "6", $threshold: $legacy-float-support-threshold) {
|
38
|
+
display: $display; } }
|
@@ -0,0 +1,65 @@
|
|
1
|
+
@import "compass/support";
|
2
|
+
|
3
|
+
// The legacy support threshold for has-layout.
|
4
|
+
// Defaults to the $critical-usage-threshold.
|
5
|
+
$has-layout-support-threshold: $critical-usage-threshold !default;
|
6
|
+
|
7
|
+
// The `zoom` approach generates less CSS but does not validate.
|
8
|
+
// Set this to `block` to use the display-property to hack the
|
9
|
+
// element to gain layout.
|
10
|
+
$default-has-layout-approach: zoom !default;
|
11
|
+
|
12
|
+
// This mixin causes an element matching the selector
|
13
|
+
// to gain the "hasLayout" property in internet explorer.
|
14
|
+
// More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
|
15
|
+
@mixin has-layout($approach: $default-has-layout-approach) {
|
16
|
+
@if support-legacy-browser("ie", "7", $threshold: $has-layout-support-threshold) {
|
17
|
+
@if $approach == zoom {
|
18
|
+
@include has-layout-zoom;
|
19
|
+
} @else if $approach == block {
|
20
|
+
@include has-layout-block;
|
21
|
+
} @else {
|
22
|
+
@warn "Unknown has-layout approach: #{$approach}";
|
23
|
+
@include has-layout-zoom;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
@mixin has-layout-zoom {
|
29
|
+
@if support-legacy-browser("ie", "7", $threshold: $has-layout-support-threshold) {
|
30
|
+
*zoom: 1;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
@mixin has-layout-block {
|
35
|
+
@if support-legacy-browser("ie", "7", $threshold: $has-layout-support-threshold) {
|
36
|
+
// This makes ie6 get layout
|
37
|
+
display: inline-block;
|
38
|
+
// and this puts it back to block
|
39
|
+
& { display: block; }
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
// The legacy support threshold for IE6 attribute hack.
|
45
|
+
// Defaults to the $critical-usage-threshold.
|
46
|
+
$ie6-attribute-hack-support-threshold: $critical-usage-threshold !default;
|
47
|
+
|
48
|
+
// A hack to supply IE6 (and below) with a different property value.
|
49
|
+
// [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
|
50
|
+
@mixin bang-hack($property, $value, $ie6-value) {
|
51
|
+
@if support-legacy-browser("ie", "6", $threshold: $ie6-attribute-hack-support-threshold) {
|
52
|
+
@warn "it's recommended to use the underscore-hack() mixin instead of bang-hack()";
|
53
|
+
#{$property}: #{$value} !important;
|
54
|
+
#{$property}: #{$ie6-value};
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
// A hack to supply IE6 (and below) with a different property value.
|
59
|
+
// [Read more](http://www.paulirish.com/2009/browser-specific-css-hacks/)
|
60
|
+
@mixin underscore-hack($property, $value, $ie6-value) {
|
61
|
+
@if support-legacy-browser("ie", "6", $threshold: $ie6-attribute-hack-support-threshold) {
|
62
|
+
#{$property}: #{$value};
|
63
|
+
_#{$property}: #{$ie6-value};
|
64
|
+
}
|
65
|
+
}
|