Giter Club home page Giter Club logo

Comments (8)

MoOx avatar MoOx commented on June 13, 2024

I think we can't handle that since this might be considered as valid css syntax like this

:root {
  --base-link-color : #21201E, --base-link-color-hover : #ff3333 ;
}

Not sure how postcss can detect the fact that there is 2 : in the decl. Any idea @ai ?

from postcss-custom-properties.

ai avatar ai commented on June 13, 2024

It will be parsed as --base-link-color with #21201E, --base-link-color-hover : #ff3333 value.

from postcss-custom-properties.

MoOx avatar MoOx commented on June 13, 2024

@ai Maybe it should throw an error ? Or is it valid CSS ?

from postcss-custom-properties.

ai avatar ai commented on June 13, 2024

@MoOx I think PostCSS is not a CSS lint tool. But if this error will useful for some reason, we can add check, when I finish new parser.

from postcss-custom-properties.

magsout avatar magsout commented on June 13, 2024

@ai

@MoOx I think PostCSS is not a CSS lint tool. But if this error will useful for some reason, we can add check, when I finish new parser.

You're right, but if I write :

:root {
  --base-link-color : #21201E, 
  --base-link-color-hover : #ff3333 ;
}

.className {
  color: var(--base-link-color);
}

output.css :

.className {
  color: #21201E, 
  --base-link-color-hover : #ff3333;
}

No error ok, but wrong css.. It's that why maybe we need an error or warning ?

from postcss-custom-properties.

MoOx avatar MoOx commented on June 13, 2024

There too many example where we can output invalid css :/
That being said, we can totally use postcss to make a linter. Don't you think ?

from postcss-custom-properties.

MoOx avatar MoOx commented on June 13, 2024

DON'T YOU THINK @magsout ? :)

from postcss-custom-properties.

magsout avatar magsout commented on June 13, 2024

👍

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.