Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make element not affected by CSS rules

My google chrome extension needs to wrap content of certain elements on page user is browsing into custom element, say, <xelem>original content</xelem>. This change should not make any visible effect.

Is it possible to make <xelem> NOT affected by * css rules (or any other rules that might apply to it), but at the same time retain inherited styles?

like image 408
artemave Avatar asked Mar 07 '26 05:03

artemave


1 Answers

Considering you are working with css3, have a look at the :not pseudo-class.

Something like

:not(xelem) {
    /* ... */
}

should work...

like image 198
proximus Avatar answered Mar 08 '26 21:03

proximus