Package Exports
- styled-reboot
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (styled-reboot) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
styled-reboot
Bootstrap 4 reboot.css for styled-components
reboot.css from Bootstrap v4 for styled-components.
Also see styled-reset from Zac Anger
&&
also see styled-normalize from LestaD.
Installation:
npm i styled-reboot
(use the -S
flag if you're on npm 4 or earlier).
Usage:
// base-styles.js
import { injectGlobal } from 'styled-components'
import reboot from 'styled-reboot'
const options = {
fontFamilyBase:
'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
fontSizeBase: '1rem',
fontWeightBase: 'normal',
lineHeightBase: 1.5,
bodyColor: '#212529',
bodyBg: '#fff',
headingsMarginBottom: '.5rem',
paragraphMarginBottom: '1rem',
dtFontWeight: 'bold',
linkColor: '#007bff',
linkDecoration: 'none',
linkHoverColor: '#0056b3',
linkHoverDecoration: 'underline',
tableCellPadding: '.75rem',
textMuted: '#868e96'
}
const rebootCss = reboot(/* options */)
const baseStyles = () => injectGlobal`
${rebootCss}
/* other styles */
`
export default baseStyles
// app.js
import baseStyles from './base-styles'
const App = () => {
baseStyles()
return (
<div>Hi!</div>
)
}
export default App
Credits
All credit goes to Bootstrap for reboot.css. Bootstrap is released under the MIT License.