Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thoughtbit/postcss-simple-reset
:cyclone: PostCSS插件,全局样式的重置,以及单个元素的常用属性重置功能。
https://github.com/thoughtbit/postcss-simple-reset
postcss postcss-plugins
Last synced: 14 days ago
JSON representation
:cyclone: PostCSS插件,全局样式的重置,以及单个元素的常用属性重置功能。
- Host: GitHub
- URL: https://github.com/thoughtbit/postcss-simple-reset
- Owner: thoughtbit
- License: mit
- Created: 2017-09-14T06:13:25.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-23T04:36:59.000Z (about 7 years ago)
- Last Synced: 2024-12-02T10:57:15.172Z (26 days ago)
- Topics: postcss, postcss-plugins
- Language: CSS
- Homepage:
- Size: 55.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS Simple Reset
PostCSS plugin to help you to reset your css via at-rules.
## Syntax
### reset-global
*reset style is dependent on [normalize.css] and combined with best practice.*
`@reset global([pc|mobile])`;
### reset-nested
`@reset nested([tabel|tabel-cell|list|font|boxModel])`;```css
/* before */
.table {
@reset nested('table');
color: #fff;
}td, th {
background-color: #fff;
@reset nested('table-cell');
}ul, ol {
@reset nested('list');
}.regular-font {
@reset nested('font');
}.box {
@reset nested('boxModel');
}/* after */
.table {
border-collapse: collapse;
border-spacing: 0;
vertical-align: middle;
color: #fff;
}td, th {
background-color: #fff;
text-align: left;
font-weight: normal;
vertical-align: middle;
margin: 0;
padding: 0;
}ul, ol {
list-style: none;
margin: 0;
padding: 0;
}.regular-font {
font-family: inherit;
font-size: inherit;
font-weight: inherit;
}.box {
margin: 0;
padding: 0;
width: auto;
height: auto;
}
```## 参考
- https://github.com/baiyaaaaa/postcss-css-reset
- https://github.com/ismamz/postcss-utilities