Replies: 1 comment 2 replies
-
So right now you can technically opt-out of them by importing the layers separately and just not putting them in layers: - @import "tailwindcss/preflight" layer(base);
- @import "tailwindcss/utilities" layer(utilities);
+ @import "tailwindcss/preflight";
+ @import "tailwindcss/utilities"; ...but there will be downsides because we've adjusted the specificity of a few things with the assumption that things would be in layers and wouldn't conflict with each other. With third-party CSS though you could always put those styles in a layer as well right? Even if it's a CDN thing you are doing at run-time you can do something like: <html>
<head>
<style>
@import "https://cdnjs.cloudflare.com/ajax/libs/pikaday/1.6.0/css/pikaday.min.css" layer(components);
</style>
</head>
<!-- ... --> There's some talk of supporting importing stylesheets directly into a layer when using |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The problem with CSS cascade layers is if other third-party CSS (that are supposed to be component level) does not use CSS layers, they will take precedence over CSS in any cascade layer.
One could argue that
!important
would solve this, but then one cannot use!important
to increase specificity of one utility over another, since they all already have!important
.Beta Was this translation helpful? Give feedback.
All reactions