google / material-design-lite

Material Design Components in HTML/CSS/JS
https://getmdl.io
Apache License 2.0
32.27k stars 5.04k forks source link

Allow further customization of sass mixins and variables #1474

Open JacobDorman opened 9 years ago

JacobDorman commented 9 years ago

Currently mixins and variables are (re-)imported into sass partials

@import "../variables";
@import "../mixins";

https://github.com/google/material-design-lite/blob/master/src/textfield/_textfield.scss#L17

This means mixins, and variables without defaults can't be overridden:

@import "material-design-lite/src/variables";
@import "material-design-lite/src/mixins";
@import "project/variables";
@import "project/mixins";

The situations where I've run into this could be solved by using more variables and declaring all variables with !default but that still leaves the problem of not being able to re-declare mixins if needed.

@import "project/variables";
@import "material-design-lite/src/variables";
@import "material-design-lite/src/mixins";
@import "project/mixins";
clemf commented 8 years ago

Is there a reason that most of the header variables are not marked with !default? I'd like to change to height of the header but it doesn't seem possible without modifying the original _variables.scss.

Garbee commented 8 years ago

@clemf header variables seem OK to me. Can you be more specific with which variable you want to modify?

clemf commented 8 years ago

@Garbee I'm trying to change the height, mainly $layout-header-desktop-row-height, but it isn't marked default, nor are any of the other size variables for the header.

Garbee commented 8 years ago

hmm, maybe those edits didn't get merged back into the 1.0.x line. Best thing to do at this point is hack around it and wait for 1.1 where it will be defaulted.

clemf commented 8 years ago

@Garbee Thanks for the quick responses. Do you know how far away 1.1 is?

Garbee commented 8 years ago

Our milestone here is marked for Nov 29th. However, that is our aim-for date. it could slip depending on quality or major work that still needs to get done that we need in 1.1.