Could we consider targetting specific elements for resetting borders instead of using a *
selector?
#13891
KonnorRogers
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there! I'm a maintainer of a web component library and we've had a couple users run into an issue where the Tailwind preflight border reset was causing our borders to get overriden.
The TLDR is that
:host
has less specificity than*
.So something like:
Gets overriden by TailwindCSS preflight with no great way to resolve it, other than manually recreating the border rules, or by using
revert-layer
which has atrocious browser support.I don't know the full context for resetting every border, but I was curious if it'd be possible for the preflight.css to only target problematic elements with borders, as opposed to every element with a
*
selectorTotally fine if this ends up being a "wontfix" situation, but figured it was at least worth a discussion :)
Codepen of the problem:
https://codepen.io/paramagicdev/pen/MWdXbYN?editors=1000
I'm really not sure. I wish there was a good way to target only built-in HTML Elements :/
Anyways, thanks for your time and help!
Beta Was this translation helpful? Give feedback.
All reactions