Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Rename element-invisible mixin to use HTML5 Boilerplate's visuallyhidden name
Comments
Comment #1
echoz CreditAttribution: echoz commentedShall we keep parity with D8 core's hypenated class name, "visually-hidden"?
Reference: Change records for Simplified names of "element-x" helper classes
Comment #2
JohnAlbinI was thinking along these lines:
Comment #3
JohnAlbinMoving to new branch.
Comment #4
echoz CreditAttribution: echoz commentedCurious for the use case of these as mixins. With no arguments, these static property/value pairs lend themselves to using the silent placeholder selectors, and specifically not mixins.
Comment #5
JohnAlbinThe use-case is media queries.
If you want to make something invisible only inside a media query, you can't extend a placeholder selector that is outside that media query. You have to use a mixin.
Comment #6
echoz CreditAttribution: echoz commentedah, thanks!
Comment #7
mparker17For whatever it's worth, +1 to this. :)
Tagging with similar tags to the original core issue ( #1363112: Simplify names of "element-x" helper classes ).
I'd be happy to write a patch if you wish.
Comment #8
mgiffordI'm not sure if it's worth doing this in D7. On the plus side, it's consistent with D8 & where we are going with HTML5. On the minus side, this is a D7 theme and you're just going to be duplicating CSS classes.
In anycase, this isn't an urgent issue either way.
Comment #9
JohnAlbinExcept that we are removing the system CSS file that contains the original ruleset for element-invisible. And Zen's ruleset uses this selector:
.visually-hidden, .element-invisible
so that the rest of core still works even though its not using the class name we'd prefer.Comment #10
mgiffordGreat that it's fixed. You'll be able to use your preferred class names in D8.