المشاريع
عرض على GitHub
zautumnz/styled-reset
حول
Eric Meyer's Reset CSS for styled-components
تطوير الويب والتطبيقاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلstyled-reset
Eric Meyer's Reset CSS for styled-components
Also see styled-normalize from Sergey Sova.
Installation:
npm i styled-reset
Usage:
Styled Components 4+
import * as React from 'react'
import { Reset } from 'styled-reset'
const App = () => (
<React.Fragment>
<Reset />
<div>Hi, I'm an app!</div>
</React.Fragment>
)
You can also use the default export or named export (lowercase) in your own global style:
import * as React from 'react'
import { createGlobalStyle } from 'styled-components'
import reset from 'styled-reset'
const GlobalStyle = createGlobalStyle`
${reset}
/* other styles */
`
const App = () => (
<React.Fragment>
<GlobalStyle />
<div>Hi, I'm an app!</div>
</React.Fragment>
)
export default App
Styled Components 3.x
If you're using Styled Components version 3.x or 2.x, you'll need to use the
injectGlobal api instead (and install [email protected]):
import { injectGlobal } from 'styled-components'
import reset from 'styled-reset'
injectGlobal`
${reset}
`
reset is also available as a named export:
import { reset } from 'styled-reset'
Credits
All credit goes to Eric Meyer for reset.css. reset.css is public domain (unlicensed).
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…