stylify / packages

💎 Monorepository for Stylify packages. Stylify uses CSS-like selectors to generate Extremely optimized utility-first CSS dynamically based on what you write 💎.
https://stylifycss.com
MIT License
424 stars 9 forks source link

Macro matching fails in some cases #221

Closed MilesPernicious closed 1 year ago

MilesPernicious commented 1 year ago

Describe the bug

Machy8: No, it collides with "x" and "y" property that is used on svgs. But it is matched before your macro and therefore your macro is not matched. The order of matching is incorrect.

Reproduction

            'padding-y:(\\S+?)': ({ macroMatch, selectorProperties }) => {
                selectorProperties.add('padding-top', macroMatch.getCapture(0));
                selectorProperties.add('padding-bottom', macroMatch.getCapture(0));
            },

class="padding-y:2rem"

/* stylify.css */
.y\:2rem{
    y: 2rem
}

Logs

No response

System Info

@stylify/astro 0.5.28
Machy8 commented 1 year ago

@MilesPernicious This should be fixed in 0.5.33.