Giter Club home page Giter Club logo

Comments (2)

astahmer avatar astahmer commented on May 23, 2024

I see your point, but what if your semantic tokens now uses a condition (CSS selector/at-rule) ?
I don't think this optimization should be baked-in Panda as it creates inconsistent behaviour and doesn't seem future-proof (adding a condition to your semantic token means you'd have to use a different CSS var, maybe referenced somewhere outside of Panda like in a CSS file, so it would not type-safe and would not be caught)

instead, this seems like a good opportunity to make a user-land PostCSS plugin that does that
I'm wouldnt be surprised if this already exists, if not it shouldnt be too hard to make (you can ask gpt to help, it knows postcss pretty well)

from panda.

adbutterfield avatar adbutterfield commented on May 23, 2024

Not sure I follow the logic with the at-rule. Like, the variables just reference values, they can be used anywhere (in an at-rule or otherwise)?

Actually, I thourht this would be the default behavior of panda, and main benefit of referencing global tokens: semantic tokens would all reference the same value (not that they would make their own reference, to the same reference of the value).

But as you say, should be easy to handle that with a plugin. I'll see if I can figure out how to that.

from panda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.