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

Add new on-primary and on-secondary variables to mdc-theme #2481

Closed
lynnmercier opened this issue Mar 28, 2018 · 3 comments
Closed

Add new on-primary and on-secondary variables to mdc-theme #2481

lynnmercier opened this issue Mar 28, 2018 · 3 comments
Labels

Comments

@lynnmercier
Copy link
Contributor

mdc-theme-on-primary is global variable clients can set to a hex value before importing any MD Web components. Various MD Web components will look to mdc-theme-on-primary for color, e.g. button, and top app bar.

This will replace the "text-TEXT STYLE-on-primary". Only the "primary" text style was actually used in any MD Web components, and always had 100% opacity.

We will demonstrate this mdc-theme-on-primary with a new "shrine" custom theme on the theme catalog page. Shrine has a pink color for primary, and a dark brown for on-primary
image

image

@englishextra
Copy link

englishextra commented Mar 31, 2018

@lynnjepsen I'm afraid this will perplex/complicate the whole procedure of tweaking MDC framework to your custom values.

For instance - if I set primary color to somewhat of a blue color - then - yes - I would have links of the same blue color which I dont need in some cases. So - I have to write my own overirdeds to MDC which is supposed to be. Dont they? Now. you offer to make it even more complex,

To sum up - this will complicate and not ease the whole dev work based on MDC.

@kfranqueiro
Copy link
Contributor

@englishextra to clarify, on-primary refers to a color separate from primary, which will default to either black or white (whichever one offers better contrast when text of that color appears on top of the primary color). This is very similar to how e.g. text-primary-on-primary works right now.

At the same time, currently we have many text-...-on-... values, many of which ended up not being very useful, so we're aiming to simplify that, while still providing the same type of behavior, and additionally offering the possibility of directly customizing text colors to something other than black or white.

If you're still concerned that this will complicate matters, could you illustrate in a gist or codepen the type of use case you're concerned about?

@englishextra
Copy link

@kfranqueiro Oh it's clear now. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants