Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
For optimum usability, it's often desirable to avoid overriding the user's choice of link colors.
Omega overrides this, setting a link color. Once that is done, as far as I know it is not possible for a subsequent stylesheet to reset the link colors to user defaults, is it?
If so, please don't set link colors in any Alpha/Omega stylesheets.
Comments
Comment #1
Cellar Door CreditAttribution: Cellar Door commentedThis is done via the omega-text.css which is optional and can be disabled via the settings in your subtheme.
Also (and I ran into this a lot at first) in your global just using a{} won't override it as you'll have to use a:link, a:visited{} to override. Either way you can still override or disable the styling all together.
Comment #2
John Pitcairn CreditAttribution: John Pitcairn commentedThanks. I'm aware I can disable inherited css in subtheme settings, and I'm using a:link etc.
My point is that for a base theme, it makes little sense to implement anything in css which cannot be overridden by subsequent css. Most rules can, but link color isn't one of those, since the color property doesn't support a value of "auto".
I notice omega-text.css also sets a:link and a:visited to the same color, which is a usability/accessibility no-no.
Comment #3
Cellar Door CreditAttribution: Cellar Door commentedIt can be overridden in the subtheme css since global and subsequent files are stacked after omega-text.css
From my understanding the core theme having styling helps to make it user friendly so there's no "blank-screen-syndrome" and give people a jump off point to begin their theming. Maybe we make this an opt-in rather than an opt-out option? Or split into subthemes that are more core and some that are a little styled more than core.
Any of the included css can be overridden though for experienced themers it can sometimes get in the way
Comment #4
John Pitcairn CreditAttribution: John Pitcairn commentedNo it can't.
While you can override omega-text.css in subsequent stylesheets, it is not possible to reset link colors to browser defaults in css. I can set links to some other color, but what I really want is for links to have no specified color, ie they will be whatever color the user has specified in their browser settings. I currently can't do this without removing omega-text.css entirely.
I certainly understand the "no-blank-screen" rationale behind base-theme css, but I don't think this should extend to things that once set cannot be unset, like link color, especially if these have an impact on accessibility - think about color-blind users who may wish to set their own very specific link colors as browser defaults.
Comment #5
mgiffordtagging.
Comment #6
marcoka CreditAttribution: marcoka commenteduh, i disagree with not setting any link colors. i always override and set a main color so i can "visaully set identification" of links.
Comment #7
John Pitcairn CreditAttribution: John Pitcairn commented@e-anima: Yes, and I often do the same thing, but that's a decision for the themer to make, or not make.
Yes. But omega-text.css has already set a link color, and there's no way to "unset" it again in css. You can't use the browser defaults if you want to. If it was possible to unset the link colors in css, this wouldn't be a problem and I wouldn't care about Omega's link color.
Comment #8
marcoka CreditAttribution: marcoka commentedah ok. then disabling the css that holds the styles did not work?
Comment #9
John Pitcairn CreditAttribution: John Pitcairn commentedSure, that will work, but you're disabling all of omega-text.css and will have to duplicate anything you do want in your own stylesheet.
Comment #10
marcoka CreditAttribution: marcoka commentedi myself did that, i hacked everything into pieces, using my own typography.css messages.css tabs.css etc. also using sass on top with a color control css.
so your suggestion is to put link colors in a single css?
Comment #11
John Pitcairn CreditAttribution: John Pitcairn commentedMy suggestion is to not set link colors at all in any base theme. Stick with browser defaults, which is well-researched best practice for accessibility. Subthemes are then free to use browser defaults or set their own link colors as required, without needing to disable any base theme css files.
Comment #12
danillonunes CreditAttribution: danillonunes commentedColors can be set in another CSS file. But I think most of Omega subthemes doesn't use the default Omega colors anyway, so I agree to remove them.
Comment #13
Cellar Door CreditAttribution: Cellar Door commentedI think the requests here are all in line with some we've seen elsewhere in the issues " Take the styling out of omega" or "I want a barebones omega". I think splitting link colors out into a separate library and css file doesn't set a good precedence as we'd then just split everything off that anyone didn't like and have a giant select list of various stylings in the interface.
Instead, I've been leaning towards taking the optional stylesheets that are enabled by default and making a "Beginner Starterkit" that has things styled OTB even more than they already are. We would then have on the original all optional stylesheets disabled. So that the html5 starterkit would be void of ANY styling and you can then add what you want rather than having to take out what you don't.
With the situation at hand, I think the best thing to is just to disable the omega-text.css in your subtheme options upon setup. Then using the omega-text.css as a template pick what you want and move it over into your own subtheme css files in order to have the styles you would like. The issue is removing this in the base theme would effect every site that hasn't set a base color, thus potentially breaking the design of thousands of sites upon update. If you want a quickly configured option that has everything *but* the link coloring, you could create a starterkit of your own with the css pre-populated and use that as a base subtheme.
I'll leave it to himerus to decide the fate but that's just my $.02
Comment #14
John Pitcairn CreditAttribution: John Pitcairn commented+1 from me, sounds like an ideal solution.
Comment #15
himerus CreditAttribution: himerus commentedThe 3.2 release of Omega will have a completely new set of CSS behind it.
It will likely still have some basic elements styled up (including links), however, just as there is right now, there will be the ability to simply turn it OFF, and use it as you see fit.
Cellar Door and I have (sorta) discussed the multiple starterkit idea, and I'm all on board with it... We should create a global issue to provide an additional starterkit or two. However, I'm marking this issue as "works as designed" because you can simply disable the CSS that is causing the links to have custom coloring out of the box.
Comment #16
dan.d CreditAttribution: dan.d commentedWell... I'm not sure if I'm late for this conversation, but if you want to preserve some, but not all formatting provided with omega-txt.css you can always copy the default omega-txt.css that comes with Omega and put it to your subtheme's /ccs folder. Then add this to the [theme].info file:
css[omega-text.css][name] = 'Custom override for Omega Text ccs'
css[omega-text.css][description] = 'Disables default omega-text.css Omega, declared in [theme].info'
css[omega-text.css][options][weight] = '10'
Then dice and slice, remove whatever styling you find disturbing :) Don't forget to clear the cache.