-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: same css property overrides on normalize css objects
- Loading branch information
Showing
3 changed files
with
86 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "stitches-normalize-css", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"author": "Paul Simon Ongpin <[email protected]>", | ||
"license": "MIT", | ||
"description": "Normalize CSS for stitches", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,91 @@ | ||
export const normalize = { | ||
':where(html)': { lineHeight: 1.15 }, | ||
':where(h1)': { | ||
fontSize: '2em', | ||
marginBlockEnd: '0.67em', | ||
marginBlockStart: '0.67em', | ||
}, | ||
':where(dl, ol, ul) :where(dl, ol, ul)': { | ||
marginBlockEnd: '0', | ||
marginBlockStart: '0', | ||
}, | ||
':where(hr)': { boxSizing: 'content-box', color: 'inherit', height: '0' }, | ||
':where(pre)': { fontFamily: 'monospace, monospace', fontSize: '1em' }, | ||
':where(abbr[title])': { | ||
textDecoration: 'underline', | ||
// textDecoration: 'underline dotted', | ||
}, | ||
':where(b, strong)': { fontWeight: 'bolder' }, | ||
':where(code, kbd, samp)': { | ||
fontFamily: 'monospace, monospace', | ||
fontSize: '1em', | ||
}, | ||
':where(small)': { fontSize: '80%' }, | ||
':where(table)': { borderColor: 'currentColor', textIndent: '0' }, | ||
':where(button, input, select)': { margin: '0' }, | ||
':where(button)': { textTransform: 'none' }, | ||
':where(button, input:is([type="button" i], [type="reset" i], [type="submit" i]))': | ||
{ | ||
export const normalize: Record<string, any>[] = [ | ||
{ | ||
':where(html)': { lineHeight: 1.15 }, | ||
':where(h1)': { | ||
fontSize: '2em', | ||
marginBlockEnd: '0.67em', | ||
marginBlockStart: '0.67em', | ||
}, | ||
':where(dl, ol, ul) :where(dl, ol, ul)': { | ||
marginBlockEnd: '0', | ||
marginBlockStart: '0', | ||
}, | ||
':where(hr)': { boxSizing: 'content-box', color: 'inherit', height: '0' }, | ||
':where(pre)': { fontFamily: 'monospace, monospace', fontSize: '1em' }, | ||
':where(abbr[title])': { | ||
textDecoration: 'underline', | ||
// textDecoration: 'underline dotted', | ||
}, | ||
':where(b, strong)': { fontWeight: 'bolder' }, | ||
':where(code, kbd, samp)': { | ||
fontFamily: 'monospace, monospace', | ||
fontSize: '1em', | ||
}, | ||
':where(small)': { fontSize: '80%' }, | ||
':where(table)': { borderColor: 'currentColor', textIndent: '0' }, | ||
':where(button, input, select)': { margin: '0' }, | ||
':where(button)': { textTransform: 'none' }, | ||
':where(button, input:is([type="button" i], [type="reset" i], [type="submit" i]))': | ||
{ | ||
WebkitAppearance: 'button', | ||
}, | ||
':where(progress)': { verticalAlign: 'baseline' }, | ||
':where(select)': { textTransform: 'none' }, | ||
':where(textarea)': { margin: '0' }, | ||
':where(input[type="search" i])': { | ||
WebkitAppearance: 'textfield', | ||
outlineOffset: '-2px', | ||
}, | ||
'::-webkit-inner-spin-button, ::-webkit-outer-spin-button': { | ||
height: 'auto', | ||
}, | ||
'::-webkit-input-placeholder': { color: 'inherit', opacity: 0.54 }, | ||
'::-webkit-search-decoration': { WebkitAppearance: 'none' }, | ||
'::-webkit-file-upload-button': { | ||
WebkitAppearance: 'button', | ||
font: 'inherit', | ||
}, | ||
':where(progress)': { verticalAlign: 'baseline' }, | ||
':where(select)': { textTransform: 'none' }, | ||
':where(textarea)': { margin: '0' }, | ||
':where(input[type="search" i])': { | ||
WebkitAppearance: 'textfield', | ||
outlineOffset: '-2px', | ||
}, | ||
'::-webkit-inner-spin-button, ::-webkit-outer-spin-button': { | ||
height: 'auto', | ||
}, | ||
'::-webkit-input-placeholder': { color: 'inherit', opacity: 0.54 }, | ||
'::-webkit-search-decoration': { WebkitAppearance: 'none' }, | ||
'::-webkit-file-upload-button': { | ||
WebkitAppearance: 'button', | ||
font: 'inherit', | ||
':where(button, input:is([type="button" i], [type="color" i], [type="reset" i], [type="submit" i]))::-moz-focus-inner': | ||
{ | ||
borderStyle: 'none', | ||
padding: '0', | ||
}, | ||
':where(button, input:is([type="button" i], [type="color" i], [type="reset" i], [type="submit" i]))::-moz-focusring': | ||
{ | ||
outline: '1px dotted ButtonText', | ||
}, | ||
':where(:-moz-ui-invalid)': { boxShadow: 'none' }, | ||
':where(dialog)': { | ||
backgroundColor: 'white', | ||
border: 'solid', | ||
color: 'black', | ||
// height: '-moz-fit-content', | ||
height: 'fit-content', | ||
left: '0', | ||
margin: 'auto', | ||
padding: '1em', | ||
position: 'absolute', | ||
right: '0', | ||
// width: '-moz-fit-content', | ||
width: 'fit-content', | ||
}, | ||
':where(dialog:not([open]))': { display: 'none' }, | ||
':where(summary)': { display: 'list-item' }, | ||
}, | ||
':where(button, input:is([type="button" i], [type="color" i], [type="reset" i], [type="submit" i]))::-moz-focus-inner': | ||
{ | ||
borderStyle: 'none', | ||
padding: '0', | ||
{ | ||
':where(abbr[title])': { | ||
textDecoration: 'underline dotted', | ||
}, | ||
':where(button, input:is([type="button" i], [type="color" i], [type="reset" i], [type="submit" i]))::-moz-focusring': | ||
{ | ||
outline: '1px dotted ButtonText', | ||
':where(dialog)': { | ||
height: '-moz-fit-content', | ||
width: '-moz-fit-content', | ||
}, | ||
':where(:-moz-ui-invalid)': { boxShadow: 'none' }, | ||
':where(dialog)': { | ||
backgroundColor: 'white', | ||
border: 'solid', | ||
color: 'black', | ||
// height: '-moz-fit-content', | ||
height: 'fit-content', | ||
left: '0', | ||
margin: 'auto', | ||
padding: '1em', | ||
position: 'absolute', | ||
right: '0', | ||
// width: '-moz-fit-content', | ||
width: 'fit-content', | ||
}, | ||
':where(dialog:not([open]))': { display: 'none' }, | ||
':where(summary)': { display: 'list-item' }, | ||
} | ||
] | ||
|
||
export const opinionated = { | ||
export const opinionated: Record<string, any>[] = [ | ||
{ | ||
':where(body)': { margin: '0' }, | ||
}, | ||
...normalize, | ||
':where(body)': { margin: '0' }, | ||
} | ||
] |