Skip to content

Replace use of whitelist with allowlist and blacklist with denylist  #1868

Closed
@estevanmaito

Description

@estevanmaito

We can use better terminology and promote diversity.

Whitelists would become allowlists
Blacklists would become denylists

Right now, Tailwind makes use of the term 'whitelist' mostly in the docs and passing PurgeCSS options forward.

The first case would be relatively easy to change. The second one depends on PurgeCSS, but, we already have a layer over it, and could already start a change by:

  • adding a map to whitelist, whitelistPatterns and whitelistPatternsChildren inside Tailwind's purge options: allowlist, allowlistPatterns and allowlistPatternsChildren;
  • or, being more incisive and making the mapping inside options;

It's changing a third party package API, but it has to start somewhere. Good documentation on our side would reduce the friction (we already have it in place for Tailwind's layer) and send a message: we are doing our part.

edit: I can PR

inspired by Rails: rails/rails#33677

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