crswll / tailwindcss-theme-swapper

A helper for getting tailwind values into css custom properties and switching them between media queries and classes. You can try it out here: https://play.tailwindcss.com/Gt21fePNvv
320 stars 15 forks source link

Using dot in the property name #57

Closed kazlauskis closed 5 months ago

kazlauskis commented 5 months ago

Thanks for the plugin. Any chance we can enable dots in the property names, like this:

{
  theme: {
      margin: {
          4.5: '18px',
        }
  }
}

This currently renders margin: var(--margin-4.5) where the variable is empty. I can set up a repo to reproduce this, but if you copy it over to the config, it will be present in the current plugin's playground.

crswll commented 5 months ago

Ah, thanks! Shocked that hasn't come up sooner. Will get up a fix to address this along with other sepcials characters.

crswll commented 5 months ago

Fixed in #58! Thanks!

kazlauskis commented 5 months ago

Thanks! ⭐️