Skip to content

Commit

Permalink
feat: add CSS resets
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Mar 17, 2018
1 parent fecba8d commit 26f86b4
Show file tree
Hide file tree
Showing 13 changed files with 417 additions and 1 deletion.
48 changes: 48 additions & 0 deletions addon/reset/EricMeyer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'html,body,div,span,applet,object,iframe,table,caption,tbody,tfoot,thead,tr,th,td,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,dl,dt,dd,ol,ul,li,fieldset,form,label,legend': {
'vertical-align': 'baseline',
ff: 'inherit',
fw: 'inherit',
fs: 'inherit',
fz: '100%',
out: 0,
pad: 0,
mar: 0,
bd: 0,
},
':focus': {
out: 0,
},
body: {
bg: 'white',
lh: 1,
col: 'black',
},
'ol, ul': {
'list-style': 'none',
},
table: {
'border-collapse': 'separate',
'border-spacing': 0,
},
'caption, th, td': {
fw: 'normal',
ta: 'left',
},
'blockquote:before, blockquote:after, q:before, q:after': {
content: '""',
},
'blockquote, q': {
quotes: '"" ""',
},
};

renderer.put('', css);
};
44 changes: 44 additions & 0 deletions addon/reset/EricMeyerCondensed.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td': {
pad: 0,
mar: 0,
},
'fieldset, img': {
bd: 0,
},
table: {
'border-collapse': 'collapse',
'border-spacing': 0,
},
'ol, ul': {
'list-style': 'none',
},
'address, caption, cite, code, dfn, em, strong, th, var': {
fw: 'normal',
fs: 'normal',
},
'caption, th': {
ta: 'left',
},
'h1, h2, h3, h4, h5, h6': {
fw: 'normal',
fs: '100%',
},
'q:before, q:after': {
con: "''",
},
'abbr, acronym': {
bd: 0,
},
};

renderer.put('', css);
};

16 changes: 16 additions & 0 deletions addon/reset/Minimalistic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'*': {
pad: 0,
mar: 0,
},
};

renderer.put('', css);
};
17 changes: 17 additions & 0 deletions addon/reset/Minimalistic2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'*': {
pad: 0,
mar: 0,
bd: 0,
},
};

renderer.put('', css);
};
18 changes: 18 additions & 0 deletions addon/reset/Minimalistic3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'*': {
pad: 0,
mar: 0,
bd: 0,
out: 0,
},
};

renderer.put('', css);
};
25 changes: 25 additions & 0 deletions addon/reset/PoorMan.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'html, body': {
pad: 0,
mar: 0,
},
html: {
fz: '1em',
},
body: {
fz: '100%',
},
'a img, :link img, :visited img': {
bd: 0,
},
};

renderer.put('', css);
};
42 changes: 42 additions & 0 deletions addon/reset/ShaunInman.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,table,th,td,embed,object': {
pad: 0,
mar: 0,
},
table: {
'border-collapse': 'collapse',
'border-spacing': 0,
},
'fieldset,img,abbr': {
bd: 0,
},
'address,caption,cite,code,dfn,em,h1,h2,h3,h4,h5,h6,strong,th,var': {
fw: 'normal',
fs: 'normal',
},
ul: {
'list-style': 'none',
},
'caption,th': {
ta: 'left',
},
'h1,h2,h3,h4,h5,h6': {
fz: '1.0em',
},
'q:before,q:after': {
con: '""',
},
'a,ins': {
td: 'none',
},
};

renderer.put('', css);
};
34 changes: 34 additions & 0 deletions addon/reset/Siolon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'*': {
'vertical-align': 'baseline',
ff: 'inherit',
fs: 'inherit',
fz: '100%',
bd: 'none',
pad: 0,
mar: 0,
},
body: {
pad: '5px',
},
'h1, h2, h3, h4, h5, h6, p, pre, blockquote, form, ul, ol, dl': {
mar: '20px 0',
},
'li, dd, blockquote': {
marl: '40px',
},
table: {
'border-collapse': 'collapse',
'border-spacing': 0,
},
};

renderer.put('', css);
};
31 changes: 31 additions & 0 deletions addon/reset/Tantek.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
':link,:visited': {
td: 'none',
},
'ul,ol': {
'list-style': 'none',
},
'h1,h2,h3,h4,h5,h6,pre,code,p': {
fz: '1em',
},
'ul,ol,dl,li,dt,dd,h1,h2,h3,h4,h5,h6,pre,form,body,html,p,blockquote,fieldset,input': {
pad: 0,
mar: 0,
},
'a img,:link img,:visited img': {
bd: 'none',
},
address: {
fs: 'normal',
},
};

renderer.put('', css);
};
75 changes: 75 additions & 0 deletions addon/reset/Tripoli.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'*': {
td: 'none',
fz: '1em',
out: 'none',
pad: 0,
mar: 0,
},
'code,kbd,samp,pre,tt,var,textarea,input,select,isindex,listing,xmp,plaintext': {
'white-space': 'normal',
fz: '1em',
font: 'inherit',
},
'dfn,i,cite,var,address,em': {
fs: 'normal',
},
'th,b,strong,h1,h2,h3,h4,h5,h6': {
fw: 'normal',
},
'a,img,a img,iframe,form,fieldset,abbr,acronym,object,applet,table': {
bd: 'none',
},
table: {
'border-collapse': 'collapse',
'border-spacing': 0,
},
'caption,th,td,center': {
'vertical-align': 'top',
ta: 'left',
},
body: {
bg: 'white',
lh: 1,
col: 'black',
},
q: {
quotes: '"" ""',
},
'ul,ol,dir,menu': {
'list-style': 'none',
},
'sub,sup': {
'vertical-align': 'baseline',
},
a: {
col: 'inherit',
},
hr: {
d: 'none',
},
font: {
col: 'inherit !important',
font: 'inherit !important',
},
marquee: {
ov: 'inherit !important',
'-moz-binding': 'none',
},
blink: {
td: 'none',
},
nobr: {
'white-space': 'normal',
},
};

renderer.put('', css);
};
23 changes: 23 additions & 0 deletions addon/reset/Universal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

exports.addon = function (renderer) {
if (process.env.NODE_ENV !== 'production') {
require('../__dev__/warnOnMissingDependencies')('reset', renderer, ['put']);
}

var css = {
'*': {
'vertical-align': 'baseline',
fw: 'inherit',
ff: 'inherit',
fs: 'inherit',
fz: '100%',
bd: '0 none',
out: 0,
pad: 0,
mar: 0,
},
};

renderer.put('', css);
};
Loading

0 comments on commit 26f86b4

Please sign in to comment.