In a project I've to override grid-template-columns: 50% 1fr; with grid-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 :
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.