-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
[message] Link color doesn't match message color #3017
Comments
Try to make use of the text element which solves your issue. See https://jsfiddle.net/wLvnfzyj/ <a href="#"><span class="ui purple text">I am a purple link</span></a> |
Otherwise, there are global site definitions how a link should be displayed. Fomantic-UI/src/definitions/globals/site.less Lines 114 to 122 in 7243642
You can adjust that using a custom theme and override those variables Fomantic-UI/src/themes/default/globals/site.variables Lines 249 to 252 in 7243642
|
I'm aware of the temporary fix with Instead, I was wondering if this should be changed (or a variant/feature added) for this directly in FUI. This feels like FUI should do this without additional elements or style adjustments needed. Other components/modules decide at least text color for inherited elements, without explicit utility classes/etc -- colored labels comes to mind. For some comparison, Bootstrap uses explicit utility classes for this as well (as I'd expect for Bootstrap though): https://getbootstrap.com/docs/4.0/components/alerts/#link-color I get backwards compatibility concerns here too, so maybe with no strong prior art in FUI for link colors this doesn't make for a helpful change. Would an extra variant perhaps be a path to proceed? I'm looking to see if this is something I can help add to FUI. I'm happy fixing these issues on my own project -- it's all straight forward work there. |
Ok, understood 🙂 To make such feature consistent, this would need to support lots of components which provide color background variants as all of those could technically contain a link: However, as some elements already support .ui.{color}.message a.link { color: #xxxxxx;} would also target a possible .ui.{color}.message a.link:not(.card):not(.label):not(.menu):not..... will blew up the selector and even using direct child selectors like .ui.{color}.message > a.link { color: #xxxxxx;} does most probably not cover all possible use cases (for example a link inside a message header) Each link would also need to support A generic Yes, the whole color usage needs an overall refactoring for consistent/generic color/inverted logic in all FUI components (targeting for 3.0) In conclusion: I somehow feel, we should not add a colored link class for each existing element into the FUI code as the However, i am curious and very interested in how it worked out for your project: How did you enhance the fui logic? What's your final selector syntax? Maybe my thoughts were unnecessary complicated. |
Thanks, that's a really helpful overview! Seems there is still plenty of complexity in even link colors 🙂
Aah yes, I knew this was a focus on 3.0 too, but I didn't connect these two together. I can see how that would affect what I'm suggesting here pretty quickly.
It's been pretty straight forward. I tend to use new, local variants (
I probably agree, it's sounding that way. I wasn't thinking of all the other elements where this could be an issue still. I think I could pretty quickly get to a solution just for message or segment, but a generic solution sounds quickly overwhelming. I appreciate the thoughts here though! If I come up with something reusable here, I'll come back to this, but maybe it's worth keeping in mind for a 3.0 or color refactor. |
Bug Report
All of the message variants use the default link colors, including positive/negative/warning/etc and all of the colored variants. I'm using 2.9.3.
Steps to reproduce
You can see this if you add a link inside a colored message:
Expected result
This does feel somewhat intentional, so maybe this isn't a strong issue. But I would expect the link colors to match the underlying text node colors more.
If I fix this for my own theme, I will likely use the text node color, darkened, for the link base color and use underline to denote the link:
I don't have strong opinions here, this might need some guidance. I'm happy to contribute this fix either way.
The text was updated successfully, but these errors were encountered: