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

Change the way how component color is defined and set #22

Closed
Dzoukr opened this issue Apr 9, 2020 · 5 comments
Closed

Change the way how component color is defined and set #22

Dzoukr opened this issue Apr 9, 2020 · 5 comments
Labels

Comments

@Dzoukr
Copy link
Owner

Dzoukr commented Apr 9, 2020

As agreed in #20, we should rethink how to work with colors.
One way would be having button.color color.isDanger, or just have long list of possible colors and using it directly color.isDanger (which I like more right now). Should discuss further.

@Dzoukr Dzoukr added the version2 label Apr 9, 2020
@Dzoukr Dzoukr mentioned this issue Apr 9, 2020
5 tasks
@Dzoukr
Copy link
Owner Author

Dzoukr commented Apr 14, 2020

Ok, let's focus on this now.

I think the approach for this should be:

  • get rid of component color modifiers like 'button.isDanger'
  • have just 'color.isDanger' everywhere

Then we would have unified way how to work with colors + less code in modifiers file

@MangelMaxime
Copy link
Contributor

@Dzoukr

I am not sure which API you are choosing but if it is button.color.isDanger and not button.color color.isDanger.

Then you should first try to design and extend button.color.isDanger API on a some portion or in Fable REPL. Personnally I didn't found a way to do it.

@Dzoukr
Copy link
Owner Author

Dzoukr commented Apr 15, 2020

I was thinking just about

Bulma.button.a [
    color.isDanger
]

I am aware of that it could theoretically lead to setting colors for components which don't support it, but we cannot prevent it anyway (you can still mixup various helpers - they are just classes) and API would be way cleaner.

@MangelMaxime
Copy link
Contributor

MangelMaxime commented Apr 15, 2020

I didn't think about this solution.

It's the same way of thinking as for text modifiers for example 👍

@Dzoukr
Copy link
Owner Author

Dzoukr commented Apr 19, 2020

I think we have this finished as well.

@Dzoukr Dzoukr closed this as completed Apr 19, 2020
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

2 participants