Bot releases are visible (Hide)
No files found from the passed PurgeCSS option 'content'.
warning when files/globs are passed to content
by @AdrianGonz97 in https://github.com/FullHuman/purgecss/pull/1188
:is
or :where
in their names are no longer unintentionally purged by @AdrianGonz97 in https://github.com/FullHuman/purgecss/pull/1187
build(deps-dev): update dependencies
build(deps): update dependencies
Update hugo.md by @davidsneighbour in https://github.com/FullHuman/purgecss/pull/1013
Minor adjustment to documentation for clarity by @dvelguru in https://github.com/FullHuman/purgecss/pull/997
Fix wrong import name in https://github.com/FullHuman/purgecss/pull/1015
Point to new extractor package names by @danieldiekmeier in https://github.com/FullHuman/purgecss/pull/1024
Clarify node package installation for Hugo guide by @anakinsleftleg in https://github.com/FullHuman/purgecss/pull/1000
Add alignwide and alignfull classes from GB by @nextgenthemes in https://github.com/FullHuman/purgecss/pull/1072
Create SECURITY.md by @Ffloriel in https://github.com/FullHuman/purgecss/pull/1103
bugfix: Only throw No files found from the passed PurgeCSS option 'content'.
warning when files/globs are passed to content
by @AdrianGonz97 in https://github.com/FullHuman/purgecss/pull/1188
bugfix: Classes that contain :is
or :where
in their names are no longer unintentionally purged by @AdrianGonz97 in https://github.com/FullHuman/purgecss/pull/1187
Fix [class*=foo] with HTML extractor by @Gaelan in https://github.com/FullHuman/purgecss/pull/1133
Update Hugo docs by @schnerring in https://github.com/FullHuman/purgecss/pull/1216
fixed collect used variables for the changed selector by @vsn4ik in https://github.com/FullHuman/purgecss/pull/1217
fix typo by @kempster in https://github.com/FullHuman/purgecss/pull/1232
Full Changelog: https://github.com/FullHuman/purgecss/compare/v5.0.0...v6.0.0
Published by Ffloriel about 2 years ago
Full Changelog: https://github.com/FullHuman/purgecss/compare/v4.1.3...v5.0.0
Published by Ffloriel almost 3 years ago
Full Changelog: https://github.com/FullHuman/purgecss/compare/v4.0.3...v4.1.0
Published by Ffloriel over 3 years ago
Drop PostCSS 7 support, use @fullhuman/postcss-purgecss 3.0 with PostCSS 7.
Published by Ffloriel almost 4 years ago
Published by Ffloriel about 4 years ago
Whitelist started as a simple option named whitelist
but grew up with the different use-cases and needs that appear with time. Another option called whitelistPatterns
appeared, then whitelistPatternsChildren
, …
It is now more complex and complicated, and somewhat difficult to remember how to use it with different options.
To summarize the changes, the whitelist options are now grouped in one option called safelist. And the most used options can be defined in one array.
Two forms are available. The simple form is:
safelist: ['invisibleClass', /^nav-/]
In this form, safelist is an array that can take a string or a regex.
The complex form is:
safelist: {
standard: ['invisibleClass', /^nav-/],
deep: [],
greedy: [],
keyframes: [],
variables: []
}
In this form, safelist is an object taking optional properties:
standard is the same as the simple form and replaces whitelist
and whitelistPatterns
deep replaces whitelistPatternsChildren
greedy is a new option coming from https://github.com/FullHuman/purgecss/pull/424
keyframes can be used to add keyframes to the safelist, when using keyframes: true (https://github.com/FullHuman/purgecss/issues/418)
variables can be used to add CSS variables to the safelist, when using variables: true
Blocklist will block the CSS selectors from appearing in the final output CSS. The selectors will be removed even when they are seen as used by PurgeCSS.
blocklist: ['usedClass', /^nav-/]
Even if nav-links
and usedClass
are found in your content files (HTML, Javascript), they will be removed.
PurgeCSS is using commander.js for its CLI. The recent version of commander.js introduced the possibility of making an option variadic. This means when specifying multiple option arguments, the parsed option value will be an array.
A few options are now taking advantage of this new feature: content, css, and the newly introduced option safelist and blocklist. It is no longer necessary to separate the list items with a comma.
Published by Ffloriel over 4 years ago
Changes:
import PurgeCSS from "purgecss";
const purgecssResults = await new PurgeCSS().purge({
// options
});
content => content.match(/[\w-/:]+(?<!:)/g) || []
variables
option to remove unused CSS variablesPublished by Ffloriel almost 5 years ago
Published by Ffloriel almost 5 years ago
Published by Ffloriel about 5 years ago
Published by Ffloriel over 5 years ago
Published by Ffloriel over 5 years ago
Published by Ffloriel about 6 years ago
Published by Ffloriel over 6 years ago
purgecss start ignore
and purgecss end ignore
) https://github.com/FullHuman/purgecss/issues/66
Published by Ffloriel over 6 years ago
whitelistPatternsChildren
https://github.com/FullHuman/purgecss/pull/58, https://github.com/FullHuman/purgecss/issues/39
Published by Ffloriel over 6 years ago
Published by Ffloriel over 6 years ago
fontFace
to remove unused font-face declarationPublished by Ffloriel almost 7 years ago
Published by Ffloriel almost 7 years ago
package.json
: importing only necessary files.Published by Ffloriel almost 7 years ago
keyframes
option removing unused animationskeyframes
to false by default to avoid the issue with bootstrap https://github.com/FullHuman/purgecss/issues/33