Skip to content

Commit 54d20da

Browse files
committed
* { Box-sizing: Border-box } FTW
1 parent 2925163 commit 54d20da

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

scss/_reset.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ time, mark, audio, video {
2323
font: inherit;
2424
vertical-align: baseline;
2525
}
26-
/* HTML5 display-role reset for older browsers */
26+
// HTML5 display-role reset for older browsers
2727
article, aside, details, figcaption, figure,
2828
footer, header, hgroup, menu, nav, section {
2929
display: block;
@@ -46,3 +46,8 @@ table {
4646
border-collapse: collapse;
4747
border-spacing: 0;
4848
}
49+
// Apply a natural box layout model to all elements
50+
// from: http://www.paulirish.com/2012/box-sizing-border-box-ftw/
51+
*, *:before, *:after {
52+
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
53+
}

scss/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ body {
2323
.container {
2424
margin: 0 auto;
2525
max-width: 740px;
26-
//padding: 0 20px;
26+
padding: 0 10px;
2727
width: 100%;
2828
}
2929

style.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockq
99
font: inherit;
1010
vertical-align: baseline; }
1111

12-
/* HTML5 display-role reset for older browsers */
1312
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
1413
display: block; }
1514

@@ -30,6 +29,11 @@ table {
3029
border-collapse: collapse;
3130
border-spacing: 0; }
3231

32+
*, *:before, *:after {
33+
-moz-box-sizing: border-box;
34+
-webkit-box-sizing: border-box;
35+
box-sizing: border-box; }
36+
3337
/*/
3438
/* BASE RULES
3539
/*/
@@ -44,6 +48,7 @@ body {
4448
.container {
4549
margin: 0 auto;
4650
max-width: 740px;
51+
padding: 0 10px;
4752
width: 100%; }
4853

4954
h1, h2, h3, h4, h5, h6 {

0 commit comments

Comments
 (0)