responsive-sass 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.mkdn +16 -0
- data/README.mkdn +90 -18
- data/lib/responsive-sass/version.rb +3 -3
- data/lib/responsive-sass.rb +6 -3
- data/responsive-sass.gemspec +1 -1
- data/stylesheets/_normalize.scss +502 -0
- data/stylesheets/_responsive-sass.scss +98 -22
- data/stylesheets/partials/_base.scss +27 -0
- metadata +6 -3
data/CHANGELOG.mkdn
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Responsive Sass Changelog
|
2
|
+
|
3
|
+
## 0.1.0
|
4
|
+
- Mixins are now using em's
|
5
|
+
- Added normalize.css a alternative for reset.
|
6
|
+
- Added Frameless Grid to gem [FRAMELESS] (http://framelessgrid.com.)
|
7
|
+
- Added the option to hide elements using display:none.
|
8
|
+
- Added the option to change your font-size using $font-size.
|
9
|
+
- Added the option to change your margins using $margin
|
10
|
+
- Added em function to easy convert your pixels to ems [TheSassWay] (http://thesassway.com/intermediate/responsive-web-design-part-1)
|
11
|
+
- Height on backgrounds can now be accessed using $height
|
12
|
+
|
13
|
+
## 0.0.2
|
14
|
+
- Added ability to change your background image depending on size or devise resolution.
|
15
|
+
- Fixed issue with height being required.
|
16
|
+
- Added mixin to kill webkit link highlighting
|
data/README.mkdn
CHANGED
@@ -24,43 +24,113 @@ Add to a project:
|
|
24
24
|
Or create a new project:
|
25
25
|
|
26
26
|
compass -r responsive-sass -f responsive-sass project_directory
|
27
|
+
|
28
|
+
To use with the Serve Gem
|
29
|
+
//compass.config
|
30
|
+
require 'responsive-sass'
|
27
31
|
|
28
|
-
Mixins:
|
29
|
-
|
32
|
+
Media Query Mixins:
|
33
|
+
==================
|
30
34
|
|
31
35
|
Note: Setting your elements height or background is not required.
|
32
36
|
|
33
|
-
- Your can set your background by passing your image url to the background variable.
|
37
|
+
- Your can set your background image by passing your image url to the background variable.
|
38
|
+
- You can hide any element by passing $display: true
|
34
39
|
|
35
|
-
|
40
|
+
min-width-960
|
36
41
|
|
37
|
-
@include min-width-960($width, $height, );
|
42
|
+
@include min-width-960($width, $height, "/images/high-res.png");
|
38
43
|
|
39
|
-
|
44
|
+
tablet-portrait
|
40
45
|
|
41
|
-
@include tablet-portrait($width, $height);
|
46
|
+
@include tablet-portrait($width, $height, "/images/high-res.png");
|
42
47
|
|
43
|
-
|
48
|
+
tablet-landscape
|
44
49
|
|
45
|
-
@include tablet-landscape($width, $height);
|
50
|
+
@include tablet-landscape($width, $height, "/images/high-res.png");
|
46
51
|
|
47
|
-
|
52
|
+
mobile-landscape
|
48
53
|
|
49
|
-
@include mobile-landscape($width, $height);
|
54
|
+
@include mobile-landscape($width, $height, "/images/high-res.png");
|
50
55
|
|
51
|
-
|
56
|
+
mobile-portrait
|
52
57
|
|
53
|
-
@include mobile-portrait($width, $height);
|
58
|
+
@include mobile-portrait($width, $height, "/images/high-res.png");
|
54
59
|
|
55
|
-
|
60
|
+
high-res
|
61
|
+
|
62
|
+
@include high-res($width, $height, "/images/high-res.png");
|
63
|
+
|
64
|
+
Frameless Config
|
65
|
+
================
|
66
|
+
$font-size: 16px; // Your base font-size in pixels
|
67
|
+
$em: $font-size / 1em; // Shorthand for outputting ems
|
68
|
+
|
69
|
+
$column: 48px; // The column-width of your grid in pixels
|
70
|
+
$gutter: 24px; // The gutter-width of your grid in pixels
|
71
|
+
|
72
|
+
Column-widths in variables, in ems
|
73
|
+
|
74
|
+
$cols1: ( 1 * ($column + $gutter) - $gutter) / $em;
|
75
|
+
$cols2: ( 2 * ($column + $gutter) - $gutter) / $em;
|
76
|
+
$cols3: ( 3 * ($column + $gutter) - $gutter) / $em;
|
77
|
+
$cols4: ( 4 * ($column + $gutter) - $gutter) / $em;
|
78
|
+
$cols5: ( 5 * ($column + $gutter) - $gutter) / $em;
|
79
|
+
$cols6: ( 6 * ($column + $gutter) - $gutter) / $em;
|
80
|
+
$cols7: ( 7 * ($column + $gutter) - $gutter) / $em;
|
81
|
+
$cols8: ( 8 * ($column + $gutter) - $gutter) / $em;
|
82
|
+
$cols9: ( 9 * ($column + $gutter) - $gutter) / $em;
|
83
|
+
$cols10: (10 * ($column + $gutter) - $gutter) / $em;
|
84
|
+
$cols11: (11 * ($column + $gutter) - $gutter) / $em;
|
85
|
+
$cols12: (12 * ($column + $gutter) - $gutter) / $em;
|
86
|
+
$cols13: (13 * ($column + $gutter) - $gutter) / $em;
|
87
|
+
$cols14: (14 * ($column + $gutter) - $gutter) / $em;
|
88
|
+
$cols15: (15 * ($column + $gutter) - $gutter) / $em;
|
89
|
+
$cols16: (16 * ($column + $gutter) - $gutter) / $em;
|
90
|
+
|
91
|
+
Column-widths in a function, in ems
|
92
|
+
|
93
|
+
@mixin width ($cols:1) {
|
94
|
+
width: ($cols * ($column + $gutter) - $gutter) / $em;
|
95
|
+
}
|
96
|
+
|
97
|
+
|
98
|
+
An easy way to zoom your entire layout in or out (as long as it's set in ems).
|
99
|
+
Just change the media queries to activate them.
|
100
|
+
Assuming your base font-size is 16:
|
101
|
+
- the first one zooms out by a factor of (16-2)/16 = 0.875
|
102
|
+
- the second one zooms in by a factor of (16+2)/16 = 1.125
|
103
|
+
|
104
|
+
@media screen and (max-width: 1px) {
|
105
|
+
body {
|
106
|
+
font-size: ($font-size - 2) / $em;
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
@media screen and (max-width: 1px) {
|
111
|
+
body {
|
112
|
+
font-size: ($font-size + 2) / $em;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
[More Info] (http://framelessgrid.com/)
|
117
|
+
|
118
|
+
Normalize.css
|
119
|
+
=============
|
120
|
+
|
121
|
+
Simply use:
|
122
|
+
|
123
|
+
@import "normalize";
|
56
124
|
|
57
|
-
|
58
|
-
|
59
|
-
|
125
|
+
Misc Mixins:
|
126
|
+
===========
|
127
|
+
|
128
|
+
kill-mobile-zoom
|
60
129
|
|
61
130
|
@include kill-mobile-zoom;
|
62
131
|
|
63
|
-
|
132
|
+
kill-tap-highlight
|
133
|
+
|
64
134
|
@include kill-tap-highlight;
|
65
135
|
|
66
136
|
License:
|
@@ -69,3 +139,5 @@ Copyright (c) 2011 Nick Treadway
|
|
69
139
|
All Rights Reserved.
|
70
140
|
|
71
141
|
Licensed under the [MIT license] (http://www.opensource.org/licenses/mit-license.php)
|
142
|
+
|
143
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
data/lib/responsive-sass.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
require "responsive-sass/version"
|
2
|
-
Compass
|
3
|
-
|
4
|
-
|
2
|
+
module Compass
|
3
|
+
module Responsive
|
4
|
+
base_directory = File.join(File.dirname(__FILE__), '..')
|
5
|
+
Compass::Frameworks.register('responsive-sass', :path => base_directory)
|
6
|
+
end
|
7
|
+
end
|
data/responsive-sass.gemspec
CHANGED
@@ -4,7 +4,7 @@ require "responsive-sass/version"
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "responsive-sass"
|
7
|
-
s.version = Responsive::
|
7
|
+
s.version = Compass::Responsive::VERSION
|
8
8
|
s.authors = ["Nick Treadway"]
|
9
9
|
s.email = ["rnt@yeti-media.com"]
|
10
10
|
s.homepage = "http://github.com/ntreadway/responsive-sass"
|
@@ -0,0 +1,502 @@
|
|
1
|
+
/*! normalize.css 2012-02-07T12:37 UTC - http://github.com/necolas/normalize.css */
|
2
|
+
|
3
|
+
/* =============================================================================
|
4
|
+
HTML5 display definitions
|
5
|
+
========================================================================== */
|
6
|
+
|
7
|
+
/*
|
8
|
+
* Corrects block display not defined in IE6/7/8/9 & FF3
|
9
|
+
*/
|
10
|
+
|
11
|
+
article,
|
12
|
+
aside,
|
13
|
+
details,
|
14
|
+
figcaption,
|
15
|
+
figure,
|
16
|
+
footer,
|
17
|
+
header,
|
18
|
+
hgroup,
|
19
|
+
nav,
|
20
|
+
section,
|
21
|
+
summary {
|
22
|
+
display: block;
|
23
|
+
}
|
24
|
+
|
25
|
+
/*
|
26
|
+
* Corrects inline-block display not defined in IE6/7/8/9 & FF3
|
27
|
+
*/
|
28
|
+
|
29
|
+
audio,
|
30
|
+
canvas,
|
31
|
+
video {
|
32
|
+
display: inline-block;
|
33
|
+
*display: inline;
|
34
|
+
*zoom: 1;
|
35
|
+
}
|
36
|
+
|
37
|
+
/*
|
38
|
+
* Prevents modern browsers from displaying 'audio' without controls
|
39
|
+
*/
|
40
|
+
|
41
|
+
audio:not([controls]) {
|
42
|
+
display: none;
|
43
|
+
}
|
44
|
+
|
45
|
+
/*
|
46
|
+
* Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4
|
47
|
+
* Known issue: no IE6 support
|
48
|
+
*/
|
49
|
+
|
50
|
+
[hidden] {
|
51
|
+
display: none;
|
52
|
+
}
|
53
|
+
|
54
|
+
|
55
|
+
/* =============================================================================
|
56
|
+
Base
|
57
|
+
========================================================================== */
|
58
|
+
|
59
|
+
/*
|
60
|
+
* 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units
|
61
|
+
* http://clagnut.com/blog/348/#c790
|
62
|
+
* 2. Prevents iOS text size adjust after orientation change, without disabling user zoom
|
63
|
+
* www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
|
64
|
+
*/
|
65
|
+
|
66
|
+
html {
|
67
|
+
font-size: 100%; /* 1 */
|
68
|
+
-webkit-text-size-adjust: 100%; /* 2 */
|
69
|
+
-ms-text-size-adjust: 100%; /* 2 */
|
70
|
+
}
|
71
|
+
|
72
|
+
/*
|
73
|
+
* Addresses font-family inconsistency between 'textarea' and other form elements.
|
74
|
+
*/
|
75
|
+
|
76
|
+
html,
|
77
|
+
button,
|
78
|
+
input,
|
79
|
+
select,
|
80
|
+
textarea {
|
81
|
+
font-family: sans-serif;
|
82
|
+
}
|
83
|
+
|
84
|
+
/*
|
85
|
+
* Addresses margins handled incorrectly in IE6/7
|
86
|
+
*/
|
87
|
+
|
88
|
+
body {
|
89
|
+
margin: 0;
|
90
|
+
}
|
91
|
+
|
92
|
+
|
93
|
+
/* =============================================================================
|
94
|
+
Links
|
95
|
+
========================================================================== */
|
96
|
+
|
97
|
+
/*
|
98
|
+
* Addresses outline displayed oddly in Chrome
|
99
|
+
*/
|
100
|
+
|
101
|
+
a:focus {
|
102
|
+
outline: thin dotted;
|
103
|
+
}
|
104
|
+
|
105
|
+
/*
|
106
|
+
* Improves readability when focused and also mouse hovered in all browsers
|
107
|
+
* people.opera.com/patrickl/experiments/keyboard/test
|
108
|
+
*/
|
109
|
+
|
110
|
+
a:hover,
|
111
|
+
a:active {
|
112
|
+
outline: 0;
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
/* =============================================================================
|
117
|
+
Typography
|
118
|
+
========================================================================== */
|
119
|
+
|
120
|
+
/*
|
121
|
+
* Addresses font sizes and margins set differently in IE6/7
|
122
|
+
* Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
|
123
|
+
*/
|
124
|
+
|
125
|
+
h1 {
|
126
|
+
font-size: 2em;
|
127
|
+
margin: 0.67em 0;
|
128
|
+
}
|
129
|
+
|
130
|
+
h2 {
|
131
|
+
font-size: 1.5em;
|
132
|
+
margin: 0.83em 0;
|
133
|
+
}
|
134
|
+
|
135
|
+
h3 {
|
136
|
+
font-size: 1.17em;
|
137
|
+
margin: 1em 0;
|
138
|
+
}
|
139
|
+
|
140
|
+
h4 {
|
141
|
+
font-size: 1em;
|
142
|
+
margin: 1.33em 0;
|
143
|
+
}
|
144
|
+
|
145
|
+
h5 {
|
146
|
+
font-size: 0.83em;
|
147
|
+
margin: 1.67em 0;
|
148
|
+
}
|
149
|
+
|
150
|
+
h6 {
|
151
|
+
font-size: 0.75em;
|
152
|
+
margin: 2.33em 0;
|
153
|
+
}
|
154
|
+
|
155
|
+
/*
|
156
|
+
* Addresses styling not present in IE7/8/9, S5, Chrome
|
157
|
+
*/
|
158
|
+
|
159
|
+
abbr[title] {
|
160
|
+
border-bottom: 1px dotted;
|
161
|
+
}
|
162
|
+
|
163
|
+
/*
|
164
|
+
* Addresses style set to 'bolder' in FF3+, S4/5, Chrome
|
165
|
+
*/
|
166
|
+
|
167
|
+
b,
|
168
|
+
strong {
|
169
|
+
font-weight: bold;
|
170
|
+
}
|
171
|
+
|
172
|
+
blockquote {
|
173
|
+
margin: 1em 40px;
|
174
|
+
}
|
175
|
+
|
176
|
+
/*
|
177
|
+
* Addresses styling not present in S5, Chrome
|
178
|
+
*/
|
179
|
+
|
180
|
+
dfn {
|
181
|
+
font-style: italic;
|
182
|
+
}
|
183
|
+
|
184
|
+
/*
|
185
|
+
* Addresses styling not present in IE6/7/8/9
|
186
|
+
*/
|
187
|
+
|
188
|
+
mark {
|
189
|
+
background: #ff0;
|
190
|
+
color: #000;
|
191
|
+
}
|
192
|
+
|
193
|
+
/*
|
194
|
+
* Addresses margins set differently in IE6/7
|
195
|
+
*/
|
196
|
+
|
197
|
+
p,
|
198
|
+
pre {
|
199
|
+
margin: 1em 0;
|
200
|
+
}
|
201
|
+
|
202
|
+
/*
|
203
|
+
* Corrects font family set oddly in IE6, S4/5, Chrome
|
204
|
+
* en.wikipedia.org/wiki/User:Davidgothberg/Test59
|
205
|
+
*/
|
206
|
+
|
207
|
+
pre,
|
208
|
+
code,
|
209
|
+
kbd,
|
210
|
+
samp {
|
211
|
+
font-family: monospace, serif;
|
212
|
+
_font-family: 'courier new', monospace;
|
213
|
+
font-size: 1em;
|
214
|
+
}
|
215
|
+
|
216
|
+
/*
|
217
|
+
* Improves readability of pre-formatted text in all browsers
|
218
|
+
*/
|
219
|
+
|
220
|
+
pre {
|
221
|
+
white-space: pre;
|
222
|
+
white-space: pre-wrap;
|
223
|
+
word-wrap: break-word;
|
224
|
+
}
|
225
|
+
|
226
|
+
/*
|
227
|
+
* 1. Addresses CSS quotes not supported in IE6/7
|
228
|
+
* 2. Addresses quote property not supported in S4
|
229
|
+
*/
|
230
|
+
|
231
|
+
/* 1 */
|
232
|
+
|
233
|
+
q {
|
234
|
+
quotes: none;
|
235
|
+
}
|
236
|
+
|
237
|
+
/* 2 */
|
238
|
+
|
239
|
+
q:before,
|
240
|
+
q:after {
|
241
|
+
content: '';
|
242
|
+
content: none;
|
243
|
+
}
|
244
|
+
|
245
|
+
small {
|
246
|
+
font-size: 75%;
|
247
|
+
}
|
248
|
+
|
249
|
+
/*
|
250
|
+
* Prevents sub and sup affecting line-height in all browsers
|
251
|
+
* gist.github.com/413930
|
252
|
+
*/
|
253
|
+
|
254
|
+
sub,
|
255
|
+
sup {
|
256
|
+
font-size: 75%;
|
257
|
+
line-height: 0;
|
258
|
+
position: relative;
|
259
|
+
vertical-align: baseline;
|
260
|
+
}
|
261
|
+
|
262
|
+
sup {
|
263
|
+
top: -0.5em;
|
264
|
+
}
|
265
|
+
|
266
|
+
sub {
|
267
|
+
bottom: -0.25em;
|
268
|
+
}
|
269
|
+
|
270
|
+
|
271
|
+
/* =============================================================================
|
272
|
+
Lists
|
273
|
+
========================================================================== */
|
274
|
+
|
275
|
+
/*
|
276
|
+
* Addresses margins set differently in IE6/7
|
277
|
+
*/
|
278
|
+
|
279
|
+
dl,
|
280
|
+
menu,
|
281
|
+
ol,
|
282
|
+
ul {
|
283
|
+
margin: 1em 0;
|
284
|
+
}
|
285
|
+
|
286
|
+
dd {
|
287
|
+
margin: 0 0 0 40px;
|
288
|
+
}
|
289
|
+
|
290
|
+
/*
|
291
|
+
* Addresses paddings set differently in IE6/7
|
292
|
+
*/
|
293
|
+
|
294
|
+
menu,
|
295
|
+
ol,
|
296
|
+
ul {
|
297
|
+
padding: 0 0 0 40px;
|
298
|
+
}
|
299
|
+
|
300
|
+
/*
|
301
|
+
* Corrects list images handled incorrectly in IE7
|
302
|
+
*/
|
303
|
+
|
304
|
+
nav ul,
|
305
|
+
nav ol {
|
306
|
+
list-style: none;
|
307
|
+
list-style-image: none;
|
308
|
+
}
|
309
|
+
|
310
|
+
|
311
|
+
/* =============================================================================
|
312
|
+
Embedded content
|
313
|
+
========================================================================== */
|
314
|
+
|
315
|
+
/*
|
316
|
+
* 1. Removes border when inside 'a' element in IE6/7/8/9, FF3
|
317
|
+
* 2. Improves image quality when scaled in IE7
|
318
|
+
* code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/
|
319
|
+
*/
|
320
|
+
|
321
|
+
img {
|
322
|
+
border: 0; /* 1 */
|
323
|
+
-ms-interpolation-mode: bicubic; /* 2 */
|
324
|
+
}
|
325
|
+
|
326
|
+
/*
|
327
|
+
* Corrects overflow displayed oddly in IE9
|
328
|
+
*/
|
329
|
+
|
330
|
+
svg:not(:root) {
|
331
|
+
overflow: hidden;
|
332
|
+
}
|
333
|
+
|
334
|
+
|
335
|
+
/* =============================================================================
|
336
|
+
Figures
|
337
|
+
========================================================================== */
|
338
|
+
|
339
|
+
/*
|
340
|
+
* Addresses margin not present in IE6/7/8/9, S5, O11
|
341
|
+
*/
|
342
|
+
|
343
|
+
figure {
|
344
|
+
margin: 0;
|
345
|
+
}
|
346
|
+
|
347
|
+
|
348
|
+
/* =============================================================================
|
349
|
+
Forms
|
350
|
+
========================================================================== */
|
351
|
+
|
352
|
+
/*
|
353
|
+
* Corrects margin displayed oddly in IE6/7
|
354
|
+
*/
|
355
|
+
|
356
|
+
form {
|
357
|
+
margin: 0;
|
358
|
+
}
|
359
|
+
|
360
|
+
/*
|
361
|
+
* Define consistent border, margin, and padding
|
362
|
+
*/
|
363
|
+
|
364
|
+
fieldset {
|
365
|
+
border: 1px solid #c0c0c0;
|
366
|
+
margin: 0 2px;
|
367
|
+
padding: 0.35em 0.625em 0.75em;
|
368
|
+
}
|
369
|
+
|
370
|
+
/*
|
371
|
+
* 1. Corrects color not being inherited in IE6/7/8/9
|
372
|
+
* 2. Corrects text not wrapping in FF3
|
373
|
+
* 3. Corrects alignment displayed oddly in IE6/7
|
374
|
+
*/
|
375
|
+
|
376
|
+
legend {
|
377
|
+
border: 0; /* 1 */
|
378
|
+
padding: 0;
|
379
|
+
white-space: normal; /* 2 */
|
380
|
+
*margin-left: -7px; /* 3 */
|
381
|
+
}
|
382
|
+
|
383
|
+
/*
|
384
|
+
* 1. Corrects font size not being inherited in all browsers
|
385
|
+
* 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome
|
386
|
+
* 3. Improves appearance and consistency in all browsers
|
387
|
+
*/
|
388
|
+
|
389
|
+
button,
|
390
|
+
input,
|
391
|
+
select,
|
392
|
+
textarea {
|
393
|
+
font-size: 100%; /* 1 */
|
394
|
+
margin: 0; /* 2 */
|
395
|
+
vertical-align: baseline; /* 3 */
|
396
|
+
*vertical-align: middle; /* 3 */
|
397
|
+
}
|
398
|
+
|
399
|
+
/*
|
400
|
+
* Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet
|
401
|
+
*/
|
402
|
+
|
403
|
+
button,
|
404
|
+
input {
|
405
|
+
line-height: normal; /* 1 */
|
406
|
+
}
|
407
|
+
|
408
|
+
/*
|
409
|
+
* 1. Improves usability and consistency of cursor style between image-type 'input' and others
|
410
|
+
* 2. Corrects inability to style clickable 'input' types in iOS
|
411
|
+
* 3. Removes inner spacing in IE7 without affecting normal text inputs
|
412
|
+
* Known issue: inner spacing remains in IE6
|
413
|
+
*/
|
414
|
+
|
415
|
+
button,
|
416
|
+
input[type="button"],
|
417
|
+
input[type="reset"],
|
418
|
+
input[type="submit"] {
|
419
|
+
cursor: pointer; /* 1 */
|
420
|
+
-webkit-appearance: button; /* 2 */
|
421
|
+
*overflow: visible; /* 3 */
|
422
|
+
}
|
423
|
+
|
424
|
+
/*
|
425
|
+
* Re-set default cursor for disabled elements
|
426
|
+
*/
|
427
|
+
|
428
|
+
button[disabled],
|
429
|
+
input[disabled] {
|
430
|
+
cursor: default;
|
431
|
+
}
|
432
|
+
|
433
|
+
/*
|
434
|
+
* 1. Addresses box sizing set to content-box in IE8/9
|
435
|
+
* 2. Removes excess padding in IE8/9
|
436
|
+
* 3. Removes excess padding in IE7
|
437
|
+
Known issue: excess padding remains in IE6
|
438
|
+
*/
|
439
|
+
|
440
|
+
input[type="checkbox"],
|
441
|
+
input[type="radio"] {
|
442
|
+
box-sizing: border-box; /* 1 */
|
443
|
+
padding: 0; /* 2 */
|
444
|
+
*height: 13px; /* 3 */
|
445
|
+
*width: 13px; /* 3 */
|
446
|
+
}
|
447
|
+
|
448
|
+
/*
|
449
|
+
* 1. Addresses appearance set to searchfield in S5, Chrome
|
450
|
+
* 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof)
|
451
|
+
*/
|
452
|
+
|
453
|
+
input[type="search"] {
|
454
|
+
-webkit-appearance: textfield; /* 1 */
|
455
|
+
-moz-box-sizing: content-box;
|
456
|
+
-webkit-box-sizing: content-box; /* 2 */
|
457
|
+
box-sizing: content-box;
|
458
|
+
}
|
459
|
+
|
460
|
+
/*
|
461
|
+
* Removes inner padding and search cancel button in S5, Chrome on OS X
|
462
|
+
*/
|
463
|
+
|
464
|
+
input[type="search"]::-webkit-search-decoration,
|
465
|
+
input[type="search"]::-webkit-search-cancel-button {
|
466
|
+
-webkit-appearance: none;
|
467
|
+
}
|
468
|
+
|
469
|
+
/*
|
470
|
+
* Removes inner padding and border in FF3+
|
471
|
+
* www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/
|
472
|
+
*/
|
473
|
+
|
474
|
+
button::-moz-focus-inner,
|
475
|
+
input::-moz-focus-inner {
|
476
|
+
border: 0;
|
477
|
+
padding: 0;
|
478
|
+
}
|
479
|
+
|
480
|
+
/*
|
481
|
+
* 1. Removes default vertical scrollbar in IE6/7/8/9
|
482
|
+
* 2. Improves readability and alignment in all browsers
|
483
|
+
*/
|
484
|
+
|
485
|
+
textarea {
|
486
|
+
overflow: auto; /* 1 */
|
487
|
+
vertical-align: top; /* 2 */
|
488
|
+
}
|
489
|
+
|
490
|
+
|
491
|
+
/* =============================================================================
|
492
|
+
Tables
|
493
|
+
========================================================================== */
|
494
|
+
|
495
|
+
/*
|
496
|
+
* Remove most spacing between table cells
|
497
|
+
*/
|
498
|
+
|
499
|
+
table {
|
500
|
+
border-collapse: collapse;
|
501
|
+
border-spacing: 0;
|
502
|
+
}
|
@@ -1,52 +1,61 @@
|
|
1
|
-
@
|
1
|
+
@import "partials/base";
|
2
|
+
|
3
|
+
@mixin reponsive-core($width, $height: auto, $background: false, $display: false, $font-size: $font-size, $margin: $margin) {
|
2
4
|
height: $height;
|
3
5
|
width: $width;
|
4
|
-
-
|
5
|
-
|
6
|
-
background-size: $width auto !important;
|
6
|
+
font-size: $font-size;
|
7
|
+
margin: $margin;
|
7
8
|
@if $background {
|
8
|
-
background-image: url($background)
|
9
|
+
background-image: url($background);
|
10
|
+
-webkit-background-size: $width $height;
|
11
|
+
-moz-background-size: $width $height;
|
12
|
+
background-size: $width $height;
|
13
|
+
}
|
14
|
+
@if $display {
|
15
|
+
display: none;
|
9
16
|
}
|
10
17
|
|
11
18
|
}
|
12
19
|
|
13
|
-
@mixin min-width-960($width, $height: auto, $background: false){
|
14
|
-
@media only screen and (min-width:
|
15
|
-
@include reponsive-core($width, $height, $background);
|
20
|
+
@mixin min-width-960($width, $height: auto, $background: false, $display: false, $font-size: $font-size, $margin: $margin){
|
21
|
+
@media only screen and (min-width: 60em) {
|
22
|
+
@include reponsive-core($width, $height, $background, $display: false, $font-size: $font-size, $margin: $margin);
|
16
23
|
}
|
17
24
|
}
|
18
25
|
|
19
|
-
@mixin tablet-portrait($width, $height: auto, $background: false) {
|
20
|
-
@media only screen and (min-width:
|
21
|
-
@include reponsive-core($width, $height, $background);
|
26
|
+
@mixin tablet-portrait($width, $height: auto, $background: false, $display: false, $font-size: $font-size, $margin: $margin) {
|
27
|
+
@media only screen and (min-width: 48em) and (max-width: 59.938em) {
|
28
|
+
@include reponsive-core($width, $height, $background, $display: false, $font-size: $font-size, $margin: $margin);
|
22
29
|
}
|
23
30
|
}
|
24
31
|
|
25
|
-
@mixin tablet-landscape($width, $height: auto, $background: false){
|
26
|
-
@media only screen and (
|
27
|
-
@include reponsive-core($width, $height, $background);
|
32
|
+
@mixin tablet-landscape($width, $height: auto, $background: false, $display: false, $font-size: $font-size, $margin: $margin){
|
33
|
+
@media only screen and (max-width: 65em) {
|
34
|
+
@include reponsive-core($width, $height, $background, $display: false, $font-size: $font-size, $margin: $margin);
|
28
35
|
}
|
29
36
|
}
|
30
37
|
|
31
|
-
@mixin mobile-landscape($width, $height: auto, $background: false) {
|
32
|
-
@media only screen and (min-width:
|
33
|
-
@include reponsive-core($width, $height, $background);
|
38
|
+
@mixin mobile-landscape($width, $height: auto, $background: false, $display: false, $font-size: $font-size, $margin: $margin) {
|
39
|
+
@media only screen and (min-width: 30em) {
|
40
|
+
@include reponsive-core($width, $height, $background, $display: false, $font-size: $font-size, $margin: $margin);
|
34
41
|
}
|
35
42
|
}
|
36
43
|
|
37
|
-
@mixin mobile-portrait($width, $height: auto, $background: false) {
|
38
|
-
@media only screen and (max-width:
|
39
|
-
@include reponsive-core($width, $height, $background);
|
44
|
+
@mixin mobile-portrait($width, $height: auto, $background: false, $display: false, $font-size: $font-size, $margin: $margin) {
|
45
|
+
@media only screen and (max-width: 29.938em) {
|
46
|
+
@include reponsive-core($width, $height, $background, $display: false, $font-size: $font-size, $margin: $margin);
|
40
47
|
}
|
41
48
|
}
|
42
49
|
|
43
|
-
|
50
|
+
|
51
|
+
// Misc mixins
|
52
|
+
@mixin high-res($width, $height: auto, $background: false, $display: false, $font-size: $font-size, $margin: $margin){
|
44
53
|
/* iPhone 4 and other high pixel ratio devices ----------- */
|
45
54
|
@media
|
46
55
|
only screen and (-webkit-min-device-pixel-ratio: 2),
|
47
56
|
only screen and (-o-min-device-pixel-ratio: 3/2),
|
48
57
|
only screen and (min-device-pixel-ratio: 2) {
|
49
|
-
@include reponsive-core($width, $height, $background);
|
58
|
+
@include reponsive-core($width, $height, $background, $display: false, $font-size: $font-size, $margin: $margin);
|
50
59
|
}
|
51
60
|
}
|
52
61
|
|
@@ -58,3 +67,70 @@
|
|
58
67
|
@mixin kill-tap-highlight {
|
59
68
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
60
69
|
}
|
70
|
+
|
71
|
+
|
72
|
+
/*If you wanted to add the equivalent of a 12px left padding to an h2 set at a font-size of 32px you could use it like this:
|
73
|
+
h2 {
|
74
|
+
padding-left: calc-em(12px, 32px);
|
75
|
+
}
|
76
|
+
More info can be found here => http://thesassway.com/intermediate/responsive-web-design-part-1*/
|
77
|
+
|
78
|
+
@function calc-em($target-px, $context) {
|
79
|
+
@return ($target-px / $context) * 1em;
|
80
|
+
}
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
/*
|
85
|
+
Frameless http://framelessgrid.com/
|
86
|
+
by Joni Korpi http://jonikorpi.com/
|
87
|
+
licensed under CC0 http://creativecommons.org/publicdomain/zero/1.0/
|
88
|
+
Modified by Nick Treadway http://twitter.com/nicktea
|
89
|
+
*/
|
90
|
+
|
91
|
+
|
92
|
+
//
|
93
|
+
// Column-widths in a mixin, in ems
|
94
|
+
//
|
95
|
+
|
96
|
+
@mixin width ($cols:1) {
|
97
|
+
width: ($cols * ($column + $gutter) - $gutter) / $em;
|
98
|
+
}
|
99
|
+
|
100
|
+
|
101
|
+
/*
|
102
|
+
Margin, padding, and border resets
|
103
|
+
except for form elements
|
104
|
+
*/
|
105
|
+
|
106
|
+
body, div,
|
107
|
+
h1, h2, h3, h4, h5, h6,
|
108
|
+
p, blockquote, pre, dl, dt, dd, ol, ul, li,
|
109
|
+
fieldset, form, label, legend, th, td,
|
110
|
+
article, aside, figure, footer, header, hgroup, menu, nav, section {
|
111
|
+
margin: 0;
|
112
|
+
padding: 0;
|
113
|
+
border: 0;
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
/*
|
119
|
+
An easy way to zoom your entire layout in or out (as long as it's set in ems).
|
120
|
+
Just change the media queries to activate them.
|
121
|
+
Assuming your base font-size is 16:
|
122
|
+
- the first one zooms out by a factor of (16-2)/16 = 0.875
|
123
|
+
- the second one zooms in by a factor of (16+2)/16 = 1.125
|
124
|
+
*/
|
125
|
+
|
126
|
+
@media screen and (max-width: 1px) {
|
127
|
+
body {
|
128
|
+
font-size: ($font-size - 2) / $em;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
@media screen and (max-width: 1px) {
|
133
|
+
body {
|
134
|
+
font-size: ($font-size + 2) / $em;
|
135
|
+
}
|
136
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
$font-size: 16px; // Your base font-size in pixels
|
2
|
+
$em: $font-size / 1em; // Shorthand for outputting ems
|
3
|
+
$margin: 0 auto;
|
4
|
+
$column: 48px; // The column-width of your grid in pixels
|
5
|
+
$gutter: 24px; // The gutter-width of your grid in pixels
|
6
|
+
|
7
|
+
|
8
|
+
//
|
9
|
+
// Column-widths in variables, in ems
|
10
|
+
//
|
11
|
+
|
12
|
+
$cols1: ( 1 * ($column + $gutter) - $gutter) / $em;
|
13
|
+
$cols2: ( 2 * ($column + $gutter) - $gutter) / $em;
|
14
|
+
$cols3: ( 3 * ($column + $gutter) - $gutter) / $em;
|
15
|
+
$cols4: ( 4 * ($column + $gutter) - $gutter) / $em;
|
16
|
+
$cols5: ( 5 * ($column + $gutter) - $gutter) / $em;
|
17
|
+
$cols6: ( 6 * ($column + $gutter) - $gutter) / $em;
|
18
|
+
$cols7: ( 7 * ($column + $gutter) - $gutter) / $em;
|
19
|
+
$cols8: ( 8 * ($column + $gutter) - $gutter) / $em;
|
20
|
+
$cols9: ( 9 * ($column + $gutter) - $gutter) / $em;
|
21
|
+
$cols10: (10 * ($column + $gutter) - $gutter) / $em;
|
22
|
+
$cols11: (11 * ($column + $gutter) - $gutter) / $em;
|
23
|
+
$cols12: (12 * ($column + $gutter) - $gutter) / $em;
|
24
|
+
$cols13: (13 * ($column + $gutter) - $gutter) / $em;
|
25
|
+
$cols14: (14 * ($column + $gutter) - $gutter) / $em;
|
26
|
+
$cols15: (15 * ($column + $gutter) - $gutter) / $em;
|
27
|
+
$cols16: (16 * ($column + $gutter) - $gutter) / $em;
|
metadata
CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.2
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nick Treadway
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-02-21 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
type: :development
|
@@ -57,13 +57,16 @@ extra_rdoc_files: []
|
|
57
57
|
|
58
58
|
files:
|
59
59
|
- .gitignore
|
60
|
+
- CHANGELOG.mkdn
|
60
61
|
- Gemfile
|
61
62
|
- README.mkdn
|
62
63
|
- Rakefile
|
63
64
|
- lib/responsive-sass.rb
|
64
65
|
- lib/responsive-sass/version.rb
|
65
66
|
- responsive-sass.gemspec
|
67
|
+
- stylesheets/_normalize.scss
|
66
68
|
- stylesheets/_responsive-sass.scss
|
69
|
+
- stylesheets/partials/_base.scss
|
67
70
|
homepage: http://github.com/ntreadway/responsive-sass
|
68
71
|
licenses: []
|
69
72
|
|