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

Color Utilities: Foundation #9608

Closed
IamManchanda opened this issue Jan 5, 2017 · 14 comments
Closed

Color Utilities: Foundation #9608

IamManchanda opened this issue Jan 5, 2017 · 14 comments
Labels

Comments

@IamManchanda
Copy link
Contributor

Similar to Buttons => http://foundation.zurb.com/sites/docs/button.html
I think there should be text and background based color utilities ( helper classes ) in foundation

For text something like

.text.white
.text.dark
.text.primary
.text.secondary
.text.success
.text.alert
.text.warning

and for backgrounds something like

.background.primary
.background.secondary
.background.success
.background.alert
.background.warning

As, i dont think there is any humongous need for .background.white & .background.dark so haven't included in my above code

@IamManchanda
Copy link
Contributor Author

But there are callouts too http://foundation.zurb.com/sites/docs/callout.html
so a bit confused about background ones

@Deckluhm
Copy link
Contributor

Deckluhm commented Jan 5, 2017

Even if I perfectly understand why these helper classes could be convenient, I feel like it encourages bad CSS practices.

This is the kind of things you should define at component level, as it is done for buttons for example: http://foundation.zurb.com/sites/docs/button.html#coloring

Because font and background colors are linked (you don't want black text on black background for example), it doesn't feel right to have to do this:

<div class="background-black text-white">White text in a black div</div>

That said, I know there are use-cases where text colors helpers are the right way to go so I don't know...

I'd love to hear what others think about that.

@IamManchanda
Copy link
Contributor Author

IamManchanda commented Jan 5, 2017

I like your thought for backgrounds to be defining at component level .... i have to say that
Same like buttons and callouts

but for text colors , i am a little bit confused!

@ncoden
Copy link
Contributor

ncoden commented Jan 5, 2017

We cannot add "color helpers" just to let the user changing the color where ze wants to because color itself is not semantical. It complexify the HTML markup and, like @Deckluhm said, it lead to bad practices.

The only proper way to define styles is with CSS directly. HTML markup should only contain abstract component and behavior helpers.

@IamManchanda
Copy link
Contributor Author

Ohk no issue @ncoden ..... Closing this

@DaSchTour
Copy link
Contributor

That's why I added the get-color() function ;) so you can use colors from the palette programmatically in SCSS.

@IamManchanda
Copy link
Contributor Author

IamManchanda commented Jan 14, 2017

@DaSchTour if thats the case,
can you do this assignment ( #9646 ) for me ?

{{ Because i think you are the right person for it }}

@DaSchTour
Copy link
Contributor

DaSchTour commented Jan 16, 2017

@IamManchanda I would suggest to create some kind of plugin that fits to foundation for this. Any ideas for a cool name?

@ncoden
Copy link
Contributor

ncoden commented Jan 16, 2017

@DaSchTour Rainbow.

@IamManchanda
Copy link
Contributor Author

@IamManchanda I would suggest to create some kind of plugin that fits to foundation for this. Any ideas for a cool name?

@DaSchTour Are you talking about which component/utility here ?
Color utilities or social buttons ( #9646 ) ?

@DaSchTour
Copy link
Contributor

@IamManchanda oh yes. Total confusion about which thread I was on.

@IamManchanda
Copy link
Contributor Author

Hmmnnn so which comp/utility you were talking about ?

@colin-marshall
Copy link
Contributor

@IamManchanda what's the status of this? Thanks.

@DanielRuf
Copy link
Contributor

Closing as we did not receive further feedback. Feel free to reopen if you want to pick that up (and open a draft PR then).

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

6 participants