Git Product home page Git Product logo

Comments (3)

zmoazeni avatar zmoazeni commented on August 11, 2024

I haven't considered that use case. Thanks for the feedback. I'll chew on it a bit.

Sent from my iPhone

On Apr 17, 2013, at 5:24 PM, ericpromislow [email protected] wrote:

I personally disagree with csscss's implied suggestion that I refactor
something like

h1 {
padding: 2px 0px;
margin: 2px 0px;
background: url(../img/h1.png) no-repeat right top;
}

h2 {
padding: 2px 0px;
margin: 2px 0px;
background: url(../img/h2.png) no-repeat right top;
}
to

h1, h2 {
padding: 2px 0px;
margin: 2px 0px;
background-repeat: no-repeat;
background-position: right top;
}

h1 {
background-image: url(../img/h1.png)
}

h2 {
background-image: url(../img/h2.png)
}
As stylesheets get more complex, it becomes harder to determine
all the styles for a given selector. I would rather keep all the properties for
each selector together, and use a preprocessor like Less or SCSS/Sass to
eliminate the duplication via variables. However, csscss is silent with input
like this:

h1 {
padding: 2px 0px;
margin: 2px 0px;
background: url(../img/h1.png) no-repeat right top;
}

h1 {
padding: 6px 0px;
margin: 2px 0px;
background: url(../img/h1.png) no-repeat right top;
}
I'd like to know that I have some redundant declarations for the same
selector, as well as a conflicting declaration.

Are there plans for csscss to handle both these cases, or am I looking
for a different kind of tool?


Reply to this email directly or view it on GitHub.

from csscss.

zmoazeni avatar zmoazeni commented on August 11, 2024

@ericpromislow I haven't made a decision on duplicate/overridden rules within the same selector yet, though I do like the idea.

But I did want to give you a heads up that I just implemented a new flag --ignore-sass-mixins that will be released in v1.3.0. You might dig it.

from csscss.

zmoazeni avatar zmoazeni commented on August 11, 2024

I'm going to close this now that --ignore-sass-mixins has been released.

from csscss.

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.