https://github.com/zgreen/postcss-autoextend
Hashed placeholders to automatically extend styles
https://github.com/zgreen/postcss-autoextend
Last synced: 21 days ago
JSON representation
Hashed placeholders to automatically extend styles
- Host: GitHub
- URL: https://github.com/zgreen/postcss-autoextend
- Owner: zgreen
- Created: 2015-09-21T01:56:36.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-08T05:43:45.000Z (over 10 years ago)
- Last Synced: 2025-09-20T04:55:05.423Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
Awesome Lists containing this project
README
# PostCSS Autoextend
Use `@autoextend` to automatically extend styles.
```css
/* Input example */
.first-test {
@autoextend {
float: left;
width: 50%;
margin-right: 20px;
}
}
.first-test-again {
@autoextend {
float: left;
width: 50%;
margin-right: 20px;
}
}
.second-test {
@autoextend {
color: red;
font-size: 1em;
}
}
.second-test-again {
@autoextend {
color: red;
font-size: 1em;
}
}
.mixed-test {
@autoextend {
float: left;
width: 50%;
margin-right: 20px;
}
@autoextend {
color: red;
font-size: 1em;
}
}
```
```css
/* Output example */
.second-test, .second-test-again, .mixed-test {
color: red;
font-size: 1em;
}
.first-test, .first-test-again, .mixed-test {
float: left;
margin-right: 20px;
width: 50%;
}
```