chosen.scss 1.0.4beta → 1.0.5beta
Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,62 @@
|
|
1
|
+
@mixin linear-gradient($colorStops, $direction: top, $legacyColorStop: 1, $ieColorStops: '')
|
2
|
+
{
|
3
|
+
@if $ieColorStops == ''
|
4
|
+
{
|
5
|
+
$ieColorStops: 1 length($colorStops);
|
6
|
+
}
|
7
|
+
|
8
|
+
$ieGradientType: if($direction == top or $direction == bottom, 0, 1);
|
9
|
+
|
10
|
+
background-color: nth(nth($colorStops, $legacyColorStop), 1);
|
11
|
+
@include has-layout;
|
12
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#{ie-hex-str(nth(nth($colorStops, nth($ieColorStops, 1)), 1))}', endColorstr='#{ie-hex-str(nth(nth($colorStops, nth($ieColorStops, 2)), 1))}', GradientType=#{$ieGradientType});
|
13
|
+
@include background(linear-gradient($direction, $colorStops));
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin dimensions($dimensions)
|
17
|
+
{
|
18
|
+
width: nth($dimensions, 1);
|
19
|
+
height: nth($dimensions, 2);
|
20
|
+
}
|
21
|
+
|
22
|
+
@mixin block($dimensions: 100% 100%)
|
23
|
+
{
|
24
|
+
display: block;
|
25
|
+
@include dimensions($dimensions);
|
26
|
+
}
|
27
|
+
|
28
|
+
@mixin pos($type, $position)
|
29
|
+
{
|
30
|
+
position: unquote($type);
|
31
|
+
@for $i from 1 through length($position)
|
32
|
+
{
|
33
|
+
@if type-of(nth($position, $i)) != 'number'
|
34
|
+
{
|
35
|
+
$coord: 0;
|
36
|
+
$tmp: $i;
|
37
|
+
|
38
|
+
@if $i < length($position) and type-of(nth($position, $i+1)) != 'string'
|
39
|
+
{
|
40
|
+
$coord: nth($position, $i+1);
|
41
|
+
$tmp: $i + 1;
|
42
|
+
}
|
43
|
+
|
44
|
+
#{nth($position, $i)}: $coord;
|
45
|
+
$i: $tmp;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
@mixin fixed($position)
|
52
|
+
{
|
53
|
+
@include pos('fixed', $position);
|
54
|
+
}
|
55
|
+
@mixin absolute($position)
|
56
|
+
{
|
57
|
+
@include pos('absolute', $position);
|
58
|
+
}
|
59
|
+
@mixin relative($position)
|
60
|
+
{
|
61
|
+
@include pos('relative', $position);
|
62
|
+
}
|
@@ -3,8 +3,49 @@
|
|
3
3
|
|
4
4
|
//Or import specific components:
|
5
5
|
//ALWAYS import base styles:
|
6
|
-
@import "chosen/chosen-base";
|
6
|
+
@import "chosen/chosen-base"; //Which will import chosen/chosen-mixins -> see methods beneath
|
7
7
|
//Then import any of these on a need basis:
|
8
8
|
@import "chosen/chosen-single";
|
9
9
|
@import "chosen/chosen-multi";
|
10
|
-
@import "chosen/chosen-rtl";
|
10
|
+
@import "chosen/chosen-rtl";
|
11
|
+
|
12
|
+
//chosen-mixins contains the following mixins:
|
13
|
+
//
|
14
|
+
// linear-gradient($colorStops, $direction: top, $legacyColorStop: 1, $ieColorStops: '')
|
15
|
+
// Params:
|
16
|
+
// $colorStops: A list of color stops and their position
|
17
|
+
// $direction: top|bottom|left|right
|
18
|
+
// $legacyColorStop: index in the list that will be used as background-color
|
19
|
+
// $ieColorStops: The two color stops from the list that will be used for IE. Default is first and last. Other Example: 2 4. This should be a SASS list
|
20
|
+
//
|
21
|
+
// Example:
|
22
|
+
//
|
23
|
+
// @include linear-gradient((#f00 0%, #0f0 50%, #00f 100%), top, 1, 1 2); //Uses the first and second color stop for IE
|
24
|
+
//
|
25
|
+
// dimensions($dimensions)
|
26
|
+
// Params:
|
27
|
+
// $dimensions: A list with width and then height.
|
28
|
+
//
|
29
|
+
// Example:
|
30
|
+
//
|
31
|
+
// @include dimensions(200px auto); //200px wide, height auto
|
32
|
+
//
|
33
|
+
// block($dimensions)
|
34
|
+
// Adds display:block to above mixin. Made for ease of reading scss styles.
|
35
|
+
// Params:
|
36
|
+
// see dimensions mixin
|
37
|
+
//
|
38
|
+
// pos($type, $position)
|
39
|
+
// Inspired by Stylus Compass equivilant nib's pos mixin
|
40
|
+
//
|
41
|
+
// Params:
|
42
|
+
// $type: absolute|fixed|relative|static|inherit
|
43
|
+
// $position: List of positions. See examples for absolute(), fixed(), relative()
|
44
|
+
//
|
45
|
+
// fixed($position), relative($position), absolute($position)
|
46
|
+
// All 'child' mixins of pos(). Made for ease of reading scss styles.
|
47
|
+
//
|
48
|
+
// Example(s):
|
49
|
+
// @include absolute(top right); //Absolutely positions an element in the top right corner
|
50
|
+
// @include relative(top 15px left -20px); //Relativly positions an element 15px down and 20px left
|
51
|
+
// @include fixed(top left 20px); //Fixes a postion at coordinates (0, 20), which is in the top and 20 px in from the left//
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chosen.scss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5beta
|
5
5
|
prerelease: 5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-04-02 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: compass
|
16
|
-
requirement: &
|
16
|
+
requirement: &70324066984200 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,9 +21,9 @@ dependencies:
|
|
21
21
|
version: '0.11'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
description:
|
26
|
-
email:
|
24
|
+
version_requirements: *70324066984200
|
25
|
+
description: A sass implementation of Chosen for Compass
|
26
|
+
email: compass@tixz.dk
|
27
27
|
executables: []
|
28
28
|
extensions: []
|
29
29
|
extra_rdoc_files: []
|
@@ -31,6 +31,7 @@ files:
|
|
31
31
|
- lib/chosen.scss.rb
|
32
32
|
- stylesheets/_chosen.scss
|
33
33
|
- stylesheets/chosen/_chosen-base.scss
|
34
|
+
- stylesheets/chosen/_chosen-mixins.scss
|
34
35
|
- stylesheets/chosen/_chosen-multi.scss
|
35
36
|
- stylesheets/chosen/_chosen-rtl.scss
|
36
37
|
- stylesheets/chosen/_chosen-single.scss
|
@@ -61,5 +62,5 @@ rubyforge_project:
|
|
61
62
|
rubygems_version: 1.8.11
|
62
63
|
signing_key:
|
63
64
|
specification_version: 3
|
64
|
-
summary:
|
65
|
+
summary: A sass implementation of Chosen for Compass
|
65
66
|
test_files: []
|