-
Notifications
You must be signed in to change notification settings - Fork 4k
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
how to add WHITE to SUI.COLORS #775
Comments
OK thanks. I guess we'll just extend SUI.COLORS with a wrapper |
or redefine a color we don't use in the variables |
@Maxhodges if you have a valid use case for adding |
We created a dark theme in Semantic-UI for our web app, so of course, we need white and light greys for text on dark backgrounds. It hasn't been a problem because we just override some variables in the theme, but in the case of dropdown the default theme relies on These are the classes on dropdown from I didn't expect SUI to have done it that way, so I thought it was something you guys had done! Brown is the new white works well enough for me! BTW I love the search field in the docu TOC. Hope @jlukic implements that in the official docs! |
I thought more about this, shouldn't you guys be including @primarycolor and @secondaryColor? Then one could easily add white and black to the color scheme https://github.com/Semantic-Org/Semantic-UI/search?utf8=%E2%9C%93&q=primaryColor&type=Code |
Due to my own interest in supporting styling, and the overwhelming community interest, it is definitely on my radar to add some kind of support that makes sense in the React paradigm. This will be a long way off though. |
Another way to look at this is, if we included any LESS variables, we'd also have to include the entire gulp powered Semantic-UI theming build system. Otherwise, there is no way to translate those variables into CSS. |
hum, but you have an enum of colors for teal, pink, blue and green, etc. So I'm just suggesting to add primaryColor and secondaryColor to that enum. SUI already has these variables defined for brand colors but you've not exposing them for us, right? see my link. the @primarycolor already exists in SUI |
Those colors are html classNames. All props are nothing more than a translation to classNames and markup: <Button color='green' /> Renders: <button class="ui green button"></button> The links you provided are links to LESS stylesheets. There is no styling involved in this repo. I realize you might be asking, "How do I create a primary/secondary button?". If so: <Button primary />
<Button secondary /> See the docs here: http://react.semantic-ui.com/elements/button#emphasis |
Ok I see. I was thinking if primaryColor was exposed in the SUI.COLORS enum then we could use it to create custom ui header colors too, for example. But yeah I guess a bit more thought should go into it. until then I can only redefine existing colors if I want to introduce a white and black. I created a new dark theme and redefined the header default color to be white so it will appear on black. But now I also need but at least I have this workaround
just thought it would be nice if SUI.COLOR included a few extras like @brandColor1, @brandColor2, etc. I guess that's up to @jlukic ? |
The If you'd like to add your own styles on top of SUI, I'd suggest just using your-custom-override-theme.css .ui.header.white {
/* rules */
} Then, in your app: <Header className='white' /> This will render this HTML: <div class="ui header white"></div> That way, you are extending the base theme with your own classes and associated styles. It also prevents you from having the confusing |
I'm having trouble understanding where SUI.COLORS is defined. I need to add WHITE to it. Can someone point me in the right direction?
The text was updated successfully, but these errors were encountered: