Compare commits

..

No commits in common. "main" and "0.1.0" have entirely different histories.
main ... 0.1.0

24 changed files with 255 additions and 368 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "total-reset", "name": "total-reset",
"version": "0.1.1", "version": "0.1.0",
"description": "A semantic CSS reset that goes all the way", "description": "A semantic CSS reset that goes all the way",
"authors": [ "authors": [
"M. George Hansen <technopolitica@gmail.com>" "M. George Hansen <technopolitica@gmail.com>"
@ -18,7 +18,7 @@
}, },
"main": [ "main": [
"dist/total-reset.css", "dist/total-reset.css",
"src/total-reset.scss" "src/total-reset.sass"
], ],
"ignore": [ "ignore": [
"**/.*", "**/.*",

113
dist/total-reset.css vendored
View file

@ -9,16 +9,8 @@
* on the fact that *all* elements are block by default. Except checkboxes * on the fact that *all* elements are block by default. Except checkboxes
* and radios of course, because reasons. * and radios of course, because reasons.
*/ */
article, aside, div, footer, header, hgroup, main, menu, nav, noscript, section,
abbr, acronym, blockquote, h1, h2, h3, h4, h5, h6, p, q,
b, bdo, em, i, ins, hr, mark, pre, s, small, strike, strong, sub, sup, u, wbr,
a, address, cite, code, dd, dfn, dl, dt, figcaption, figure, kbd, ol, ul, samp, time, var,
rp, rt, ruby,
details, meter, progress, summary,
audio, canvas, embed, img, svg, video,
button, datalist, form, fieldset, input:not([type="checkbox"]):not([type="radio"]), keygen, label, output, select, textarea { button, datalist, form, fieldset, input:not([type="checkbox"]):not([type="radio"]), keygen, label, output, select, textarea {
display: block; display: block; }
/* 1 */ }
/** /**
* 1. Reset box-sizing on all elements to border-box. * 1. Reset box-sizing on all elements to border-box.
@ -42,14 +34,10 @@ html {
*/ */
a { a {
color: inherit; color: inherit;
/* 1 */
text-decoration: none; text-decoration: none;
/* 1 */ background-color: transparent; }
background-color: transparent;
/* 2 */ }
a:link, a:active, a:visited { a:link, a:active, a:visited {
color: inherit; color: inherit; }
/* 1 */ }
ul, ol { ul, ol {
margin: 0; margin: 0;
@ -64,48 +52,39 @@ ul, ol {
*/ */
html { html {
-ms-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
/* 1 */ -webkit-text-size-adjust: 100%; }
-webkit-text-size-adjust: 100%;
/* 1 */ }
/** /**
* 1. Remove all styling from `h1-6` elements. * 1. Remove all styling from `h1-6` elements.
*/ */
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
margin: 0; margin: 0;
/* 1 */
font-size: inherit; font-size: inherit;
/* 1 */ font-weight: inherit; }
font-weight: inherit;
/* 1 */ }
/** /**
* 1. Remove extra margin around these elements. * 1. Remove extra margin around these elements.
*/ */
p, dl, dd, pre, figure, blockquote { p, dl, dd, pre, figure, blockquote {
margin: 0; margin: 0; }
/* 1 */ }
/** /**
* 1. Ensure that these elements inherit font-style. * 1. Ensure that these elements inherit font-style.
*/ */
i, cite, em, var, address, dfn { i, cite, em, var, address, dfn {
font-style: inherit; font-style: inherit; }
/* 1 */ }
/** /**
* 1. Ensure that these elements inherit text-decoration. * 1. Ensure that these elements inherit text-decoration.
*/ */
u, s, strike, del, ins { u, s, strike, del, ins {
text-decoration: inherit; text-decoration: inherit; }
/* 1 */ }
/** /**
* 1. Ensure that these elements inherit font-weight. * 1. Ensure that these elements inherit font-weight.
*/ */
dfn, strong, th, b { dfn, strong, th, b {
font-weight: inherit; font-weight: inherit; }
/* 1 */ }
small { small {
font-size: inherit; } font-size: inherit; }
@ -116,31 +95,24 @@ small {
*/ */
tt, code, kbd, samp, pre { tt, code, kbd, samp, pre {
font-family: inherit; font-family: inherit;
/* 1 */ font-size: inherit; }
font-size: inherit;
/* 2 */ }
/** /**
* 1. Remove quotation marks. * 1. Remove quotation marks.
*/ */
q::before, q::after { q::before, q::after {
content: ""; content: "";
/* 1 */ content: none; }
content: none;
/* 1 */ }
blockquote, q { blockquote, q {
quotes: none; quotes: none; }
/* 1 */ }
/** /**
* 1. Reset styling for `mark` elements. * 1. Reset styling for `mark` elements.
*/ */
mark { mark {
background-color: inherit; background-color: inherit;
/* 1 */ color: inherit; }
color: inherit;
/* 1 */ }
hr { hr {
box-sizing: content-box; box-sizing: content-box;
@ -176,8 +148,7 @@ img {
* 1. Remove borders from iframes. This isn't 1995 any more. * 1. Remove borders from iframes. This isn't 1995 any more.
*/ */
iframe { iframe {
border: none; border: none; }
/* 1 */ }
/** /**
* 1. Prevent modern browsers from displaying `audio` without controls. * 1. Prevent modern browsers from displaying `audio` without controls.
@ -185,9 +156,7 @@ iframe {
*/ */
audio:not([controls]) { audio:not([controls]) {
display: none; display: none;
/* 1 */ height: 0; }
height: 0;
/* 2 */ }
/** /**
* Correct overflow not hidden in IE 9/10/11 (from normalize.css). * Correct overflow not hidden in IE 9/10/11 (from normalize.css).
@ -248,11 +217,8 @@ audio {
*/ */
fieldset { fieldset {
margin: 0; margin: 0;
/* 1 */
padding: 0; padding: 0;
/* 1 */ border: none; }
border: none;
/* 1 */ }
/** /**
* 1. Fully reset lengends removing all default styling. * 1. Fully reset lengends removing all default styling.
@ -260,11 +226,8 @@ fieldset {
*/ */
legend { legend {
border: 0; border: 0;
/* 1 */
padding: 0; padding: 0;
/* 1 */ width: 100%; }
width: 100%;
/* 2 */ }
/** /**
* Known limitation: by default, Chrome and Safari on OS X allow very limited * Known limitation: by default, Chrome and Safari on OS X allow very limited
@ -291,9 +254,7 @@ button {
*/ */
select { select {
border-radius: 0; border-radius: 0;
/* 1 */ -webkit-appearance: none; }
-webkit-appearance: none;
/* 2 */ }
/** /**
* Remove default vertical scrollbar in IE 8/9/10/11 (from normalize.css). * Remove default vertical scrollbar in IE 8/9/10/11 (from normalize.css).
@ -305,8 +266,7 @@ textarea {
* 1. Address `overflow` set to `hidden` in IE 8/9/10/11 (from normalize.css). * 1. Address `overflow` set to `hidden` in IE 8/9/10/11 (from normalize.css).
*/ */
button { button {
overflow: visible; overflow: visible; }
/* 1 */ }
/** /**
* 1. Address inconsistent `text-transform` inheritance for `button` and * 1. Address inconsistent `text-transform` inheritance for `button` and
@ -317,8 +277,7 @@ button {
*/ */
button, button,
select { select {
text-transform: none; text-transform: none; }
/* 1 */ }
/** /**
* 1. Remove inner padding and border in Firefox 4+ (from normalize.css). * 1. Remove inner padding and border in Firefox 4+ (from normalize.css).
@ -326,9 +285,7 @@ select {
button::-moz-focus-inner, button::-moz-focus-inner,
input::-moz-focus-inner { input::-moz-focus-inner {
border: 0; border: 0;
/* 1 */ padding: 0; }
padding: 0;
/* 1 */ }
/** /**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
@ -342,9 +299,7 @@ html input[type="button"],
input[type="submit"], input[type="submit"],
input[type="reset"] { input[type="reset"] {
-webkit-appearance: button; -webkit-appearance: button;
/* 2 */
cursor: pointer; cursor: pointer;
/* 3 */
text-align: left; } text-align: left; }
/** /**
@ -371,9 +326,7 @@ input {
input[type="checkbox"], input[type="checkbox"],
input[type="radio"] { input[type="radio"] {
box-sizing: border-box; box-sizing: border-box;
/* 1 */ padding: 0; }
padding: 0;
/* 2 */ }
/** /**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain * Fix the cursor style for Chrome's increment/decrement buttons. For certain
@ -395,11 +348,9 @@ input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-o
* *
*/ */
input[type="search"] { input[type="search"] {
-webkit-appearance: textfield; -webkit-appearance: textfield; }
/* 1 */ }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none; -webkit-appearance: none; }
/* 2 */ }
/** /**
* 1. Update input placeholders to inherit color (IE, Chrome and Safari) and * 1. Update input placeholders to inherit color (IE, Chrome and Safari) and
@ -410,16 +361,13 @@ input[type="search"] {
* workaround :(. * workaround :(.
*/ */
::-webkit-input-placeholder { ::-webkit-input-placeholder {
color: inherit; color: inherit; }
/* 1 */ }
::-moz-placeholder { ::-moz-placeholder {
opacity: inherit; opacity: inherit; }
/* 1 */ }
:-ms-input-placeholder { :-ms-input-placeholder {
color: inherit; color: inherit; }
/* 1 */ }
/** /**
* 1. Address `[hidden]` styling not present in IE 8/9/10 and hide the * 1. Address `[hidden]` styling not present in IE 8/9/10 and hide the
@ -428,8 +376,7 @@ input[type="search"] {
*/ */
[hidden], [hidden],
template { template {
display: none; display: none; }
/* 1 */ }
/** /**
* 1. Remove default padding on body. * 1. Remove default padding on body.
@ -437,6 +384,4 @@ template {
*/ */
body { body {
margin: 0; margin: 0;
/* 1 */ line-height: 1; }
line-height: 1;
/* 2 */ }

View file

@ -1 +1 @@
b,dfn,h1,h2,h3,h4,h5,h6,strong,th{font-weight:inherit}h1,h2,h3,h4,h5,h6,small{font-size:inherit}[title],a{text-decoration:none}button,html,input:not([type=checkbox]):not([type=radio]),legend,meter,progress,select,textarea{width:100%}fieldset,iframe,img{border:none}a,a:active,a:link,a:visited,mark{color:inherit}a,abbr,acronym,address,article,aside,audio,b,bdo,blockquote,button,canvas,cite,code,datalist,dd,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,img,input:not([type=checkbox]):not([type=radio]),ins,kbd,keygen,label,main,mark,menu,meter,nav,noscript,ol,output,p,pre,progress,q,rp,rt,ruby,s,samp,section,select,small,strike,strong,sub,summary,sup,svg,textarea,time,u,ul,var,video,wbr{display:block}html{box-sizing:border-box;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;overflow-x:hidden}*,::after,::before{box-sizing:inherit}a{background-color:transparent}ol,ul{margin:0;padding:0;list-style-type:none}ol ol,ol ul,td,th,ul ol,ul ul{padding:0}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,p,pre{margin:0}address,cite,dfn,em,i,var{font-style:inherit}del,ins,s,strike,u{text-decoration:inherit}code,kbd,pre,samp,tt{font-family:inherit;font-size:inherit}q::after,q::before{content:"";content:none}blockquote,q{quotes:none}mark{background-color:inherit}hr{box-sizing:content-box;height:0}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}audio:not([controls]){display:none;height:0}svg:not(:root){overflow:hidden}:focus{outline:0}table{border-collapse:collapse;border-spacing:0}caption{text-align:inherit}embed,iframe,img,object,video{height:auto;max-width:100%}audio{max-width:100%}fieldset{margin:0;padding:0}legend{border:0;padding:0}button,input:not([type=checkbox]):not([type=radio]),optgroup,select,textarea{margin:0;padding:0;border:none;background:0 0;font:inherit;color:inherit}select{border-radius:0;-webkit-appearance:none}textarea{overflow:auto}button{overflow:visible}button,select{text-transform:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button,html input[type=button],input[type=submit],input[type=reset]{-webkit-appearance:button;cursor:pointer;text-align:left}button[disabled],html input[disabled]{cursor:default}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit}::-moz-placeholder{opacity:inherit}:-ms-input-placeholder{color:inherit}[hidden],template{display:none}body{margin:0;line-height:1} b,dfn,h1,h2,h3,h4,h5,h6,strong,th{font-weight:inherit}h1,h2,h3,h4,h5,h6,small{font-size:inherit}[title],a{text-decoration:none}button,html,input:not([type=checkbox]):not([type=radio]),legend,meter,progress,select,textarea{width:100%}fieldset,iframe,img{border:none}a,a:active,a:link,a:visited,mark{color:inherit}button,datalist,fieldset,form,input:not([type=checkbox]):not([type=radio]),keygen,label,output,select,textarea{display:block}html{box-sizing:border-box;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;overflow-x:hidden}*,::after,::before{box-sizing:inherit}a{background-color:transparent}ol,ul{margin:0;padding:0;list-style-type:none}ol ol,ol ul,td,th,ul ol,ul ul{padding:0}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,p,pre{margin:0}address,cite,dfn,em,i,var{font-style:inherit}del,ins,s,strike,u{text-decoration:inherit}code,kbd,pre,samp,tt{font-family:inherit;font-size:inherit}q::after,q::before{content:"";content:none}blockquote,q{quotes:none}mark{background-color:inherit}hr{box-sizing:content-box;height:0}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}audio:not([controls]){display:none;height:0}svg:not(:root){overflow:hidden}:focus{outline:0}table{border-collapse:collapse;border-spacing:0}caption{text-align:inherit}embed,iframe,img,object,video{height:auto;max-width:100%}audio{max-width:100%}fieldset{margin:0;padding:0}legend{border:0;padding:0}button,input:not([type=checkbox]):not([type=radio]),optgroup,select,textarea{margin:0;padding:0;border:none;background:0 0;font:inherit;color:inherit}select{border-radius:0;-webkit-appearance:none}textarea{overflow:auto}button{overflow:visible}button,select{text-transform:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}button,html input[type=button],input[type=submit],input[type=reset]{-webkit-appearance:button;cursor:pointer;text-align:left}button[disabled],html input[disabled]{cursor:default}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit}::-moz-placeholder{opacity:inherit}:-ms-input-placeholder{color:inherit}[hidden],template{display:none}body{margin:0;line-height:1}

View file

@ -9,7 +9,7 @@ var distDir = 'dist';
var srcDir = 'src'; var srcDir = 'src';
gulp.task('build', function() { gulp.task('build', function() {
return gulp.src(srcDir + '/**/[^_]*.scss') return gulp.src(srcDir + '/**/[^_]*.sass')
.pipe(gulpSass()).on('error', gulpSass.logError) .pipe(gulpSass()).on('error', gulpSass.logError)
.pipe(gulp.dest(distDir)) .pipe(gulp.dest(distDir))
.pipe(browserSync.stream()) .pipe(browserSync.stream())
@ -32,7 +32,7 @@ gulp.task('serve', ['build'], function() {
}); });
gulp.watch('test/**/*.html').on('change', browserSync.reload); gulp.watch('test/**/*.html').on('change', browserSync.reload);
gulp.watch(srcDir + '/**/*.scss', ['build']); gulp.watch(srcDir + '/**/*.sass', ['build']);
}); });
gulp.task('default', ['build']) gulp.task('default', ['build'])

View file

@ -1,6 +1,6 @@
{ {
"name": "total-reset", "name": "total-reset",
"version": "0.1.1", "version": "0.1.0",
"description": "A semantic CSS reset that goes all the way", "description": "A semantic CSS reset that goes all the way",
"license": "MPL-2.0", "license": "MPL-2.0",
"keywords": [ "keywords": [

View file

@ -11,15 +11,13 @@
* made for standard and expected behavior, but it is easy enough to add * made for standard and expected behavior, but it is easy enough to add
* a focus outline back in the application styling if that's what you want. * a focus outline back in the application styling if that's what you want.
*/ */
:focus { :focus
outline: none; outline: none /* 1 */
}
/** /**
* 1. Remove the underline that Firefox adds to elements with a title. * 1. Remove the underline that Firefox adds to elements with a title.
* *
* Again, this might be controversal but see the comments on :focus above. * Again, this might be controversal but see the comments on :focus above.
*/ */
[title] { [title]
text-decoration: none; text-decoration: none /* 1 */
}

View file

@ -16,6 +16,5 @@ a, address, cite, code, dd, dfn, dl, dt, figcaption, figure, kbd, ol, ul, samp,
rp, rt, ruby, /* language elements */ rp, rt, ruby, /* language elements */
details, meter, progress, summary, /* interactive elements */ details, meter, progress, summary, /* interactive elements */
audio, canvas, embed, img, svg, video, /* embedded content */ audio, canvas, embed, img, svg, video, /* embedded content */
button, datalist, form, fieldset, input:not([type="checkbox"]):not([type="radio"]), keygen, label, output, select, textarea /* form elements */ { button, datalist, form, fieldset, input:not([type="checkbox"]):not([type="radio"]), keygen, label, output, select, textarea /* form elements */
display: block; /* 1 */ display: block /* 1 */
}

View file

@ -7,10 +7,8 @@
* This method seems to cause the least number of headaches and override * This method seems to cause the least number of headaches and override
* issues. * issues.
*/ */
html { html
box-sizing: border-box; box-sizing: border-box /* 1 */
}
*, *::before, *::after { *, *::before, *::after
box-sizing: inherit; box-sizing: inherit /* 1 */
}

View file

@ -5,29 +5,25 @@
* high specificity and makes it difficult to override. `img` shouldn't * high specificity and makes it difficult to override. `img` shouldn't
* have borders anyway, so no harm no foul. * have borders anyway, so no harm no foul.
*/ */
img { img
border: none; border: none
}
/** /**
* 1. Remove borders from iframes. This isn't 1995 any more. * 1. Remove borders from iframes. This isn't 1995 any more.
*/ */
iframe { iframe
border: none; /* 1 */ border: none /* 1 */
}
/** /**
* 1. Prevent modern browsers from displaying `audio` without controls. * 1. Prevent modern browsers from displaying `audio` without controls.
* 2. Remove excess height in iOS 5 devices (from normalize.css). * 2. Remove excess height in iOS 5 devices (from normalize.css).
*/ */
audio:not([controls]) { audio:not([controls])
display: none; /* 1 */ display: none /* 1 */
height: 0; /* 2 */ height: 0 /* 2 */
}
/** /**
* Correct overflow not hidden in IE 9/10/11 (from normalize.css). * Correct overflow not hidden in IE 9/10/11 (from normalize.css).
*/ */
svg:not(:root) { svg:not(:root)
overflow: hidden; overflow: hidden
}

View file

@ -1,21 +1,19 @@
/** /**
* 1. Fully reset fieldsets removing all default styling. * 1. Fully reset fieldsets removing all default styling.
*/ */
fieldset { fieldset
margin: 0; /* 1 */ margin: 0 /* 1 */
padding: 0; /* 1 */ padding: 0 /* 1 */
border: none; /* 1 */ border: none /* 1 */
}
/** /**
* 1. Fully reset lengends removing all default styling. * 1. Fully reset lengends removing all default styling.
* 2. On Android Chrome browser lengends don't expand to 100%, so we fix that. * 2. On Android Chrome browser lengends don't expand to 100%, so we fix that.
*/ */
legend { legend
border: 0; /* 1 */ border: 0 /* 1 */
padding: 0; /* 1 */ padding: 0 /* 1 */
width: 100%; /* 2 */ width: 100% /* 2 */
}
/** /**
* Known limitation: by default, Chrome and Safari on OS X allow very limited * Known limitation: by default, Chrome and Safari on OS X allow very limited
@ -25,14 +23,13 @@ input:not([type="checkbox"]):not([type="radio"]),
optgroup, optgroup,
select, select,
textarea, textarea,
button { button
margin: 0; margin: 0
padding: 0; padding: 0
border: none; border: none
background: none; background: none
font: inherit; font: inherit
color: inherit; color: inherit
}
/** /**
* 1. Remove border-radius in Safari. * 1. Remove border-radius in Safari.
@ -41,24 +38,21 @@ button {
* Note that this also removes the dropdown arrow in Safari, which isn't * Note that this also removes the dropdown arrow in Safari, which isn't
* ideal but there is little we can do about it. * ideal but there is little we can do about it.
*/ */
select { select
border-radius: 0; /* 1 */ border-radius: 0 /* 1 */
-webkit-appearance: none; /* 2 */ -webkit-appearance: none /* 2 */
}
/** /**
* Remove default vertical scrollbar in IE 8/9/10/11 (from normalize.css). * Remove default vertical scrollbar in IE 8/9/10/11 (from normalize.css).
*/ */
textarea { textarea
overflow: auto; overflow: auto
}
/** /**
* 1. Address `overflow` set to `hidden` in IE 8/9/10/11 (from normalize.css). * 1. Address `overflow` set to `hidden` in IE 8/9/10/11 (from normalize.css).
*/ */
button { button
overflow: visible; /* 1 */ overflow: visible /* 1 */
}
/** /**
* 1. Address inconsistent `text-transform` inheritance for `button` and * 1. Address inconsistent `text-transform` inheritance for `button` and
@ -68,20 +62,17 @@ button {
* (from normalize.css). * (from normalize.css).
*/ */
button, button,
select { select
text-transform: none; /* 1 */ text-transform: none /* 1 */
}
/** /**
* 1. Remove inner padding and border in Firefox 4+ (from normalize.css). * 1. Remove inner padding and border in Firefox 4+ (from normalize.css).
*/ */
button, button,
input { input
&::-moz-focus-inner { &::-moz-focus-inner
border: 0; /* 1 */ border: 0 /* 1 */
padding: 0; /* 1 */ padding: 0 /* 1 */
}
}
/** /**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
@ -91,29 +82,26 @@ input {
* `input` and others. * `input` and others.
*/ */
button, button,
html input[type="button"], /* 1 */ html input[type="button"] /* 1 */,
input[type="submit"], input[type="submit"],
input[type="reset"] { input[type="reset"]
-webkit-appearance: button; /* 2 */ -webkit-appearance: button /* 2 */
cursor: pointer; /* 3 */ cursor: pointer /* 3 */
text-align: left; text-align: left
}
/** /**
* Re-set default cursor for disabled elements. * Re-set default cursor for disabled elements.
*/ */
button[disabled], button[disabled],
html input[disabled] { html input[disabled]
cursor: default; cursor: default
}
/** /**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in * Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet. * the UA stylesheet.
*/ */
input { input
line-height: normal; line-height: normal
}
/** /**
* Checkboxes and radio inputs are not styleable in most browsers unfortunately, * Checkboxes and radio inputs are not styleable in most browsers unfortunately,
@ -123,22 +111,19 @@ input {
* 2. Remove excess padding in IE 8/9/10 (from normalize.css). * 2. Remove excess padding in IE 8/9/10 (from normalize.css).
*/ */
input[type="checkbox"], input[type="checkbox"],
input[type="radio"] { input[type="radio"]
box-sizing: border-box; /* 1 */ box-sizing: border-box /* 1 */
padding: 0; /* 2 */ padding: 0 /* 2 */
}
/** /**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain * Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the * `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`. * decrement button to change from `default` to `text`.
*/ */
input[type="number"] { input[type="number"]
&::-webkit-inner-spin-button, &::-webkit-inner-spin-button,
&::-webkit-outer-spin-button { &::-webkit-outer-spin-button
height: auto; height: auto
}
}
/** /**
* 1. Address `appearance` set to `searchfield` in Safari and Chrome which is * 1. Address `appearance` set to `searchfield` in Safari and Chrome which is
@ -151,14 +136,12 @@ input[type="number"] {
* safar * safar
* *
*/ */
input[type="search"] { input[type="search"]
-webkit-appearance: textfield; /* 1 */ -webkit-appearance: textfield /* 1 */
&::-webkit-search-cancel-button, &::-webkit-search-cancel-button,
&::-webkit-search-decoration { &::-webkit-search-decoration
-webkit-appearance: none; /* 2 */ -webkit-appearance: none /* 2 */
}
}
/** /**
* 1. Update input placeholders to inherit color (IE, Chrome and Safari) and * 1. Update input placeholders to inherit color (IE, Chrome and Safari) and
@ -168,12 +151,9 @@ input[type="search"] {
* a known bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1004130) with no * a known bug (https://bugzilla.mozilla.org/show_bug.cgi?id=1004130) with no
* workaround :(. * workaround :(.
*/ */
::-webkit-input-placeholder { ::-webkit-input-placeholder
color: inherit; /* 1 */ color: inherit /* 1 */
} ::-moz-placeholder
::-moz-placeholder { opacity: inherit /* 1 */
opacity: inherit; /* 1 */ :-ms-input-placeholder
} color: inherit /* 1 */
:-ms-input-placeholder {
color: inherit; /* 1 */
};

View file

@ -4,6 +4,5 @@
* (from normalize.css). * (from normalize.css).
*/ */
[hidden], [hidden],
template { template
display: none; /* 1 */ display: none /* 1 */
}

12
src/_links.sass Normal file
View file

@ -0,0 +1,12 @@
/**
* 1. Fully reset link styling.
* 2. Remove gray background color from active links in IE 10
* (from normalize.css).
*/
a
color: inherit /* 1 */
text-decoration: none /* 1 */
background-color: transparent /* 2 */
&:link, &:active, &:visited
color: inherit /* 1 */

View file

@ -1,14 +0,0 @@
/**
* 1. Fully reset link styling.
* 2. Remove gray background color from active links in IE 10
* (from normalize.css).
*/
a {
color: inherit; /* 1 */
text-decoration: none; /* 1 */
background-color: transparent; /* 2 */
&:link, &:active, &:visited {
color: inherit; /* 1 */
}
}

7
src/_lists.sass Normal file
View file

@ -0,0 +1,7 @@
ul, ol
margin: 0
padding: 0
list-style-type: none
ol, ul
padding: 0

View file

@ -1,9 +0,0 @@
ul, ol {
margin: 0;
padding: 0;
list-style-type: none;
ol, ul {
padding: 0;
}
}

13
src/_responsive.sass Normal file
View file

@ -0,0 +1,13 @@
html
width: 100%
overflow-x: hidden
input:not([type="checkbox"]):not([type="radio"]), select, textarea, button, meter, progress
width: 100%
img, video, object, embed, iframe
height: auto
max-width: 100%
audio
max-width: 100%

View file

@ -1,17 +0,0 @@
html {
width: 100%;
overflow-x: hidden;
}
input:not([type="checkbox"]):not([type="radio"]), select, textarea, button, meter, progress {
width: 100%;
}
img, video, object, embed, iframe {
height: auto;
max-width: 100%;
}
audio {
max-width: 100%;
}

9
src/_tables.sass Normal file
View file

@ -0,0 +1,9 @@
table
border-collapse: collapse
border-spacing: 0
td, th
padding: 0
caption
text-align: inherit

View file

@ -1,12 +0,0 @@
table {
border-collapse: collapse;
border-spacing: 0;
}
td, th {
padding: 0;
}
caption {
text-align: inherit;
}

85
src/_typography.sass Normal file
View file

@ -0,0 +1,85 @@
/**
* 1. Prevent iOS and IE text size adjust after device orientation change
* without disabling user zoom.
*/
html
-ms-text-size-adjust: 100% /* 1 */
-webkit-text-size-adjust: 100% /* 1 */
/**
* 1. Remove all styling from `h1-6` elements.
*/
h1, h2, h3, h4, h5, h6
margin: 0 /* 1 */
font-size: inherit /* 1 */
font-weight: inherit /* 1 */
/**
* 1. Remove extra margin around these elements.
*/
p, dl, dd, pre, figure, blockquote
margin: 0 /* 1 */
/**
* 1. Ensure that these elements inherit font-style.
*/
i, cite, em, var, address, dfn
font-style: inherit /* 1 */
/**
* 1. Ensure that these elements inherit text-decoration.
*/
u, s, strike, del, ins
text-decoration: inherit /* 1 */
/**
* 1. Ensure that these elements inherit font-weight.
*/
dfn, strong, th, b
font-weight: inherit /* 1 */
small
font-size: inherit
/**
* 1. Ensure that font-family is inherited.
* 2. Inherit font size in IE.
*/
tt, code, kbd, samp, pre
font-family: inherit /* 1 */
font-size: inherit /* 2 */
/**
* 1. Remove quotation marks.
*/
q
&::before, &::after
content: '' /* 1 */
content: none /* 1 */
blockquote, q
quotes: none /* 1 */
/**
* 1. Reset styling for `mark` elements.
*/
mark
background-color: inherit /* 1 */
color: inherit /* 1 */
hr
box-sizing: content-box /* 1 */
height: 0 /* 1 */
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers
* (from normalize.css).
*/
sub, sup
font-size: 75%
line-height: 0
position: relative
vertical-align: baseline
sup
top: -0.5em
sub
bottom: -0.25em

View file

@ -1,101 +0,0 @@
/**
* 1. Prevent iOS and IE text size adjust after device orientation change
* without disabling user zoom.
*/
html {
-ms-text-size-adjust: 100%; /* 1 */
-webkit-text-size-adjust: 100%; /* 1 */
}
/**
* 1. Remove all styling from `h1-6` elements.
*/
h1, h2, h3, h4, h5, h6 {
margin: 0; /* 1 */
font-size: inherit; /* 1 */
font-weight: inherit; /* 1 */
}
/**
* 1. Remove extra margin around these elements.
*/
p, dl, dd, pre, figure, blockquote {
margin: 0; /* 1 */
}
/**
* 1. Ensure that these elements inherit font-style.
*/
i, cite, em, var, address, dfn {
font-style: inherit; /* 1 */
}
/**
* 1. Ensure that these elements inherit text-decoration.
*/
u, s, strike, del, ins {
text-decoration: inherit; /* 1 */
}
/**
* 1. Ensure that these elements inherit font-weight.
*/
dfn, strong, th, b {
font-weight: inherit; /* 1 */
}
small {
font-size: inherit;
}
/**
* 1. Ensure that font-family is inherited.
* 2. Inherit font size in IE.
*/
tt, code, kbd, samp, pre {
font-family: inherit; /* 1 */
font-size: inherit; /* 2 */
}
/**
* 1. Remove quotation marks.
*/
q {
&::before, &::after {
content: ""; /* 1 */
content: none; /* 1 */
}
}
blockquote, q {
quotes: none; /* 1 */
}
/**
* 1. Reset styling for `mark` elements.
*/
mark {
background-color: inherit; /* 1 */
color: inherit; /* 1 */
}
hr {
box-sizing: content-box;
height: 0;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers
* (from normalize.css).
*/
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}

19
src/total-reset.sass Normal file
View file

@ -0,0 +1,19 @@
@import blocks
@import box-sizing
@import links
@import lists
@import typography
@import embedded-content
@import accessibility
@import tables
@import responsive
@import form-elements
@import hidden
/**
* 1. Remove default padding on body.
* 2. Normalize line-height.
*/
body
margin: 0 /* 1 */
line-height: 1 /* 2 */

View file

@ -1,20 +0,0 @@
@import "blocks";
@import "box-sizing";
@import "links";
@import "lists";
@import "typography";
@import "embedded-content";
@import "accessibility";
@import "tables";
@import "responsive";
@import "form-elements";
@import "hidden";
/**
* 1. Remove default padding on body.
* 2. Normalize line-height.
*/
body {
margin: 0; /* 1 */
line-height: 1; /* 2 */
}

View file

@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">
<title>HTML5 Test Page</title> <title>HTML5 Test Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/dist/total-reset.min.css"> <link rel="stylesheet" href="/dist/full-reset.min.css">
</head> </head>
<body> <body>
<div id="top" class="page" role="document"> <div id="top" class="page" role="document">