rtpl-compass 1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +102 -0
  3. data/lib/config.rb +5 -0
  4. data/lib/rtpl-compass.rb +60 -0
  5. data/templates/project/css/dev.css +3 -0
  6. data/templates/project/files/compass_watch.bat +1 -0
  7. data/templates/project/files/readme.txt +36 -0
  8. data/templates/project/ie-old/favicon.ico +0 -0
  9. data/templates/project/ie-old/images/as.jpg +0 -0
  10. data/templates/project/ie-old/images/bg_span_wol.gif +0 -0
  11. data/templates/project/ie-old/images/f.jpg +0 -0
  12. data/templates/project/ie-old/images/gc.jpg +0 -0
  13. data/templates/project/ie-old/images/h.jpg +0 -0
  14. data/templates/project/ie-old/images/ie.jpg +0 -0
  15. data/templates/project/ie-old/images/mf.jpg +0 -0
  16. data/templates/project/ie-old/images/op.jpg +0 -0
  17. data/templates/project/ie-old/images/td1.jpg +0 -0
  18. data/templates/project/ie-old/images/td2.jpg +0 -0
  19. data/templates/project/ie-old/images/td3.jpg +0 -0
  20. data/templates/project/ie-old/index.html +175 -0
  21. data/templates/project/images/fancyClose.png +0 -0
  22. data/templates/project/images/fancyNext.png +0 -0
  23. data/templates/project/images/fancyPrev.png +0 -0
  24. data/templates/project/images/favicon.png +0 -0
  25. data/templates/project/images/loading.gif +0 -0
  26. data/templates/project/images/noimg.jpg +0 -0
  27. data/templates/project/images/screenshot.jpg +0 -0
  28. data/templates/project/index.html +24 -0
  29. data/templates/project/index.php +79 -0
  30. data/templates/project/js/full/example.js +1 -0
  31. data/templates/project/js/full/ph.js +33 -0
  32. data/templates/project/js/full/rform.js +416 -0
  33. data/templates/project/js/full/scripts.js +1 -0
  34. data/templates/project/js/init.js +41 -0
  35. data/templates/project/js/min/head.min.js +9 -0
  36. data/templates/project/js/min/jquery.fancybox.min.js +46 -0
  37. data/templates/project/js/min/ph.min.js +2 -0
  38. data/templates/project/manifest.rb +96 -0
  39. data/templates/project/sass/index.sass +36 -0
  40. data/templates/project/sass/source/_buttons.sass +35 -0
  41. data/templates/project/sass/source/_formstyle.sass +150 -0
  42. data/templates/project/sass/source/_global.sass +62 -0
  43. data/templates/project/sass/source/_reset.sass +93 -0
  44. data/templates/project/sass/source/_typography.sass +111 -0
  45. data/templates/project/sass/source/bl/_content.sass +1 -0
  46. data/templates/project/sass/source/bl/_footer.sass +1 -0
  47. data/templates/project/sass/source/bl/_header.sass +1 -0
  48. data/templates/project/sass/source/lib/_default.sass +226 -0
  49. data/templates/project/sass/source/lib/_mixins.sass +15 -0
  50. data/templates/project/sass/source/lib/mixins/_animations.sass +85 -0
  51. data/templates/project/sass/source/lib/mixins/_background.sass +41 -0
  52. data/templates/project/sass/source/lib/mixins/_base.sass +158 -0
  53. data/templates/project/sass/source/lib/mixins/_browsers.sass +54 -0
  54. data/templates/project/sass/source/lib/mixins/_fonts.sass +84 -0
  55. data/templates/project/sass/source/lib/mixins/_forms.sass +16 -0
  56. data/templates/project/sass/source/lib/mixins/_gridsystem.sass +66 -0
  57. data/templates/project/sass/source/lib/mixins/_media.sass +209 -0
  58. data/templates/project/sass/source/lib/mixins/_positions.sass +42 -0
  59. data/templates/project/sass/source/lib/mixins/_sprites.sass +65 -0
  60. data/templates/project/sass/source/lib/mixins/_width.sass +27 -0
  61. data/templates/project/sass/source/plugins/_jquery.fancybox.sass +197 -0
  62. data/templates/project/sass/source/plugins/_rforms.sass +258 -0
  63. metadata +105 -0
@@ -0,0 +1,226 @@
1
+ // ---------------------------------------------------------------------------------------------------------------------
2
+ // --- Placeholder selectors -------------------------------------------------------------------------------------------
3
+ // ---------------------------------------------------------------------------------------------------------------------
4
+
5
+ %relative
6
+ position: relative
7
+
8
+ %absolute
9
+ position: absolute
10
+
11
+ %fixed
12
+ position: fixed
13
+
14
+ %default-zi
15
+ z-index: 1
16
+
17
+ // Display
18
+ %dib
19
+ display: inline-block
20
+
21
+ %block
22
+ display: block
23
+
24
+ %none
25
+ display: none
26
+
27
+ // Vertical-align
28
+ %vab
29
+ vertical-align: baseline
30
+
31
+ %vat
32
+ vertical-align: top
33
+
34
+ %vam
35
+ vertical-align: middle
36
+
37
+ %vab
38
+ vertical-align: bottom
39
+
40
+ // Animation
41
+ %anim-light
42
+ +transition(all .25s ease)
43
+
44
+ // Cursor
45
+ %cur-pointer
46
+ cursor: pointer
47
+
48
+ %cur-default
49
+ cursor: default
50
+
51
+ %cur-help
52
+ cursor: help
53
+
54
+ %cur-not-allowed
55
+ cursor: not-allowed
56
+
57
+ // Figure
58
+ %circle
59
+ border-radius: 50%
60
+
61
+ // --Typography--
62
+ %ellipsis
63
+ +ellipsis(no-wrap)
64
+
65
+ %break
66
+ word-wrap: break-word
67
+
68
+ %nowrap
69
+ white-space: nowrap
70
+
71
+ %no-select
72
+ +user-select(none)
73
+
74
+ %has-ps-icon
75
+ @extend %relative
76
+
77
+ +bf
78
+ @extend %absolute, %default-zi
79
+ content: ''
80
+
81
+ // ---------------------------------------------------------------------------------------------------------------------
82
+ // --- Default classes -------------------------------------------------------------------------------------------------
83
+ // ---------------------------------------------------------------------------------------------------------------------
84
+
85
+ .table
86
+ @extend .full-width
87
+ display: table
88
+
89
+ // .row
90
+ // display: table-row
91
+
92
+ .cell
93
+ display: table-cell
94
+
95
+ // Float
96
+ .left
97
+ float: left
98
+
99
+ .right
100
+ float: right
101
+
102
+ // Width
103
+ .full-width
104
+ width: 100%
105
+
106
+ .half-width
107
+ width: 50%
108
+
109
+ .full-height
110
+ height: 100%
111
+
112
+ .box
113
+ @extend %dib, %vat
114
+
115
+ .segment,
116
+ .icon
117
+ @extend %dib, %vam
118
+
119
+ .full-size
120
+ @extend .full-width, .full-height
121
+
122
+ .window
123
+ overflow: hidden
124
+ @extend .full-width
125
+
126
+ .wrapper
127
+ @extend .full-width, %dib, %vat
128
+
129
+ // Text-align
130
+ .tac
131
+ text-align: center
132
+
133
+ .tal
134
+ text-align: left
135
+
136
+ .tar
137
+ text-align: right
138
+
139
+ // Alignment Blocks In Width
140
+ .jbox
141
+ line-height: 0
142
+ text-align: justify
143
+ +legacy-pie-clearfix
144
+ .box
145
+ line-height: normal
146
+
147
+ // Other
148
+ .clear
149
+ clear: both
150
+
151
+ .clearfix
152
+ +pie-clearfix
153
+
154
+ // --Images--
155
+ .loading
156
+ background: #fff url(../images/required/loading.gif) no-repeat center
157
+
158
+ .img-rwd
159
+ @extend %block
160
+ max-width: 100%
161
+ height: auto
162
+
163
+ // --Position--
164
+ .aborted
165
+ +pos(absolute, false, false, false, -10000px, 0)
166
+ opacity: 0
167
+ visibility: hidden
168
+
169
+ .ceiling-pos
170
+ @extend %absolute, %default-zi
171
+ top: 0
172
+ left: 0
173
+
174
+ .left-pos
175
+ @extend %absolute, %default-zi
176
+ top: 50%
177
+ left: 0
178
+
179
+ .right-pos
180
+ @extend %absolute, %default-zi
181
+ top: 50%
182
+ right: 0
183
+
184
+ .top-pos
185
+ @extend %absolute, %default-zi
186
+ top: 0
187
+ left: 50%
188
+
189
+ .bottom-pos
190
+ @extend %absolute, %default-zi
191
+ left: 50%
192
+ bottom: 0
193
+
194
+ .center-pos
195
+ +pos("a", 0, 0, 0, 0, 1)
196
+ margin: auto
197
+
198
+ .has-ps-left-icon
199
+ @extend %has-ps-icon
200
+ +bf
201
+ @extend .left-pos
202
+
203
+ .has-ps-right-icon
204
+ @extend %has-ps-icon
205
+ +bf
206
+ @extend .right-pos
207
+
208
+ .has-ps-top-icon
209
+ @extend %has-ps-icon
210
+ +bf
211
+ @extend .top-pos
212
+
213
+ .has-ps-bottom-icon
214
+ @extend %has-ps-icon
215
+ +bf
216
+ @extend .bottom-pos
217
+
218
+ .has-ps-center-icon
219
+ @extend %has-ps-icon
220
+ +bf
221
+ @extend .center-pos
222
+
223
+ // Scroll
224
+ .default-scroll
225
+ overflow: auto
226
+ -webkit-overflow-scrolling: touch
@@ -0,0 +1,15 @@
1
+ // To enable SVG gradient support in Opera and IE9
2
+ $experimental-support-for-svg: true
3
+
4
+ // Mixins
5
+ @import mixins/animations.sass
6
+ @import mixins/background.sass
7
+ @import mixins/base.sass
8
+ @import mixins/browsers.sass
9
+ @import mixins/fonts.sass
10
+ @import mixins/forms.sass
11
+ @import mixins/media.sass
12
+ @import mixins/positions.sass
13
+ @import mixins/sprites.sass
14
+ @import mixins/width.sass
15
+ @import mixins/gridsystem.sass
@@ -0,0 +1,85 @@
1
+ // Based on http://www.w3.org/TR/css3-animations/
2
+
3
+ $default-animation-name: none
4
+ $default-animation-duration: 0
5
+ $default-animation-timing-function: ease
6
+ $default-animation-iteration-count: 1
7
+ $default-animation-direction: normal
8
+ $default-animation-play-state: running
9
+ $default-animation-delay: 0
10
+ $default-animation-fill-mode: none
11
+
12
+ =animation-name($name-1: $default-animation-name, $name-2: false, $name-3: false, $name-4: false, $name-5: false, $name-6: false, $name-7: false, $name-8: false, $name-9: false, $name-10: false)
13
+ $name: compact($name-1, $name-2, $name-3, $name-4, $name-5, $name-6, $name-7, $name-8, $name-9, $name-10)
14
+ +experimental(animation-name, $name)
15
+
16
+
17
+ =animation-duration($duration-1: $default-animation-duration, $duration-2: false, $duration-3: false, $duration-4: false, $duration-5: false, $duration-6: false, $duration-7: false, $duration-8: false, $duration-9: false, $duration-10: false)
18
+ $duration: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10)
19
+ +experimental(animation-duration, $duration)
20
+
21
+
22
+ =animation-timing-function($timing-function-1: $default-animation-timing-function, $timing-function-2: false, $timing-function-3: false, $timing-function-4: false, $timing-function-5: false, $timing-function-6: false, $timing-function-7: false, $timing-function-8: false, $timing-function-9: false, $timing-function-10: false)
23
+ $timing-function: compact($timing-function-1, $timing-function-2, $timing-function-3, $timing-function-4, $timing-function-5, $timing-function-6, $timing-function-7, $timing-function-8, $timing-function-9, $timing-function-10)
24
+ +experimental(animation-timing-function, $timing-function)
25
+
26
+
27
+ =animation-iteration-count($iteration-count-1: $default-animation-count, $iteration-count-2: false, $iteration-count-3: false, $iteration-count-4: false, $iteration-count-5: false, $iteration-count-6: false, $iteration-count-7: false, $iteration-count-8: false, $iteration-count-9: false, $iteration-count-10: false)
28
+ $iteration-count: compact($iteration-count-1, $iteration-count-2, $iteration-count-3, $iteration-count-4, $iteration-count-5, $iteration-count-6, $iteration-count-7, $iteration-count-8, $iteration-count-9, $iteration-count-10)
29
+ +experimental(animation-iteration-count, $iteration-count)
30
+
31
+
32
+ =animation-direction($direction-1: $default-animation-direction, $direction-2: false, $direction-3: false, $direction-4: false, $direction-5: false, $direction-6: false, $direction-7: false, $direction-8: false, $direction-9: false, $direction-10: false)
33
+ $direction: compact($direction-1, $direction-2, $direction-3, $direction-4, $direction-5, $direction-6, $direction-7, $direction-8, $direction-9, $direction-10)
34
+ +experimental(animation-direction, $direction)
35
+
36
+
37
+ =animation-play-state($play-state-1: $default-animation-play-state, $play-state-2: false, $play-state-3: false, $play-state-4: false, $play-state-5: false, $play-state-6: false, $play-state-7: false, $play-state-8: false, $play-state-9: false, $play-state-10: false)
38
+ $play-state: compact($play-state-1, $play-state-2, $play-state-3, $play-state-4, $play-state-5, $play-state-6, $play-state-7, $play-state-8, $play-state-9, $play-state-10)
39
+ +experimental(animation-play-state, $play-state)
40
+
41
+
42
+ =animation-delay($delay-1: $default-animation-delay, $delay-2: false, $delay-3: false, $delay-4: false, $delay-5: false, $delay-6: false, $delay-7: false, $delay-8: false, $delay-9: false, $delay-10: false)
43
+ $delay: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10)
44
+ +experimental(animation-delay, $delay)
45
+
46
+
47
+ =animation($animation-1: default, $animation-2: false, $animation-3: false, $animation-4: false, $animation-5: false, $animation-6: false, $animation-7: false, $animation-8: false, $animation-9: false, $animation-10: false)
48
+ @if $animation-1 == default
49
+ $animation-1: -compass-space-list(compact($default-animation-name, $default-animation-duration, $default-animation-timing-function, $default-animation-delay, $default-animation-iteration-count, $default-animation-direction, $default-animation-fill-mode))
50
+
51
+
52
+ $animation: compact($animation-1, $animation-2, $animation-3, $animation-4, $animation-5, $animation-6, $animation-7, $animation-8, $animation-9, $animation-10)
53
+ +experimental(animation, $animation)
54
+
55
+
56
+ // Simple animation with named arguments
57
+ =animation-simple($name: $default-animation-name, $duration: $default-animation-duration, $timing-function: $default-animation-timing-function, $delay: $default-animation-delay, $iteration-count: $default-animation-iteration-count, $direction: $default-animation-direction)
58
+ +experimental(animation, $name $duration $timing-function $delay $iteration-count $direction)
59
+
60
+ =anim($name, $value)
61
+ +experimental(animation, $name $value, -moz, -webkit, -o, -ms, not -khtml)
62
+
63
+ =animFull($name, $value)
64
+ +experimental(animation, $name $value, -moz, -webkit, -o, -ms, not -khtml)
65
+ @at-root
66
+ +keyframes($name)
67
+ @content
68
+
69
+ // This one is from https://developer.mozilla.org/en/CSS/animation-fill-mode
70
+ =animation-fill-mode($fill-mode)
71
+ +experimental(animation-fill-mode, $fill-mode)
72
+
73
+ // Spin animation
74
+ =spin($duration: 1, $revers: false)
75
+ $duration: lessPoint($duration, 1s)
76
+ +anim(spin, $duration infinite linear)
77
+ @at-root
78
+ +keyframes(spin)
79
+ 0%
80
+ +rotate(0)
81
+ 100%
82
+ @if $revers
83
+ +rotate(-359)
84
+ @else
85
+ +rotate(359)
@@ -0,0 +1,41 @@
1
+ //simple gradient
2
+ =g($color1, $color2)
3
+ background-color: $color1
4
+ +background-image(linear-gradient($color1, $color2))
5
+
6
+ =gh($size, $color1, $color2)
7
+ background-color: $color1
8
+ +background-image(linear-gradient($size, $color1, $color2))
9
+
10
+ =strongGradient($size, $beginColor, $endColor, $separator)
11
+ background-color: $beginColor
12
+ +background-image(linear-gradient($size, $beginColor, $beginColor $separator, $endColor $separator, $endColor))
13
+
14
+ @function hexToRGB($color)
15
+ $red: red($color)
16
+ $green: green($color)
17
+ $blue: blue($color)
18
+ @return rgb+unquote('(')+($red, $green, $blue)+unquote(')')
19
+
20
+ @function hexToRGBA($color, $alpha)
21
+ $red: red($color)
22
+ $green: green($color)
23
+ $blue: blue($color)
24
+ @return rgba+unquote('(')+($red, $green, $blue, $alpha)+unquote(')')
25
+
26
+ =rgbaBg($color, $alpha)
27
+ background-color: $color
28
+ background-color: hexToRGBA($color, $alpha)
29
+
30
+ =bgImgBl($path)
31
+ +image-size($path)
32
+ background: transparent url("../"+$path) no-repeat top center
33
+ +background-size(100% 100%)
34
+
35
+ // Candystriping
36
+ =candystriping($bg:#428BCA, $deg:45, $size: 50)
37
+ $size: lessPoint($size)
38
+ $deg: lessPoint($deg, 1deg)
39
+ background-color: $bg
40
+ @include background-image(linear-gradient($deg, rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent) )
41
+ +background-size($size $size)
@@ -0,0 +1,158 @@
1
+ @function lessPoint($value, $unit: $units)
2
+ @return if(unitless($value), $value*$unit, $value)
3
+
4
+ =legacy-pie-clearfix
5
+ &:after
6
+ clear: both
7
+ overflow: hidden
8
+ visibility: hidden
9
+ display: inline-block
10
+ width: 100%
11
+ height: 0
12
+ content: "\0020"
13
+
14
+ =pie-clearfix
15
+ &:after
16
+ clear: both
17
+ display: table
18
+ content: ""
19
+
20
+ // Reset the box model measurements
21
+ =reset-box-model
22
+ margin: 0
23
+ padding: 0
24
+ border: 0
25
+
26
+ =dib($align:top)
27
+ display: inline-block
28
+ vertical-align: $align
29
+
30
+ //triangle
31
+ =triangle($width, $height, $bg, $direction)
32
+ $width: lessPoint($width)
33
+ $height: lessPoint($height)
34
+ $halfWidth: ($width/2)
35
+ border-style: solid
36
+ @if $direction == "top"
37
+ border-width: 0 $halfWidth $height $halfWidth
38
+ border-color: transparent transparent $bg transparent
39
+ @if $direction == "right"
40
+ border-width: $halfWidth 0 $halfWidth $height
41
+ border-color: transparent transparent transparent $bg
42
+ @if $direction == "bottom"
43
+ border-width: $height $halfWidth 0 $halfWidth
44
+ border-color: $bg transparent transparent transparent
45
+ @if $direction == "left"
46
+ border-width: $halfWidth $height $halfWidth 0
47
+ border-color: transparent $bg transparent transparent
48
+ @if $direction == "top-left"
49
+ border-width: $height $width 0 0
50
+ border-color: $bg transparent transparent transparent
51
+ @if $direction == "top-right"
52
+ border-width: 0 $width $height 0
53
+ border-color: transparent $bg transparent transparent
54
+ @if $direction == "bottom-right"
55
+ border-width: 0 0 $height $width
56
+ border-color: transparent transparent $bg transparent
57
+ @if $direction == "bottom-left"
58
+ border-width: $width 0 0 $height
59
+ border-color: transparent transparent transparent $bg
60
+
61
+ // Arrows
62
+ =arrow($direction, $width, $height, $bg, $once: true, $pos: true)
63
+ $mirrorSide: opposite-position($direction)
64
+ $secPos: null
65
+ $top: "top"
66
+ $bottom: "bottom"
67
+ $left: "left"
68
+ @if $once
69
+ +psAbsPos
70
+ @if $pos
71
+ @if $direction == $top or $direction == $bottom
72
+ $secPos: $left
73
+ @else
74
+ $secPos: $top
75
+ #{$mirrorSide}: 100%
76
+ #{$secPos}: 50%
77
+ margin-#{$secPos}: -(lessPoint($width))
78
+ @else
79
+ @content
80
+ +triangle($width, $height, $bg, $direction)
81
+
82
+ // Border
83
+ =brd($width, $color, $direction: false, $weight: solid)
84
+ $width: lessPoint($width)
85
+ @if $direction
86
+ border-#{$direction}: $width $weight $color
87
+ @else
88
+ border: $width $weight $color
89
+
90
+ // rotate
91
+ =rotate($deg: 0)
92
+ $deg: lessPoint($deg, 1deg)
93
+ +experimental(transform, rotate($deg), -moz, -webkit, -o, -ms, not -khtml)
94
+ zoom: 1
95
+
96
+ =selection
97
+ &::selection
98
+ @content
99
+ &::-moz-selection
100
+ @content
101
+
102
+ =gpu
103
+ +transform(translate3d(0, 0, 0))
104
+
105
+ // CSS Selectors
106
+ =first
107
+ &:first-child
108
+ @content
109
+
110
+ =last
111
+ &:last-child
112
+ @content
113
+
114
+ =nth($child)
115
+ &:nth-child(#{$child})
116
+ @content
117
+
118
+ =nth_n($child, $number: 1)
119
+ &:nth-child(#{$child}n+#{$number})
120
+ @content
121
+
122
+ =nth_e($child)
123
+ $number: $child - 1
124
+ &:nth-child(#{$child}n-#{$number})
125
+ @content
126
+
127
+ =firstlet
128
+ &:first-letter
129
+ @content
130
+
131
+ =h
132
+ &:hover
133
+ @content
134
+
135
+ =focus
136
+ &:focus
137
+ @content
138
+
139
+ =act
140
+ &:active
141
+ @content
142
+
143
+ =target
144
+ &:target
145
+ @content
146
+
147
+ =bf
148
+ &:before
149
+ @content
150
+
151
+ =af
152
+ &:after
153
+ @content
154
+
155
+ =psBoth
156
+ &:before,
157
+ &:after
158
+ @content
@@ -0,0 +1,54 @@
1
+ // All IE
2
+ =ie
3
+ .ie &
4
+ @content
5
+
6
+ // IE11
7
+ =ie11
8
+ .ie11 &
9
+ @content
10
+
11
+ // IE10
12
+ =ie10
13
+ .ie10 &
14
+ @content
15
+
16
+ // IE9
17
+ =ie9
18
+ .ie10 &
19
+ @content
20
+
21
+ // IE8
22
+ =ie8
23
+ .ie8 &
24
+ @content
25
+
26
+ // Firefox
27
+ =ff
28
+ .ff &
29
+ @content
30
+
31
+ // Opera
32
+ =opera
33
+ .opera &
34
+ @content
35
+
36
+ // Safari
37
+ =safari
38
+ .safari &
39
+ @content
40
+
41
+ // Chrome
42
+ =chrome
43
+ .chrome &
44
+ @content
45
+
46
+ // IOS
47
+ =ios
48
+ .ios &
49
+ @content
50
+
51
+ // Android
52
+ =android
53
+ .android &
54
+ @content
@@ -0,0 +1,84 @@
1
+ // Web safe font combinations
2
+ $Arial: Arial, Helvetica, sans-serif
3
+ $Verdana: Verdana, Geneva, sans-serif
4
+ $Tahoma: Tahoma, Geneva, sans-serif
5
+ $ArialBlack: "Arial Black", Gadget, sans-serif
6
+ $ComicSansMS: "Comic Sans MS", cursive, sans-serif
7
+ $Impact: Impact, Charcoal, sans-serif
8
+ $LucidaSansUnicode: "Lucida Sans Unicode", "Lucida Grande", sans-serif
9
+ $TrebuchetMS: "Trebuchet MS", Helvetica, sans-serif
10
+ $Georgia: Georgia, serif
11
+ $PalatinoLinotype: "Palatino Linotype", "Book Antiqua", Palatino, serif
12
+ $TimesNewRoman: "Times New Roman", Times, serif
13
+ $CourierNew: "Courier New", Courier, monospace
14
+ $LucidaConsole: "Lucida Console", Monaco, monospace
15
+
16
+ // Bulletproof font face
17
+ =ff($name, $fontFiles, $svgFontName: $fontFiles, $folder: $fontFiles)
18
+ @font-face
19
+ font-family: $name
20
+ src: url('../fonts/#{$folder}/#{$fontFiles}.eot?#iefix') format('embedded-opentype'), url('../fonts/#{$folder}/#{$fontFiles}.woff') format('woff'), url('../fonts/#{$folder}/#{$fontFiles}.ttf') format('truetype'), url('../fonts/#{$folder}/#{$fontFiles}.svg##{$svgFontName}') format('svg')
21
+
22
+ // Calculating font-size value from Photoshop
23
+ @function rem($fontUnit, $defaultFontSize: $base-font-size)
24
+ $fontUnit: lessPoint($fontUnit)
25
+ $defaultFontSize: lessPoint($defaultFontSize)
26
+ @return $fontUnit/$defaultFontSize + rem
27
+
28
+ =rem($fontUnit, $defaultFontSize: $base-font-size)
29
+ $fontUnit: lessPoint($fontUnit)
30
+ $defaultFontSize: lessPoint($defaultFontSize)
31
+ font-size: $fontUnit
32
+ font-size: rem($fontUnit, $defaultFontSize)
33
+
34
+ // Calculating letter-spacing value from Photoshop
35
+ =lsps($photoshopValue)
36
+ $cssValue: $photoshopValue/1000
37
+ letter-spacing: $cssValue + em
38
+
39
+ // Calculating line-height value from px to percentage
40
+ @function mlh($fontSize, $height)
41
+ $height: lessPoint($height)
42
+ $fontSize: lessPoint($fontSize)
43
+ @return $height/$fontSize
44
+
45
+ =mlh($fontSize, $height)
46
+ line-height: mlh($fontSize, $height)
47
+
48
+ =fontSmoothing($val: antialiased)
49
+ +experimental(font-smoothing, $val, -moz, -webkit, -o, -ms, not -khtml)
50
+
51
+ =resDec
52
+ &,
53
+ &:hover
54
+ text-decoration: none
55
+
56
+ =shFontBox($fontSize, $lineHeight)
57
+ +rem($fontSize)
58
+ +mlh($fontSize, $lineHeight)
59
+
60
+ =shFont($font-size: $base-font-size, $font-family: $Arial, $line-height: "normal", $color: false, $font-weight: false, $font-style: false, $rem: true)
61
+ $font-size: lessPoint($font-size)
62
+ $stingLH: null
63
+ // Calculating line-height
64
+ @if $line-height == "normal"
65
+ $stingLH: unquote('/')+"normal"
66
+ @else if $line-height == false
67
+ $stingLH: ''
68
+ @else if unitless($line-height)
69
+ $stingLH: unquote('/') + $line-height
70
+ @else
71
+ $stingLH: unquote('/') + mlh($font-size, $line-height)
72
+ // Add color
73
+ @if $color
74
+ color: $color
75
+ // Add font-style
76
+ @if $font-style == false
77
+ $font-style: null
78
+ // Add font-weight
79
+ @if $font-weight == false
80
+ $font-weight: null
81
+ // Build font string
82
+ font: $font-style $font-weight unquote($font-size + $stingLH) $font-family
83
+ @if $rem
84
+ font-size: rem($font-size)
@@ -0,0 +1,16 @@
1
+ // ** Placeholder
2
+ =placeholder($color)
3
+ // Vendor Extension Prefixes Placeholders
4
+ $prefixPlaceholders: ":-moz-placeholder", "::-moz-placeholder", "::-webkit-input-placeholder", ":-ms-input-placeholder", ".text-placeholder"
5
+
6
+ @each $prefixPlaceholder in $prefixPlaceholders
7
+ &#{$prefixPlaceholder}
8
+ opacity: 1
9
+ color: $color
10
+ @content
11
+ @if $prefixPlaceholder == ".text-placeholder"
12
+ &#{$prefixPlaceholder}:focus
13
+ opacity: 0
14
+ @else
15
+ &:focus#{$prefixPlaceholder}
16
+ opacity: 0