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

Add a way to limit which stylesheets are processed #6139

Merged
merged 2 commits into from
Dec 7, 2018

Conversation

joyously
Copy link
Contributor

@joyously joyously commented Dec 6, 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 styles. Only those with a data-prefix attribute are processed.

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
Copy link
Owner

LeaVerou commented Dec 7, 2018

Hello, thanks for contributing!
I'd name limit something like optIn, since this is what it does: it makes prefix-free opt in, whereas limit could be anything.
Apart from that, I'm fine merging this, however keep the following in mind: Given that the need for -prefix-free is greatly diminishing (I've stopped using it in any of my projects), I'm thinking of extracting StyleFix into a separate project (since there are many more use cases for that still, e.g. polyfills etc) and use it in -prefix-free as a dependency. Possibly with a different name, since I'm not sure about "StyleFix". This was kinda the plan from the very beginning, which is why it has a separate name, but it makes even more sense now. This means that any attributes relating to prefixes in StyleFix will need to be renamed to something more general, and then possibly aliased in -prefix-free for backwards compat.

@joyously
Copy link
Contributor Author

joyously commented Dec 7, 2018

I think there is still a need for prefixfree where the older browsers have to be supported.
In my case, I am using it for CSS Custom Properties and conical gradients.

@LeaVerou LeaVerou merged commit 4dc4fd8 into LeaVerou:gh-pages Dec 7, 2018
@LeaVerou
Copy link
Owner

LeaVerou commented Dec 7, 2018

Thanks, PR merged!

If you're using it for conic gradients and CSS variables, you're not using -prefix-free, you're using StyleFix.

@joyously
Copy link
Contributor Author

joyously commented Dec 7, 2018

But I'm also not using any prefixes in my stylesheets and that applies to user stylesheets also. :)

@joyously joyously deleted the patch-2 branch December 7, 2018 17:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants