Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

respect current color palette #16

Closed
digitalkaoz opened this issue Apr 26, 2016 · 8 comments
Closed

respect current color palette #16

digitalkaoz opened this issue Apr 26, 2016 · 8 comments

Comments

@digitalkaoz
Copy link

currently the library doenst respect the choosen color palette (uses the default). it would be great if this library can respect that. this extra library can handle it https://github.com/puranjayjain/md-date-time-picker maybe you can get some inspiration from their solution

@mebibou
Copy link
Owner

mebibou commented Apr 27, 2016

yeah I know it's been reported before in #13, but the solution of md-date-time-picker is not a good one imo because he's copying the files from mdl into his library, so he will need to manually update after every release...
Would setting a $mdl-path in the scss file for you to override it may work? you would only need to do:

$mdl-path: './bower_components/mdl';
@import './bower_components/mdl-selectfield/src/selectfield/selectfield.scss';

@digitalkaoz
Copy link
Author

mh ive seen you have some hard dependeny on bower, im using npm only here...

what whould a $mdl-path change?

@mebibou
Copy link
Owner

mebibou commented Apr 27, 2016

by setting it before calling the scss file you could set your own path for the mdl library.

@digitalkaoz
Copy link
Author

mh yes this might work, so the hard dependency on bower would be removed?

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

@mebibou
Copy link
Owner

mebibou commented Apr 27, 2016

yes this would be transformed to:

$mdl-path: '../../bower_components/material-design-lite' !default;
@import "$mdl-path/src/variables",
  "$mdl-path/src/mixins";

I haven't tested it but this should work

@digitalkaoz
Copy link
Author

but im already doing it this way:

import 'material-design-lite/dist/material.light_green-green.min.css'
import 'material-design-lite/material';
import 'mdl-selectfield/src/selectfield/selectfield';
import 'mdl-selectfield/src/selectfield/selectfield.scss';

i modified your scss:

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

but its still blue and not green

@digitalkaoz
Copy link
Author

i guess its a problem of mixing dist css and src scss...anyway, the $mdl-path would be a good change anyway!

@mebibou
Copy link
Owner

mebibou commented Apr 27, 2016

I am missing a lot of info on what you are doing, but shouldn't you add color classes to the select field instead? I though you changed some scss variables that were not picked up

@mebibou mebibou closed this as completed Jun 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants