Git Product home page Git Product logo

Comments (5)

mlarcher avatar mlarcher commented on August 25, 2024

Thanks for raising the point, but why would you want to do so ?
Considering _variables.scss holds all the project global variables, I don't see where a previous value would come from, or why we would want to give it priority.
It seems to me it would fit better in a component than on the default declaration.
Can you explain the reasoning behind your assertion ?

from docssa.

KittyGiraudel avatar KittyGiraudel commented on August 25, 2024

Because someone could decide to override those variables.

from docssa.

mlarcher avatar mlarcher commented on August 25, 2024

...and nothing would stop them, as long as they do so in a file loaded after _variables.scss, which is supposed to always be the case in DoCSSa.

Afaik, !default is only useful if there is a previous definition you don't wan't to override, not to allow further overrides of a definition (which is the case by default, except if you use !default on them).
So I am missing the point you're trying to make here. Would you care to explain ?

from docssa.

KittyGiraudel avatar KittyGiraudel commented on August 25, 2024

Adding !default flag to all variables allows one to do something like this:

@import "conf";
@import "vendors/docssa";

Where _conf.scss would contain variables for the entire project, including configuration variables from DoCSSa that would need to be overwritten.

Configuration should always come first in a project in my opinion; even before vendors.

Also, I don't see any reason not to add this flag.

from docssa.

mlarcher avatar mlarcher commented on August 25, 2024

DoCSSa is a CSS architecture, not a components library à la Bootstrap.
You can bend it as you like, so it's up to you if you want to add !default to its configuration variables when you use it, but something like "vendors/docssa" does not really make sense.
I'm closing this issue, maybe we'll reopen it if we reorganize how the theming are handled.

from docssa.

Related Issues (12)

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.