Amra Amra - 1 month ago 11
CSS Question

How to remove class using CSS

I need to remove classes from different elements within the

@media print
on my CSS and add those classes on the
@media screen
.

Is there anyway to remove classes from the CSS file?

Something like:

@media print{
.element{/*Remove class*/}
}
@media screen{
.element{/*Add class*/}
}


I need to remove
ui-tabs-hide
added by a jQuery function (which hides the element in a weird way, as its not
display:block
or
display:none
) class from those elements at the time of printing and putting it back when finished printing.

Answer

No. CSS can't modify the DOM, only its presentation.