Git Product home page Git Product logo

Comments (3)

jamiewilson avatar jamiewilson commented on June 8, 2024

Could you give me a bit more detail on the issue you here? Just want to make sure I understand the problem and how best to fix it.

from corpus.

rickghome avatar rickghome commented on June 8, 2024

First, you should know that the tool you’re building is very nice. Good job!

Because your lib is so new, I don’t want to make changes to your code, and so I add my own files to a global .scss file and import all your files.

The issue I found resulted when I wanted to use a custom background color for a button. By default, I could not change the color. I looked into the compiled .css file, and there were two definitions. One came from the form.scss file, and the other came from the button.scss as it ‘extends’ button. The button class defines a color and background (not something it should really do).

best,
rickg

On Oct 11, 2015, at 6:09 PM, Jamie Wilson [email protected] wrote:

Could you give me a bit more detail on the issue you here? Just want to make sure I understand the problem and how best to fix it.


Reply to this email directly or view it on GitHub #7 (comment).

from corpus.

jamiewilson avatar jamiewilson commented on June 8, 2024

Cool. Thanks for the nice words! And for the clarification. So the way I've been using the library, I haven't run into any problems with button colors. If I have all my corpus modules imported, like so, with a _custom.scss imported last:

@import "corpus/reset";
@import "corpus/breakpoints";
@import "corpus/animation";
@import "corpus/utilities";
@import "corpus/whitespace";
@import "corpus/grid";
@import "corpus/sidebar";
@import "corpus/sizing";
@import "corpus/colors";
@import "corpus/positioning";
@import "corpus/depth";
@import "corpus/typography";
@import "corpus/tables";
@import "corpus/images";
@import "corpus/borders";
@import "corpus/forms";
@import "corpus/buttons";
@import "corpus/syntax";

@import "corpus/custom";

Then in a my _custom.scss file, if I define something like

.btn-danger {
  background-color: red;
}

and add that to my element it works fine. Or even doing

button {
  background-color: grey;
}

works okay too. But if I were wanted to redefine the color of default <button> or .btn elements I would instead redefine the $accent color variable. I give buttons a default color of $accent because i almost always want primary buttons to be the brand accent color.

Does that make sense. Not disagreeing with your feedback, just wanted to explain my rationale.

from corpus.

Related Issues (13)

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.