Code Monkey home page Code Monkey logo

Comments (9)

MoOx avatar MoOx commented on July 3, 2024

Why not.
But what about handling !important when parsing custom prop ? I'm not sure we are currently supporting it.

from postcss-custom-properties.

necolas avatar necolas commented on July 3, 2024

How is !important parsing related?

from postcss-custom-properties.

MoOx avatar MoOx commented on July 3, 2024

It was just an idea to make user able to get javascript defined as a fallback OR more important.

variables: {
 "--test-one": "js-one !important",
 "--test-two": "js-two !important",
 "--test-three": "js-three"
 }
:root {
 --test-one: local;
 --test-two: local !important;
}

div {
 color: var(--test-one);
 color: var(--test-two);
 color: var(--test-three);
}

Could give

div {
 color: js-one;
 color: local;
 color: js-three;
}

Take a look to this example using firefox http://jsbin.com/qefano/1/edit You should inderstand what I mean.

from postcss-custom-properties.

MoOx avatar MoOx commented on July 3, 2024

This one is even better http://jsbin.com/qefano/2/edit

from postcss-custom-properties.

necolas avatar necolas commented on July 3, 2024

If that is spec-ed behaviour, then we should definitely add support for it to the lib. But I think JS-defined is a different issue and should act as if you're appending :root declarations to the end of the CSS document. That way you could also override CSS-defined !important values :)

from postcss-custom-properties.

MoOx avatar MoOx commented on July 3, 2024

FYI I've opened a new issue for the !important thing #12

from postcss-custom-properties.

necolas avatar necolas commented on July 3, 2024

Would it be ok to be collab on these repos you ported? I'm moving our stuff over to postcss.

from postcss-custom-properties.

MoOx avatar MoOx commented on July 3, 2024

Added as owner for postcss ;)

from postcss-custom-properties.

necolas avatar necolas commented on July 3, 2024

Thanks Maxime :)

from postcss-custom-properties.

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.