@beamwind/preflight
Advanced tools
Comparing version 1.2.1 to 2.0.0
@@ -6,2 +6,6 @@ # Change Log | ||
# [2.0.0](https://github.com/kenoxa/beamwind/compare/@beamwind/preflight@1.2.1...@beamwind/preflight@2.0.0) (2020-11-30) | ||
**Note:** Version bump only for package @beamwind/preflight | ||
## [1.2.1](https://github.com/kenoxa/beamwind/compare/@beamwind/preflight@1.2.0...@beamwind/preflight@1.2.1) (2020-11-27) | ||
@@ -8,0 +12,0 @@ |
@@ -10,9 +10,9 @@ // src/preflight.ts | ||
`ol,ul{list-style:none;margin:0;padding:0}`, | ||
`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${theme.fontFamily.sans}}`, | ||
`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${theme("fontFamily", "sans", "ui-sans-serif,system-ui,sans-serif")}}`, | ||
`body{margin:0;font-family:inherit;line-height:inherit}`, | ||
`*,::before,::after{box-sizing:border-box;border:0 solid ${theme.borderColor?.DEFAULT || "currentColor"}}`, | ||
`*,::before,::after{box-sizing:border-box;border:0 solid ${theme("borderColor", "DEFAULT", "currentColor")}}`, | ||
`hr{height:0;color:inherit;border-top-width:1px}`, | ||
`img{border-style:solid}`, | ||
`textarea{resize:vertical}`, | ||
`input::placeholder,textarea::placeholder{color:${theme.placeholderColor?.DEFAULT || "#a1a1aa"}}`, | ||
`input::placeholder,textarea::placeholder{color:${theme("placeholderColor", "DEFAULT", "#a1a1aa")}}`, | ||
`button,[role="button"]{cursor:pointer}`, | ||
@@ -36,3 +36,3 @@ `table{text-indent:0;border-color:inherit;border-collapse:collapse}`, | ||
`b,strong{font-weight:bolder}`, | ||
`pre,code,kbd,samp{font-family:${theme.fontFamily.mono};font-size:1em}`, | ||
`pre,code,kbd,samp{font-family:${theme("fontFamily", "mono", "ui-monospace,monospace")};font-size:1em}`, | ||
`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`, | ||
@@ -46,9 +46,9 @@ `sub{bottom:-0.25em}`, | ||
// src/index.ts | ||
var src_default = { | ||
var src_default = () => ({ | ||
init(insert, theme) { | ||
preflight(theme).forEach(insert); | ||
} | ||
}; | ||
}); | ||
export { | ||
src_default as default | ||
}; |
// src/preflight.ts | ||
var preflight = (theme) => { | ||
var _a, _b; | ||
return [ | ||
`:root{-moz-tab-size:4;tab-size:4}`, | ||
`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`, | ||
`button{background-color:transparent;background-image:none}`, | ||
`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button}`, | ||
`button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}`, | ||
`fieldset{margin:0;padding:0}`, | ||
`ol,ul{list-style:none;margin:0;padding:0}`, | ||
`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${theme.fontFamily.sans}}`, | ||
`body{margin:0;font-family:inherit;line-height:inherit}`, | ||
`*,::before,::after{box-sizing:border-box;border:0 solid ${((_a = theme.borderColor) == null ? void 0 : _a.DEFAULT) || "currentColor"}}`, | ||
`hr{height:0;color:inherit;border-top-width:1px}`, | ||
`img{border-style:solid}`, | ||
`textarea{resize:vertical}`, | ||
`input::placeholder,textarea::placeholder{color:${((_b = theme.placeholderColor) == null ? void 0 : _b.DEFAULT) || "#a1a1aa"}}`, | ||
`button,[role="button"]{cursor:pointer}`, | ||
`table{text-indent:0;border-color:inherit;border-collapse:collapse}`, | ||
`h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}`, | ||
`a{color:inherit;text-decoration:inherit}`, | ||
`button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;margin:0;padding:0;line-height:inherit;color:inherit}`, | ||
`button,select{text-transform:none}`, | ||
`::-moz-focus-inner{border-style:none;padding:0}`, | ||
`:-moz-focusring{outline:1px dotted ButtonText}`, | ||
`:-moz-ui-invalid{box-shadow:none}`, | ||
`legend{padding:0}`, | ||
`progress{vertical-align:baseline}`, | ||
`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`, | ||
`[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}`, | ||
`::-webkit-search-decoration{-webkit-appearance:none}`, | ||
`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`, | ||
`summary{display:list-item}`, | ||
`abbr[title]{text-decoration:underline dotted}`, | ||
`b,strong{font-weight:bolder}`, | ||
`pre,code,kbd,samp{font-family:${theme.fontFamily.mono};font-size:1em}`, | ||
`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`, | ||
`sub{bottom:-0.25em}`, | ||
`sup{top:-0.5em}`, | ||
`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`, | ||
`img,video{max-width:100%;height:auto}` | ||
]; | ||
}; | ||
var preflight = (theme) => [ | ||
`:root{-moz-tab-size:4;tab-size:4}`, | ||
`blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}`, | ||
`button{background-color:transparent;background-image:none}`, | ||
`button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button}`, | ||
`button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}`, | ||
`fieldset{margin:0;padding:0}`, | ||
`ol,ul{list-style:none;margin:0;padding:0}`, | ||
`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${theme("fontFamily", "sans", "ui-sans-serif,system-ui,sans-serif")}}`, | ||
`body{margin:0;font-family:inherit;line-height:inherit}`, | ||
`*,::before,::after{box-sizing:border-box;border:0 solid ${theme("borderColor", "DEFAULT", "currentColor")}}`, | ||
`hr{height:0;color:inherit;border-top-width:1px}`, | ||
`img{border-style:solid}`, | ||
`textarea{resize:vertical}`, | ||
`input::placeholder,textarea::placeholder{color:${theme("placeholderColor", "DEFAULT", "#a1a1aa")}}`, | ||
`button,[role="button"]{cursor:pointer}`, | ||
`table{text-indent:0;border-color:inherit;border-collapse:collapse}`, | ||
`h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}`, | ||
`a{color:inherit;text-decoration:inherit}`, | ||
`button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;margin:0;padding:0;line-height:inherit;color:inherit}`, | ||
`button,select{text-transform:none}`, | ||
`::-moz-focus-inner{border-style:none;padding:0}`, | ||
`:-moz-focusring{outline:1px dotted ButtonText}`, | ||
`:-moz-ui-invalid{box-shadow:none}`, | ||
`legend{padding:0}`, | ||
`progress{vertical-align:baseline}`, | ||
`::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}`, | ||
`[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}`, | ||
`::-webkit-search-decoration{-webkit-appearance:none}`, | ||
`::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}`, | ||
`summary{display:list-item}`, | ||
`abbr[title]{text-decoration:underline dotted}`, | ||
`b,strong{font-weight:bolder}`, | ||
`pre,code,kbd,samp{font-family:${theme("fontFamily", "mono", "ui-monospace,monospace")};font-size:1em}`, | ||
`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`, | ||
`sub{bottom:-0.25em}`, | ||
`sup{top:-0.5em}`, | ||
`img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}`, | ||
`img,video{max-width:100%;height:auto}` | ||
]; | ||
// src/index.ts | ||
var src_default = { | ||
var src_default = () => ({ | ||
init(insert, theme) { | ||
preflight(theme).forEach(insert); | ||
} | ||
}; | ||
}); | ||
export { | ||
src_default as default | ||
}; |
@@ -23,9 +23,9 @@ var __defProp = Object.defineProperty; | ||
`ol,ul{list-style:none;margin:0;padding:0}`, | ||
`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${theme.fontFamily.sans}}`, | ||
`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${theme("fontFamily", "sans", "ui-sans-serif,system-ui,sans-serif")}}`, | ||
`body{margin:0;font-family:inherit;line-height:inherit}`, | ||
`*,::before,::after{box-sizing:border-box;border:0 solid ${theme.borderColor?.DEFAULT || "currentColor"}}`, | ||
`*,::before,::after{box-sizing:border-box;border:0 solid ${theme("borderColor", "DEFAULT", "currentColor")}}`, | ||
`hr{height:0;color:inherit;border-top-width:1px}`, | ||
`img{border-style:solid}`, | ||
`textarea{resize:vertical}`, | ||
`input::placeholder,textarea::placeholder{color:${theme.placeholderColor?.DEFAULT || "#a1a1aa"}}`, | ||
`input::placeholder,textarea::placeholder{color:${theme("placeholderColor", "DEFAULT", "#a1a1aa")}}`, | ||
`button,[role="button"]{cursor:pointer}`, | ||
@@ -49,3 +49,3 @@ `table{text-indent:0;border-color:inherit;border-collapse:collapse}`, | ||
`b,strong{font-weight:bolder}`, | ||
`pre,code,kbd,samp{font-family:${theme.fontFamily.mono};font-size:1em}`, | ||
`pre,code,kbd,samp{font-family:${theme("fontFamily", "mono", "ui-monospace,monospace")};font-size:1em}`, | ||
`sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}`, | ||
@@ -59,6 +59,6 @@ `sub{bottom:-0.25em}`, | ||
// src/index.ts | ||
var src_default = { | ||
var src_default = () => ({ | ||
init(insert, theme) { | ||
preflight(theme).forEach(insert); | ||
} | ||
}; | ||
}); |
{ | ||
"name": "@beamwind/preflight", | ||
"version": "1.2.1", | ||
"version": "2.0.0", | ||
"description": "An opinionated set of base styles for modern browsers", | ||
@@ -24,3 +24,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "0fafa5221c6942ef64105457492068fc5aca213b", | ||
"gitHead": "28ce5f37dd3423d56da161c5c160f9dc0e67649c", | ||
"exports": { | ||
@@ -27,0 +27,0 @@ ".": { |
@@ -5,11 +5,17 @@ # @beamwind/preflight | ||
[![License](https://flat.badgen.net/github/license/kenoxa/beamwind)](https://github.com/kenoxa/beamwind/blob/main/LICENSE) | ||
[![Latest Release](https://flat.badgen.net/npm/v/@beamwind/preflight?label=release)](https://www.npmjs.com/package/@beamwind/preflight) | ||
[![MIT License](https://flat.badgen.net/github/license/kenoxa/beamwind)](https://github.com/kenoxa/beamwind/blob/main/LICENSE) | ||
[![Latest Release](https://flat.badgen.net/npm/v/@beamwind/preflight?icon=npm&label)](https://www.npmjs.com/package/@beamwind/preflight) | ||
[![Github](https://flat.badgen.net/badge/icon/kenoxa%2Fbeamwind?icon=github&label)](https://github.com/kenoxa/beamwind/blob/main/packages/preflight) | ||
[![Typescript](https://flat.badgen.net/badge/icon/included?icon=typescript&label)](https://unpkg.com/browse/@beamwind/preflight/types/preflight.d.ts) | ||
[![Bundle Size](https://flat.badgen.net/bundlephobia/minzip/@beamwind/preflight?icon=packagephobia&label&color=blue)](https://bundlephobia.com/result?p=@beamwind/preflight) | ||
[![Typescript](https://flat.badgen.net/badge/icon/included?icon=typescript&label)](https://unpkg.com/browse/@beamwind/preflight/dist/index.d.ts) | ||
[![Sponsor](https://flat.badgen.net/badge/sponsored%20by/Kenoxa/2980b9)](https://www.kenoxa.com) | ||
> [Read the docs](https://beamwind.js.org) | | ||
> [API](https://beamwind.js.org/packages/preflight) | | ||
> [Change Log](https://github.com/kenoxa/beamwind/blob/main/packages/preflight/CHANGELOG.md) | ||
--- | ||
Built on top of [modern-normalize](https://github.com/sindresorhus/modern-normalize), @beamwind/preflight is designed for and tested on the latest stable versions of Chrome, Firefox, Edge, and Safari. Preflight does not support any version of IE, including IE 11. | ||
If you need to support IE 11, we recommend using [@beamwind/reset](https://www.npmjs.com/package/@beamwind/reset). | ||
If you need to support IE 11, we recommend using [@beamwind/reset](https://github.com/kenoxa/beamwind/blob/main/packages/reset). | ||
@@ -23,5 +29,3 @@ <!-- prettier-ignore-start --> | ||
- [Usage](#usage) | ||
- [Support](#support) | ||
- [Contribute](#contribute) | ||
- [Sponsors](#sponsors) | ||
- [License](#license) | ||
@@ -40,2 +44,4 @@ | ||
> Please refer to the [main documentation](https://beamwind.js.org#usage) for further information. | ||
```js | ||
@@ -45,9 +51,5 @@ import { setup } from 'beamwind' | ||
setup(preflight) | ||
setup(preflight()) | ||
``` | ||
## Support | ||
This project is free and open-source, so if you think this project can help you or anyone else, you may [star it on GitHub](https://github.com/kenoxa/beamwind). Feel free to [open an issue](https://github.com/kenoxa/beamwind/issues) if you have any idea, question, or you've found a bug. | ||
## Contribute | ||
@@ -57,2 +59,4 @@ | ||
> This project is free and open-source, so if you think this project can help you or anyone else, you may [star it on GitHub](https://github.com/kenoxa/beamwind). Feel free to [open an issue](https://github.com/kenoxa/beamwind/issues) if you have any idea, question, or you've found a bug. | ||
**Working on your first Pull Request?** You can learn how from this _free_ series [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github) | ||
@@ -62,3 +66,3 @@ | ||
## Sponsors | ||
### Sponsors | ||
@@ -65,0 +69,0 @@ [![Kenoxa GmbH](https://images.opencollective.com/kenoxa/9c25796/logo/68.png)](https://www.kenoxa.com) [Kenoxa GmbH](https://www.kenoxa.com) |
@@ -1,1 +0,1 @@ | ||
var preflight=(()=>{var i=Object.defineProperty,a=e=>i(e,"__esModule",{value:!0}),l=(e,t)=>{a(e);for(var o in t)i(e,o,{get:t[o],enumerable:!0})},s={};l(s,{default:()=>r});var n=e=>{var t,o;return[":root{-moz-tab-size:4;tab-size:4}","blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}","button{background-color:transparent;background-image:none}","button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button}","button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}","fieldset{margin:0;padding:0}","ol,ul{list-style:none;margin:0;padding:0}",`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${e.fontFamily.sans}}`,"body{margin:0;font-family:inherit;line-height:inherit}",`*,::before,::after{box-sizing:border-box;border:0 solid ${((t=e.borderColor)==null?void 0:t.DEFAULT)||"currentColor"}}`,"hr{height:0;color:inherit;border-top-width:1px}","img{border-style:solid}","textarea{resize:vertical}",`input::placeholder,textarea::placeholder{color:${((o=e.placeholderColor)==null?void 0:o.DEFAULT)||"#a1a1aa"}}`,'button,[role="button"]{cursor:pointer}',"table{text-indent:0;border-color:inherit;border-collapse:collapse}","h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}","a{color:inherit;text-decoration:inherit}","button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;margin:0;padding:0;line-height:inherit;color:inherit}","button,select{text-transform:none}","::-moz-focus-inner{border-style:none;padding:0}",":-moz-focusring{outline:1px dotted ButtonText}",":-moz-ui-invalid{box-shadow:none}","legend{padding:0}","progress{vertical-align:baseline}","::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}",'[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}',"::-webkit-search-decoration{-webkit-appearance:none}","::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}","summary{display:list-item}","abbr[title]{text-decoration:underline dotted}","b,strong{font-weight:bolder}",`pre,code,kbd,samp{font-family:${e.fontFamily.mono};font-size:1em}`,"sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}","sub{bottom:-0.25em}","sup{top:-0.5em}","img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}","img,video{max-width:100%;height:auto}"]},r={init(e,t){n(t).forEach(e)}};return s;})(); | ||
var preflight=(()=>{var i=Object.defineProperty,a=e=>i(e,"__esModule",{value:!0}),l=(e,t)=>{a(e);for(var o in t)i(e,o,{get:t[o],enumerable:!0})},d={};l(d,{default:()=>r});var n=e=>[":root{-moz-tab-size:4;tab-size:4}","blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}","button{background-color:transparent;background-image:none}","button,[type='button'],[type='reset'],[type='submit']{-webkit-appearance:button}","button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}","fieldset{margin:0;padding:0}","ol,ul{list-style:none;margin:0;padding:0}",`html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:${e("fontFamily","sans","ui-sans-serif,system-ui,sans-serif")}}`,"body{margin:0;font-family:inherit;line-height:inherit}",`*,::before,::after{box-sizing:border-box;border:0 solid ${e("borderColor","DEFAULT","currentColor")}}`,"hr{height:0;color:inherit;border-top-width:1px}","img{border-style:solid}","textarea{resize:vertical}",`input::placeholder,textarea::placeholder{color:${e("placeholderColor","DEFAULT","#a1a1aa")}}`,'button,[role="button"]{cursor:pointer}',"table{text-indent:0;border-color:inherit;border-collapse:collapse}","h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}","a{color:inherit;text-decoration:inherit}","button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;margin:0;padding:0;line-height:inherit;color:inherit}","button,select{text-transform:none}","::-moz-focus-inner{border-style:none;padding:0}",":-moz-focusring{outline:1px dotted ButtonText}",":-moz-ui-invalid{box-shadow:none}","legend{padding:0}","progress{vertical-align:baseline}","::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}",'[type="search"]{-webkit-appearance:textfield;outline-offset:-2px}',"::-webkit-search-decoration{-webkit-appearance:none}","::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}","summary{display:list-item}","abbr[title]{text-decoration:underline dotted}","b,strong{font-weight:bolder}",`pre,code,kbd,samp{font-family:${e("fontFamily","mono","ui-monospace,monospace")};font-size:1em}`,"sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}","sub{bottom:-0.25em}","sup{top:-0.5em}","img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}","img,video{max-width:100%;height:auto}"],r=()=>({init(e,t){n(t).forEach(e)}});return d;})(); |
@@ -1,21 +0,7 @@ | ||
interface Theme { | ||
fontFamily: { | ||
sans: string; | ||
mono: string; | ||
}; | ||
borderColor?: { | ||
DEFAULT?: string; | ||
}; | ||
placeholderColor?: { | ||
DEFAULT?: string; | ||
}; | ||
} | ||
import { ConfigurationOptions } from '@beamwind/types'; | ||
declare type OnInitCallback = (rule: string) => void; | ||
declare const _default: { | ||
init(insert: OnInitCallback, theme: Theme): void; | ||
}; | ||
declare const _default: () => ConfigurationOptions; | ||
//# sourceMappingURL=index.d.ts.map | ||
export default _default; | ||
export { OnInitCallback, Theme }; | ||
//# sourceMappingURL=preflight.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
57388
68
173