You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use a content utility with before/after variants adds the content CSS property twice #18178
The content utility adds the content property. Since the content property is required to display ::before and ::after pseudo-elements, the CSS rule content: var(--tw-content); is automatically added to the class when using before or after variants.
However, if I apply a custom content utility together with the before or after variants, the content property is added to the class twice:
I haven't checked, but I assume minification takes care of the duplication? Either way, the reason for the duplication is understandable, and it's not a big deal - I just wanted to leave a note.
Lightning CSS doesn't appear to remove the duplicate content property. There being an extra one isn't really a big deal but maybe this is a micro optimization we can make when doing our internal optimize pass.
Activity
rozsazoltan commentedon May 29, 2025
I haven't checked, but I assume minification takes care of the duplication? Either way, the reason for the duplication is understandable, and it's not a big deal - I just wanted to leave a note.
thecrypticace commentedon May 29, 2025
Lightning CSS doesn't appear to remove the duplicate
contentproperty. There being an extra one isn't really a big deal but maybe this is a micro optimization we can make when doing our internal optimize pass.Drop exact duplicate declarations from output CSS within a style rule (…
thecrypticace commentedon Aug 29, 2025
I've implemented an optimization that should clean this up. Will be in the next release. 👍