Code Monkey home page Code Monkey logo

Comments (2)

muffinresearch avatar muffinresearch commented on August 30, 2024 1

@aminalhazwani We can look at introducing CSS vars but since we're using a pre-processor for other things and that's not likely to go away soon I don't yet see we have much of a use-case for css vars. Especially since they're defined at run time and need to be considered differently compared to working with vars in a pre-processor that are defined up front and baked into the file.

I don't really see the modification thing being a problem if we know these are supposed to be used unmodified. We can make sure they are used that way. A CSS var could get re-defined too.

IMHO giving consumers more options for how to consume the vars could also help with adoption rather than going the route of only exposing them in one format which could limit it.

from design-tokens.

aminalhazwani avatar aminalhazwani commented on August 30, 2024

hey @muffinresearch would be an option for you to use the CSS vars instead? We are trying to avoid colors alteration through SASS functions and I noticed that you actually define a new var for the :hover and :active state rather than using the darker function as CSS value. So your approach could also work with the CSS vars, for example:

:root {
  --primary-button-background: var(--blue-50);
  --primary-button-background-hover: var(--blue-60);
  --primary-button-background-active: var(--blue-70);
}

What do you think?

from design-tokens.

Related Issues (19)

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.