Skip to content
This repository was archived by the owner on Feb 1, 2020. It is now read-only.
This repository was archived by the owner on Feb 1, 2020. It is now read-only.

Purgecss should not remove html style #69

@edwardanthony

Description

@edwardanthony

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.

  1. Install purecss library
npm install purecss --save
  1. Add component.js
export default (text = 'Hello world') => {
    const element = document.createElement('div');

    element.className = 'pure-button';
    element.innerHTML = text;

    return element;
};
  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions