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

ui: SCSS - create global color settings #662

Closed
catlabs opened this issue Sep 6, 2018 · 1 comment · Fixed by #678
Closed

ui: SCSS - create global color settings #662

catlabs opened this issue Sep 6, 2018 · 1 comment · Fixed by #678

Comments

@catlabs
Copy link
Contributor

catlabs commented Sep 6, 2018

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/NationalBankBelgium/stark/blob/master/CONTRIBUTING.md#got-a-question-or-problem

Current behavior

We should create global settings for colors that are added to primary, accent and warning so we can use those ones in different components if needed.
Here is for instance the extra button's colors:

$button-theme: (
  alert: (
    color: #d32f2f,
    contrast: $light-primary-text
  ),
  alt: (
    color: #323232,
    contrast: $light-primary-text
  ),
  neutral: (
    color: #bfbfbf,
    contrast: $light-primary-text
  ),
  success: (
    color: #4caf50,
    contrast: $light-primary-text
  )
);

Expected behavior

We should rename this SCSS map and add all the extra colors in it.

@catlabs
Copy link
Contributor Author

catlabs commented Sep 7, 2018

We also need a strategy on how to customize colors on components. Following Material, they use color="primary" on buttons for instance. I think we should keep this for consistency. From there, we have 2 options:

  • Read the color attribute and add the right classes to the component (Material way). Backward is that we might need to add extra code in our ts
  • Read the color and add the color to subcomponents (ex: dropdown inside language selector). Backward is that we use attribute selector in SCSS

catlabs added a commit to catlabs/stark that referenced this issue Sep 11, 2018
catlabs added a commit to catlabs/stark that referenced this issue Sep 11, 2018
catlabs added a commit to catlabs/stark that referenced this issue Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants