Skip to content

Commit

Permalink
Use fewer spacing values, better curate fractional widths per plugin
Browse files Browse the repository at this point in the history
This saves a tremendous amount of file size and none of the stuff that is cut here is important.
  • Loading branch information
adamwathan committed Oct 21, 2020
1 parent 8474177 commit edf0ba6
Showing 1 changed file with 55 additions and 33 deletions.
88 changes: 55 additions & 33 deletions stubs/defaultConfig.stub.js
Expand Up @@ -43,11 +43,8 @@ module.exports = {
8: '2rem',
9: '2.25rem',
10: '2.5rem',
11: '2.75rem',
12: '3rem',
13: '3.25rem',
14: '3.5rem',
15: '3.75rem',
16: '4rem',
20: '5rem',
24: '6rem',
Expand All @@ -64,33 +61,6 @@ module.exports = {
72: '18rem',
80: '20rem',
96: '24rem',
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.666667%',
'2/6': '33.333333%',
'3/6': '50%',
'4/6': '66.666667%',
'5/6': '83.333333%',
'1/12': '8.333333%',
'2/12': '16.666667%',
'3/12': '25%',
'4/12': '33.333333%',
'5/12': '41.666667%',
'6/12': '50%',
'7/12': '58.333333%',
'8/12': '66.666667%',
'9/12': '75%',
'10/12': '83.333333%',
'11/12': '91.666667%',
full: '100%',
},
backgroundColor: (theme) => theme('colors'),
backgroundImage: {
Expand Down Expand Up @@ -252,6 +222,20 @@ module.exports = {
auto: 'auto',
...theme('spacing'),
...negative(theme('spacing')),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
full: '100%',
'-1/2': '-50%',
'-1/3': '-33.333333%',
'-2/3': '-66.666667%',
'-1/4': '-25%',
'-2/4': '-50%',
'-3/4': '-75%',
'-full': '-100%',
}),
letterSpacing: {
tighter: '-0.05em',
Expand Down Expand Up @@ -288,8 +272,9 @@ module.exports = {
...negative(theme('spacing')),
}),
maxHeight: (theme) => ({
screen: '100vh',
...theme('spacing'),
full: '100%',
screen: '100vh',
}),
maxWidth: (theme, { breakpoints }) => ({
none: 'none',
Expand Down Expand Up @@ -381,6 +366,33 @@ module.exports = {
width: (theme) => ({
auto: 'auto',
...theme('spacing'),
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.666667%',
'2/6': '33.333333%',
'3/6': '50%',
'4/6': '66.666667%',
'5/6': '83.333333%',
'1/12': '8.333333%',
'2/12': '16.666667%',
'3/12': '25%',
'4/12': '33.333333%',
'5/12': '41.666667%',
'6/12': '50%',
'7/12': '58.333333%',
'8/12': '66.666667%',
'9/12': '75%',
'10/12': '83.333333%',
'11/12': '91.666667%',
full: '100%',
screen: '100vw',
min: 'min-content',
max: 'max-content',
Expand Down Expand Up @@ -554,10 +566,20 @@ module.exports = {
translate: (theme, { negative }) => ({
...theme('spacing'),
...negative(theme('spacing')),
'-full': '-100%',
'-1/2': '-50%',
'1/2': '50%',
'1/3': '33.333333%',
'2/3': '66.666667%',
'1/4': '25%',
'2/4': '50%',
'3/4': '75%',
full: '100%',
'-1/2': '-50%',
'-1/3': '-33.333333%',
'-2/3': '-66.666667%',
'-1/4': '-25%',
'-2/4': '-50%',
'-3/4': '-75%',
'-full': '-100%',
}),
skew: {
'-12': '-12deg',
Expand Down

0 comments on commit edf0ba6

Please sign in to comment.