skeletor_backbone 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +43 -0
- data/Rakefile +1 -0
- data/app/assets/stylesheets/skeletor.sass +21 -0
- data/app/assets/stylesheets/skeletor/_all.sass +5 -0
- data/app/assets/stylesheets/skeletor/_css3.sass +26 -0
- data/app/assets/stylesheets/skeletor/_functions.sass +13 -0
- data/app/assets/stylesheets/skeletor/_mixins.sass +23 -0
- data/app/assets/stylesheets/skeletor/_settings.sass +153 -0
- data/app/assets/stylesheets/skeletor/base/debug.sass +132 -0
- data/app/assets/stylesheets/skeletor/base/foundation.sass +537 -0
- data/app/assets/stylesheets/skeletor/base/helpers.sass +203 -0
- data/app/assets/stylesheets/skeletor/base/print.sass +46 -0
- data/app/assets/stylesheets/skeletor/base/reset.sass +125 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_animation.sass +34 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_appearance.sass +39 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_backface_visibility.sass +36 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_border_radius.sass +75 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_box_shadow.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_box_sizing.sass +40 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_flexbox.sass +179 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_gradients.sass +54 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_hyphens.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_perspective.sass +50 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_prefixer.sass +76 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_tab_size.sass +39 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_text_shadow.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_transform.sass +112 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_transition.sass +35 -0
- data/app/assets/stylesheets/skeletor/globals/css3/_user_select.sass +39 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_em.sass +43 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_modular_scale.sass +85 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_percent.sass +42 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_calculate_rem.sass +42 -0
- data/app/assets/stylesheets/skeletor/globals/functions/_strip_units.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_accessibility.sass +49 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_grid_pull.sass +311 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_grid_push.sass +313 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_grid_widths.sass +275 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_hidpi.sass +38 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_media_query.sass +71 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_opacity.sass +36 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_position.sass +65 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_rem.sass +102 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_retina_image.sass +53 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_rgba.sass +37 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_silent_relative.sass +41 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_size.sass +71 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_triangle.sass +69 -0
- data/app/assets/stylesheets/skeletor/globals/mixins/_truncate_text.sass +41 -0
- data/app/assets/stylesheets/skeletor/globals/settings/_easing.sass +47 -0
- data/app/assets/stylesheets/skeletor/globals/settings/_font_stacks.sass +65 -0
- data/app/assets/stylesheets/skeletor/globals/settings/_html5_input_types.sass +51 -0
- data/app/assets/stylesheets/skeletor/layout/_grid.sass +147 -0
- data/app/assets/stylesheets/skeletor/layout/skeleton.sass +58 -0
- data/lib/generators/skeletor/install_generator.rb +26 -0
- data/lib/sass/sass_extend.rb +107 -0
- data/lib/skeletor_backbone.rb +23 -0
- data/lib/skeletor_backbone/version.rb +3 -0
- data/skeletor_backbone.gemspec +26 -0
- data/vendor/assets/stylesheets/normalize.css +406 -0
- metadata +163 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Perspective
|
3
|
+
//
|
4
|
+
// The perspective property gives an element a 3d-space by affecting the
|
5
|
+
// distance between the Z plane and the user.
|
6
|
+
//
|
7
|
+
// http://www.w3.org/TR/css3-3d-transforms/#perspective-property
|
8
|
+
// http://www.w3.org/TR/css3-3d-transforms/#perspective-origin-property
|
9
|
+
// http://css-tricks.com/almanac/properties/p/perspective/
|
10
|
+
//
|
11
|
+
// =============================================================================
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
// -----------------------------------------------------------------------------
|
16
|
+
// Perspective
|
17
|
+
// -----------------------------------------------------------------------------
|
18
|
+
=skeletor-perspective($args)
|
19
|
+
+skeletor-prefixer(perspective, unquote($args))
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
// -----------------------------------------------------------------------------
|
24
|
+
// Perspective Origin
|
25
|
+
// -----------------------------------------------------------------------------
|
26
|
+
=skeletor-perspective-origin($args)
|
27
|
+
+skeletor-prefixer(perspective-origin, unquote($args))
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
// -----------------------------------------------------------------------------
|
32
|
+
// Alias for perspective classes
|
33
|
+
// -----------------------------------------------------------------------------
|
34
|
+
=s-perspective($args)
|
35
|
+
+skeletor-perspective($args)
|
36
|
+
|
37
|
+
=s-perspective-origin($args)
|
38
|
+
+skeletor-perspective-origin($args)
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
// -----------------------------------------------------------------------------
|
43
|
+
// If no-conflict set to allow shorter mixin names
|
44
|
+
// -----------------------------------------------------------------------------
|
45
|
+
// @if $no-conflict
|
46
|
+
// =perspective($args)
|
47
|
+
// +skeletor-perspective($args)
|
48
|
+
|
49
|
+
// =perspective-origin($args)
|
50
|
+
// +skeletor-perspective-origin($args)
|
@@ -0,0 +1,76 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Prefixer Classes
|
3
|
+
//
|
4
|
+
// The prefixer mixin is used primarily by css3 mixins to easily generate
|
5
|
+
// browser property and value prefixes when needed.
|
6
|
+
//
|
7
|
+
// Available As:
|
8
|
+
// +skeletor-prefixer()
|
9
|
+
// +s-prefixer()
|
10
|
+
// +skeletor-prefixer-value()
|
11
|
+
// +s-prefixer-value()
|
12
|
+
//
|
13
|
+
// =============================================================================
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
// -----------------------------------------------------------------------------
|
18
|
+
// Prefix Property with vendor 'prefixes'
|
19
|
+
// -----------------------------------------------------------------------------
|
20
|
+
=skeletor-prefixer($property, $value, $supportWebkit: $webkitSupport, $supportFirefox: $firefoxSupport, $supportExplorer: $explorerSupport, $supportOpera: $operaSupport)
|
21
|
+
@if $supportWebkit
|
22
|
+
-webkit-#{$property}: $value
|
23
|
+
|
24
|
+
@if $supportFirefox
|
25
|
+
-moz-#{$property}: $value
|
26
|
+
|
27
|
+
@if $supportExplorer
|
28
|
+
-ms-#{$property}: $value
|
29
|
+
|
30
|
+
@if $supportOpera
|
31
|
+
-o-#{$property}: $value
|
32
|
+
|
33
|
+
#{$property}: $value
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
// -----------------------------------------------------------------------------
|
38
|
+
// Prefix Property with values 'prefixes'
|
39
|
+
// -----------------------------------------------------------------------------
|
40
|
+
=skeletor-prefixer-value($property, $value, $supportWebkit: $webkitSupport, $supportFirefox: $firefoxSupport, $supportExplorer: $explorerSupport, $supportOpera: $operaSupport)
|
41
|
+
@if $supportWebkit
|
42
|
+
#{$property}: -webkit-#{$value}
|
43
|
+
|
44
|
+
@if $supportFirefox
|
45
|
+
#{$property}: -moz-#{$value}
|
46
|
+
|
47
|
+
@if $supportExplorer
|
48
|
+
#{$property}: -ms-#{$value}
|
49
|
+
|
50
|
+
@if $supportOpera
|
51
|
+
#{$property}: -o-#{$value}
|
52
|
+
|
53
|
+
#{$property}: $value
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
// -----------------------------------------------------------------------------
|
58
|
+
// Alias for prefixer classes
|
59
|
+
// -----------------------------------------------------------------------------
|
60
|
+
=s-prefixer($property, $value, $supportWebkit: $webkitSupport, $supportFirefox: $firefoxSupport, $supportExplorer: $explorerSupport, $supportOpera: $operaSupport)
|
61
|
+
+skeletor-prefixer($property, $value, $supportWebkit, $supportFirefox, $supportExplorer, $supportOpera)
|
62
|
+
|
63
|
+
=s-prefixer-value($property, $value, $supportWebkit: $webkitSupport, $supportFirefox: $firefoxSupport, $supportExplorer: $explorerSupport, $supportOpera: $operaSupport)
|
64
|
+
+skeletor-prefixer-value($property, $value, $supportWebkit, $supportFirefox, $supportExplorer, $supportOpera)
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
// -----------------------------------------------------------------------------
|
69
|
+
// If no-conflict set to allow shorter mixin names
|
70
|
+
// -----------------------------------------------------------------------------
|
71
|
+
// @if $no-conflict
|
72
|
+
// =prefixer($property, $value, $supportWebkit: $webkitSupport, $supportFirefox: $firefoxSupport, $supportExplorer: $explorerSupport, $supportOpera: $operaSupport)
|
73
|
+
// +skeletor-prefixer($property, $value, $supportWebkit, $supportFirefox, $supportExplorer, $supportOpera)
|
74
|
+
|
75
|
+
// =prefixer-value($property, $value, $supportWebkit: $webkitSupport, $supportFirefox: $firefoxSupport, $supportExplorer: $explorerSupport, $supportOpera: $operaSupport)
|
76
|
+
// +skeletor-prefixer-value($property, $value, $supportWebkit, $supportFirefox, $supportExplorer, $supportOpera)
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Tab Size Mixin
|
3
|
+
//
|
4
|
+
// The tab-size property in CSS is used to adjust the amount of spaces that
|
5
|
+
// display for the tab character.
|
6
|
+
//
|
7
|
+
// Available As:
|
8
|
+
// +skeletor-tab-size()
|
9
|
+
// +s-tab-size()
|
10
|
+
//
|
11
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size
|
12
|
+
// http://css-tricks.com/almanac/properties/t/tab-size/
|
13
|
+
//
|
14
|
+
// =============================================================================
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
// -----------------------------------------------------------------------------
|
19
|
+
// Tab Size
|
20
|
+
// -----------------------------------------------------------------------------
|
21
|
+
=skeletor-tab-size($args)
|
22
|
+
+skeletor-prefixer(tab-size, unquote($args), false, true, false, true)
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
// -----------------------------------------------------------------------------
|
27
|
+
// Alias for tab size classes
|
28
|
+
// -----------------------------------------------------------------------------
|
29
|
+
=s-tab-size($args)
|
30
|
+
+skeletor-tab-size($args)
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
// -----------------------------------------------------------------------------
|
35
|
+
// If no-conflict set to allow shorter mixin names
|
36
|
+
// -----------------------------------------------------------------------------
|
37
|
+
// @if $no-conflict
|
38
|
+
// =tab-size($args)
|
39
|
+
// +skeletor-tab-size($args)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Text Shadow
|
3
|
+
//
|
4
|
+
// The text-shadow property is used to attach a shadow to text.
|
5
|
+
//
|
6
|
+
// Additional As:
|
7
|
+
// +skeletor-text-shadow()
|
8
|
+
// +s-text-shadow()
|
9
|
+
//
|
10
|
+
// http://www.w3.org/TR/css3-text/#text-shadow
|
11
|
+
// http://css-tricks.com/almanac/properties/a/appearance/
|
12
|
+
//
|
13
|
+
// =============================================================================
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
// -----------------------------------------------------------------------------
|
18
|
+
// Text Shadow
|
19
|
+
// -----------------------------------------------------------------------------
|
20
|
+
=skeletor-text-shadow($args)
|
21
|
+
+skeletor-prefixer(text-shadow, unquote($args))
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
// -----------------------------------------------------------------------------
|
26
|
+
// Alias for text-shadow classes
|
27
|
+
// -----------------------------------------------------------------------------
|
28
|
+
=s-text-shadow($args)
|
29
|
+
+skeletor-text-shadow($args)
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
// -----------------------------------------------------------------------------
|
34
|
+
// If no-conflict set to allow shorter mixin names
|
35
|
+
// -----------------------------------------------------------------------------
|
36
|
+
// @if $no-conflict
|
37
|
+
// =text-shadow($args)
|
38
|
+
// +skeletor-text-shadow($args)
|
@@ -0,0 +1,112 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Transform
|
3
|
+
//
|
4
|
+
// The transform property allows you to visually manipulate elements,
|
5
|
+
// transforming their appearance.
|
6
|
+
//
|
7
|
+
// http://www.w3.org/TR/css3-2d-transforms/
|
8
|
+
// http://www.w3.org/TR/css3-3d-transforms/#transform-origin-property
|
9
|
+
// http://www.w3.org/TR/css3-3d-transforms/#transform-style-property
|
10
|
+
// http://www.w3.org/TR/css3-3d-transforms/#transform-functions
|
11
|
+
// http://css-tricks.com/almanac/properties/t/transform/
|
12
|
+
//
|
13
|
+
// =============================================================================
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
// -----------------------------------------------------------------------------
|
18
|
+
// Transform
|
19
|
+
// -----------------------------------------------------------------------------
|
20
|
+
=skeletor-transform($args)
|
21
|
+
+skeletor-prefixer(transform, unquote($args))
|
22
|
+
|
23
|
+
// Shorthand transform mixins
|
24
|
+
=skeletor-matrix($args)
|
25
|
+
+skeletor-transform(matrix(unquote($args)))
|
26
|
+
|
27
|
+
=skeletor-translate($args)
|
28
|
+
+skeletor-transform(translate(unquote($args)))
|
29
|
+
|
30
|
+
=skeletor-scale($args)
|
31
|
+
+skeletor-transform(scale(unquote($args)))
|
32
|
+
|
33
|
+
=skeletor-rotate($args)
|
34
|
+
+skeletor-transform(rotate(unquote($args)))
|
35
|
+
|
36
|
+
=skeletor-skew($args)
|
37
|
+
+skeletor-transform(skew(unquote($args)))
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
// -----------------------------------------------------------------------------
|
42
|
+
// Transform Origin
|
43
|
+
// -----------------------------------------------------------------------------
|
44
|
+
=skeletor-transform-origin($args)
|
45
|
+
+skeletor-prefixer(transform-origin, unquote($args))
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
// -----------------------------------------------------------------------------
|
50
|
+
// Transform Style
|
51
|
+
// -----------------------------------------------------------------------------
|
52
|
+
=skeletor-transform-style($args)
|
53
|
+
+skeletor-prefixer(transform-style, unquote($args))
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
// -----------------------------------------------------------------------------
|
58
|
+
// Alias for transform classes
|
59
|
+
// -----------------------------------------------------------------------------
|
60
|
+
=s-transform($args)
|
61
|
+
+skeletor-transform($args)
|
62
|
+
|
63
|
+
=s-transform-origin($args)
|
64
|
+
+skeletor-transform-origin($args)
|
65
|
+
|
66
|
+
=s-transform-style($args)
|
67
|
+
+skeletor-transform-style($args)
|
68
|
+
|
69
|
+
=s-matrix($args)
|
70
|
+
+skeletor-matrix($args)
|
71
|
+
|
72
|
+
=s-translate($args)
|
73
|
+
+skeletor-translate($args)
|
74
|
+
|
75
|
+
=s-scale($args)
|
76
|
+
+skeletor-scale($args)
|
77
|
+
|
78
|
+
=s-rotate($args)
|
79
|
+
+skeletor-rotate($args)
|
80
|
+
|
81
|
+
=s-skew($args)
|
82
|
+
+skeletor-skew($args)
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
// -----------------------------------------------------------------------------
|
87
|
+
// If no-conflict set to allow shorter mixin names
|
88
|
+
// -----------------------------------------------------------------------------
|
89
|
+
// @if $no-conflict
|
90
|
+
// =transform($args)
|
91
|
+
// +skeletor-transform($args)
|
92
|
+
|
93
|
+
// =transform-origin($args)
|
94
|
+
// +skeletor-transform-origin($args)
|
95
|
+
|
96
|
+
// =transform-style($args)
|
97
|
+
// +skeletor-transform-style($args)
|
98
|
+
|
99
|
+
// =matrix($args)
|
100
|
+
// +skeletor-matrix($args)
|
101
|
+
|
102
|
+
// =translate($args)
|
103
|
+
// +skeletor-translate($args)
|
104
|
+
|
105
|
+
// =scale($args)
|
106
|
+
// +skeletor-scale($args)
|
107
|
+
|
108
|
+
// =rotate($args)
|
109
|
+
// +skeletor-rotate($args)
|
110
|
+
|
111
|
+
// =skew($args)
|
112
|
+
// +skeletor-skew($args)
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Transition
|
3
|
+
//
|
4
|
+
// The transition property is a shorthand property used to represent up to four
|
5
|
+
// transition-related longhand properties.
|
6
|
+
//
|
7
|
+
// http://www.w3.org/TR/css3-transitions/
|
8
|
+
// http://css-tricks.com/almanac/properties/t/transition/
|
9
|
+
//
|
10
|
+
// =============================================================================
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
// -----------------------------------------------------------------------------
|
15
|
+
// Transition
|
16
|
+
// -----------------------------------------------------------------------------
|
17
|
+
=skeletor-transition($args)
|
18
|
+
+skeletor-prefixer(transition, unquote($args))
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
// -----------------------------------------------------------------------------
|
23
|
+
// Alias for transition classes
|
24
|
+
// -----------------------------------------------------------------------------
|
25
|
+
=s-transition($args)
|
26
|
+
+skeletor-transition($args)
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
// -----------------------------------------------------------------------------
|
31
|
+
// If no-conflict set to allow shorter mixin names
|
32
|
+
// -----------------------------------------------------------------------------
|
33
|
+
// @if $no-conflict
|
34
|
+
// =transition($args)
|
35
|
+
// +skeletor-transition($args)
|
@@ -0,0 +1,39 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// User Select Mixins
|
3
|
+
//
|
4
|
+
// This is useful in situations where you want to provide an easier/cleaner
|
5
|
+
// copy-paste experience for users
|
6
|
+
//
|
7
|
+
// Available As:
|
8
|
+
// +skeletor-user-select()
|
9
|
+
// +s-user-select()
|
10
|
+
//
|
11
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/user-select
|
12
|
+
// http://css-tricks.com/almanac/properties/u/user-select/
|
13
|
+
//
|
14
|
+
// =============================================================================
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
// -----------------------------------------------------------------------------
|
19
|
+
// User Select
|
20
|
+
// -----------------------------------------------------------------------------
|
21
|
+
=skeletor-user-select($args)
|
22
|
+
+skeletor-prefixer(user-select, unquote($args))
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
// -----------------------------------------------------------------------------
|
27
|
+
// Alias for user select classes
|
28
|
+
// -----------------------------------------------------------------------------
|
29
|
+
=s-user-select($args)
|
30
|
+
+skeletor-user-select($args)
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
// -----------------------------------------------------------------------------
|
35
|
+
// If no-conflict set to allow shorter mixin names
|
36
|
+
// -----------------------------------------------------------------------------
|
37
|
+
// @if $no-conflict
|
38
|
+
// =user-select($args)
|
39
|
+
// +skeletor-user-select($args)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Calculate EM
|
3
|
+
//
|
4
|
+
// This function is used to return the calculated results of EM based on the
|
5
|
+
// provided pixel values.
|
6
|
+
//
|
7
|
+
// Available as:
|
8
|
+
// skeletor-calculate-em()
|
9
|
+
// s-calculate-em()
|
10
|
+
// s-ce()
|
11
|
+
//
|
12
|
+
// =============================================================================
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
// -----------------------------------------------------------------------------
|
17
|
+
// Calculate EM
|
18
|
+
// -----------------------------------------------------------------------------
|
19
|
+
@function skeletor-calculate-em($target, $context: $base-font-size)
|
20
|
+
//@if not unitless($target)
|
21
|
+
$target: skeletor-strip-units($target)
|
22
|
+
$context: skeletor-strip-units($context)
|
23
|
+
|
24
|
+
@return ($target / $context) * 1em
|
25
|
+
|
26
|
+
|
27
|
+
|
28
|
+
// -----------------------------------------------------------------------------
|
29
|
+
// Alias for calculate em function
|
30
|
+
// -----------------------------------------------------------------------------
|
31
|
+
@function s-calculate-em($target, $context: $base-font-size)
|
32
|
+
@return skeletor-calculate-em($target, $context)
|
33
|
+
|
34
|
+
@function s-ce($target, $context: $base-font-size)
|
35
|
+
@return skeletor-calculate-em($target, $context)
|
36
|
+
|
37
|
+
|
38
|
+
// -----------------------------------------------------------------------------
|
39
|
+
// If no-conflict set to allow shorter function names
|
40
|
+
// -----------------------------------------------------------------------------
|
41
|
+
// @if $no-conflict
|
42
|
+
// @function calculate-em($target, $context: $base-font-size)
|
43
|
+
// @return skeletor-calculate-em($target, $context)
|
@@ -0,0 +1,85 @@
|
|
1
|
+
// =============================================================================
|
2
|
+
// Calculate Modular Scale
|
3
|
+
//
|
4
|
+
// This function is responsible for making all the calculations related to the
|
5
|
+
// modular scale.
|
6
|
+
//
|
7
|
+
// Available as:
|
8
|
+
// skeletor-modular-scale()
|
9
|
+
// skeletor-ms()
|
10
|
+
// s-modular-scale()
|
11
|
+
// s-ms()
|
12
|
+
//
|
13
|
+
// =============================================================================
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
@function skeletor-modular-scale($position, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
18
|
+
@if $position == 0
|
19
|
+
@return $base-size
|
20
|
+
|
21
|
+
$result: power($ratio, $position) * $base-size
|
22
|
+
|
23
|
+
@if $round-pixels == true
|
24
|
+
$result: round($result)
|
25
|
+
|
26
|
+
@return $result
|
27
|
+
|
28
|
+
|
29
|
+
|
30
|
+
// -----------------------------------------------------------------------------
|
31
|
+
// Alias for modular scale function
|
32
|
+
// -----------------------------------------------------------------------------
|
33
|
+
@function skeletor-ms($position, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
34
|
+
@return skeletor-modular-scale($position, $base-size, $ratio, $round-pixels)
|
35
|
+
|
36
|
+
@function s-modular-scale($position, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
37
|
+
@return skeletor-modular-scale($position, $base-size, $ratio, $round-pixels)
|
38
|
+
|
39
|
+
@function s-ms($position, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
40
|
+
@return skeletor-modular-scale($position, $base-size, $ratio, $round-pixels)
|
41
|
+
|
42
|
+
|
43
|
+
// -----------------------------------------------------------------------------
|
44
|
+
// If no-conflict set to allow shorter function names
|
45
|
+
// -----------------------------------------------------------------------------
|
46
|
+
// @if $no-conflict
|
47
|
+
// @function ms($position, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
48
|
+
// @return skeletor-modular-scale($position, $base-size, $ratio, $round-pixels)
|
49
|
+
|
50
|
+
// @function modular-scale($position, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
51
|
+
// @return skeletor-modular-scale($position, $base-size, $ratio, $round-pixels)
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
// *****************************************************************************
|
58
|
+
// DEBUGGING
|
59
|
+
// *****************************************************************************
|
60
|
+
|
61
|
+
// Write Modular Scale List to command line
|
62
|
+
@function skeletor-modular-scale-list($start: 0, $finish: 20, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
63
|
+
$ms-list: unquote("MS-LIST:")
|
64
|
+
@for $i from $start through $finish
|
65
|
+
$ms-list: append($ms-list, ms($i, $base-size, $ratio, $round-pixels))
|
66
|
+
|
67
|
+
@return $ms-list
|
68
|
+
|
69
|
+
// Shortcut alias for modular-scale-list
|
70
|
+
@function skeletor-ms-list($start: 0, $finish: 20, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
71
|
+
@return skeletor-modular-scale-list($start, $finish, $base-size, $ratio, $round-pixels)
|
72
|
+
|
73
|
+
@function s-ms-list($start: 0, $finish: 20, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
74
|
+
@return skeletor-modular-scale-list($start, $finish, $base-size, $ratio, $round-pixels)
|
75
|
+
|
76
|
+
|
77
|
+
// Modular Scale Mixin for handling debugging to command line
|
78
|
+
=skeletor-modular-scale-list($start: 0, $finish: 20, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
79
|
+
@debug skeletor-modular-scale-list($start, $finish, $base-size, $ratio, $round-pixels)
|
80
|
+
|
81
|
+
=s-modular-scale-list($start: 0, $finish: 20, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
82
|
+
@debug skeletor-modular-scale-list($start, $finish, $base-size, $ratio, $round-pixels)
|
83
|
+
|
84
|
+
=s-ms-list($start: 0, $finish: 20, $base-size: $ms-base-size, $ratio: $ms-ratio, $round-pixels: $ms-round-pixels)
|
85
|
+
@debug skeletor-modular-scale-list($start, $finish, $base-size, $ratio, $round-pixels)
|