https://github.com/liquidlight/postcss-pseudo-content-insert
plugin inserts an empty content block into your :before and :after pseudo elements if it is missing
https://github.com/liquidlight/postcss-pseudo-content-insert
Last synced: 4 months ago
JSON representation
plugin inserts an empty content block into your :before and :after pseudo elements if it is missing
- Host: GitHub
- URL: https://github.com/liquidlight/postcss-pseudo-content-insert
- Owner: liquidlight
- License: mit
- Created: 2015-09-09T13:43:57.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2021-05-14T10:41:57.000Z (about 5 years ago)
- Last Synced: 2025-10-30T06:28:41.564Z (8 months ago)
- Language: JavaScript
- Size: 13.7 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# PostCSS Pseudo Content Insert [![Build Status][ci-img]][ci]
[PostCSS] plugin inserts an empty content block into your :before and :after pseudo elements if it is missing.
Shout-out to [omgovich] with his [postcss plugin], for inspiration and guidance.
[postcss plugin]: https://github.com/omgovich/postcss-pseudo-elements-content
[omgovich]: https://github.com/omgovich
[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/liquidlight/postcss-pseudo-content-insert.svg
[ci]: https://travis-ci.org/liquidlight/postcss-pseudo-content-insert
```css
.foo:after {
content: '';
display: block;
}
.foo:before {
display: inline-block;
}
```
```css
.foo:after {
content: '';
display: block;
}
.foo:before {
display: inline-block;
content: '';
}
```
## Usage
```js
postcss([ require('postcss-pseudo-content-insert') ])
```
See [PostCSS] docs for examples for your environment.