Open edwardanthony opened 5 years ago
Version: 1.4.0 Platform: MacOS 10.13.6
Note: Please notice the difference between "purecss" and "purgecss" as it looks similar.
Install purecss library
npm install purecss --save
Add component.js
export default (text = 'Hello world') => { const element = document.createElement('div'); element.className = 'pure-button'; element.innerHTML = text; return element; };
Add this in index.js entry point.
import 'purecss'; import './main.scss';
import component from './component';
document.body.appendChild(component());
### Purgecss wil purge the css, including the html style. Below you could see the html style that is removed by Purgecss.
html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }
Because html style is removed, the font will look different after purging.
Happened to me too. For some reason deletes all htmltag styles, and I solved it adding the following option:
html
whitelist: ['html']
Version: 1.4.0 Platform: MacOS 10.13.6
How to reproduce
Note: Please notice the difference between "purecss" and "purgecss" as it looks similar.
Install purecss library
Add component.js
Add this in index.js entry point.
import component from './component';
document.body.appendChild(component());
html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; }