[core/media-text] Use CSS variables for media width #58174
Labels
[Block] Media & Text
Affects the Media & Text Block
CSS Styling
Related to editor and front end styles, CSS-specific issues.
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Actually the media width is defined in CSS with the rule :
and it is override with inline CSS when the media width is change :
In a project I've to override
grid-template-columns: 50% 1fr;
withgrid-template-columns: 50% minmax(0, auto);
to avoid a conflict with Swiper.js but if the user change the media width, my code cannot work anymore because of the inline style.What is your proposed solution?
Why not using CSS variables to avoid inline styling ? ie :
And in the inline style we put the variable value. So everyone can use the rule they want without being override by the inline styling.
The text was updated successfully, but these errors were encountered: