I plan to move theme pelican-elegant from bootstrap to postcss. Unfortunately a lot of styles used in the theme are dependent on the specific version of the bootstrap I used.
I intend to use this project to extract relevant CSS rules and use it in my theme.
For example,
- I want to figure what CSS rules are in use to display top navigation menu as it is
- Remove all the code from
<body>
of index.html but leave top navigation menu code - Run
npm run uncss -- index > menu.css
.
It will place all the rules used in index.html in menu.css file. Ass we have removed everything but the menu from the index.html, menu.css will only contain the rules that are used for navigation menu.
npm run server
to view website in browsernpm run uncss -- <filename>
to run uncss on a file