Closed yuheiy closed 6 months ago
When I include the !important declaration in a property value, it gets removed during the processing. Below is the CSS where this issue occurs:
!important
section { background: light-dark(white, black) !important; }
will be processed to:
@media (prefers-color-scheme:dark) { :where(html:not(.is-light)) section { background: black } } :where(html.is-dark) section { background: black } @media (prefers-color-scheme:light) { :where(html:not(.is-dark)) section { background: white } } :where(html.is-light) section { background: white }
I believe the !important declaration should be preserved after transformation to ensure the intended styles remain prioritized.
Sure. Can you send PR? I am busy on another project right now.
OK. I will give it a try when I have some free time.
When I include the
!important
declaration in a property value, it gets removed during the processing. Below is the CSS where this issue occurs:will be processed to:
I believe the
!important
declaration should be preserved after transformation to ensure the intended styles remain prioritized.