Increase [hidden]
specificity
#34903
-
Hello everyone, A few days ago I had to use a For me, having How do you feel about that idea? Should I open an issue? Cheers and take care! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Watching over the css of bootstrap, it is found that Both are important. |
Beta Was this translation helpful? Give feedback.
-
A solution could be to over-specify hidden attribute selector:
|
Beta Was this translation helpful? Give feedback.
-
I tend to think you'd better toggle That's the whole point of utilities, so playing at this level requires to use the equivalent power (another utility) to hide something. Bumping specificity is not something we'll do in our core, and making an attribute selector win over a utility class selector neither. |
Beta Was this translation helpful? Give feedback.
I tend to think you'd better toggle
.d-*-none
insted of[hidden]
to hide something. We provide[hidden]
styles in our reboot only to ensure our defaults won't show something it shouldn't— however from my point of view, using.d-md-flex
means you really want this being displayed.That's the whole point of utilities, so playing at this level requires to use the equivalent power (another utility) to hide something.
Bumping specificity is not something we'll do in our core, and making an attribute selector win over a utility class selector neither.