Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Need a better way to select which stylesheets to process #6137

Open
joyously opened this issue Aug 16, 2018 · 1 comment
Open

Need a better way to select which stylesheets to process #6137

joyously opened this issue Aug 16, 2018 · 1 comment

Comments

@joyously
Copy link
Contributor

I'm looking for a way to reverse the default of handling all stylesheets except those with data-no-prefix.
I would like to be able to ignore all except the ones I mark, without changing too much.
This is because I'm using this in an environment where I control only a small part of the total CSS loaded.

@LeaVerou
Copy link
Owner

There is currently no such way, but I wouldn't oppose a PR for it.
I agree that since the need for prefixfree has diminished since it was first written in 2012, this would be a useful addition.

I'd suggest an HTML attribute like "data-prefixfree-opt-in" that can be placed wherever and makes -prefix-free opt-in instead of opt-out. Then, data-prefix on stylesheets to process them.

joyously added a commit to joyously/prefixfree that referenced this issue Dec 6, 2018
Implements LeaVerou#6137.
Adds limit property which is boolean and reflects the existence of a data-prefix attribute on the script tag.
If it is there, it affects the <link> styles. Only those with a data-prefix attribute are processed.
LeaVerou pushed a commit that referenced this issue Dec 7, 2018
Implements #6137.
Adds limit property which is boolean and reflects the existence of a data-prefix attribute on the script tag.
If it is there, it affects the <link> styles. Only those with a data-prefix attribute are processed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants