Make sizing across margins/padding/width/height the same

This commit is contained in:
Dane Everitt 2020-03-29 22:04:38 -07:00
parent 5d5a5c2afc
commit 3df134b558
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 57 additions and 156 deletions

View file

@ -43,7 +43,7 @@ export default () => {
} }
return ( return (
<div className={'my-10'}> <div className={'mt-10 mb-6'}>
<FlashMessageRender byKey={'users'} className={'mb-4'}/> <FlashMessageRender byKey={'users'} className={'mb-4'}/>
{!subusers.length ? {!subusers.length ?
<p className={'text-center text-sm text-neutral-400'}> <p className={'text-center text-sm text-neutral-400'}>

View file

@ -4,7 +4,7 @@
transition: opacity 250ms ease; transition: opacity 250ms ease;
& > .modal-container { & > .modal-container {
@apply .relative .w-full .max-w-md .m-auto .flex-col .flex; @apply .relative .w-full .max-w-1/2 .m-auto .flex-col .flex;
/*&.top { /*&.top {
margin-top: 10%; margin-top: 10%;

View file

@ -120,6 +120,52 @@ let colors = {
'green-900': 'hsl(125, 97%, 14%)', 'green-900': 'hsl(125, 97%, 14%)',
}; };
/*
|-------------------------------------------------------------------------------
| Sizes
|-------------------------------------------------------------------------------
|
| Here you can specify the sizes that should be available to all of the height,
| width, padding, and margin utilities.
|
*/
let sizes = {
'auto': 'auto',
'0': '0',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'20': '5rem',
'24': '6rem',
'28': '7rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
'96': '24rem',
'1/2': '50%',
'1/3': '33.33333%',
'2/3': '66.66667%',
'1/4': '25%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.66667%',
'5/6': '83.33333%',
'full': '100%',
'screen': '100vw',
};
module.exports = { module.exports = {
/* /*
@ -452,38 +498,7 @@ module.exports = {
| |
*/ */
width: { width: { ...sizes },
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
'96': '24rem',
'1/2': '50%',
'1/3': '33.33333%',
'2/3': '66.66667%',
'1/4': '25%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.66667%',
'5/6': '83.33333%',
'full': '100%',
'screen': '100vw',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -500,26 +515,7 @@ module.exports = {
| |
*/ */
height: { height: { ...sizes },
'auto': 'auto',
'px': '1px',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
'full': '100%',
'screen': '100vh',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -535,25 +531,7 @@ module.exports = {
| |
*/ */
minWidth: { minWidth: { ...sizes },
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'24': '6rem',
'32': '8rem',
'48': '12rem',
'64': '16rem',
'96': '24rem',
'full': '100%',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -569,11 +547,7 @@ module.exports = {
| |
*/ */
minHeight: { minHeight: { ...sizes },
'0': '0',
'full': '100%',
'screen': '100vh',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -590,19 +564,7 @@ module.exports = {
| |
*/ */
maxWidth: { maxWidth: { ...sizes },
'xxs': '10rem',
'xs': '20rem',
'sm': '30rem',
'md': '40rem',
'lg': '50rem',
'xl': '60rem',
'2xl': '70rem',
'3xl': '80rem',
'4xl': '90rem',
'5xl': '100rem',
'full': '100%',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -618,10 +580,7 @@ module.exports = {
| |
*/ */
maxHeight: { maxHeight: { ...sizes },
'full': '100%',
'screen': '100vh',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -638,23 +597,7 @@ module.exports = {
| |
*/ */
padding: { padding: { ...sizes },
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'20': '5rem',
'24': '6rem',
'32': '8rem',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -671,33 +614,7 @@ module.exports = {
| |
*/ */
margin: { margin: { ...sizes },
'n-12': '-3rem',
'n-10': '-2.5rem',
'n-8': '-2rem',
'n-6': '-1.5rem',
'n-4': '-1rem',
'n-3': '-0.75rem',
'n-2': '-0.5rem',
'n-1': '-0.25rem',
'n-px': '-1px',
'auto': 'auto',
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'20': '5rem',
'24': '6rem',
'32': '8rem',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------
@ -714,23 +631,7 @@ module.exports = {
| |
*/ */
negativeMargin: { negativeMargin: { ...sizes },
'px': '1px',
'0': '0',
'1': '0.25rem',
'2': '0.5rem',
'3': '0.75rem',
'4': '1rem',
'5': '1.25rem',
'6': '1.5rem',
'8': '2rem',
'10': '2.5rem',
'12': '3rem',
'16': '4rem',
'20': '5rem',
'24': '6rem',
'32': '8rem',
},
/* /*
|----------------------------------------------------------------------------- |-----------------------------------------------------------------------------