This is a minor thing but the css coding standards demands that colors must be set in UPPERCASE which is then the only place where we use UPPERCASE at all in the css. its a little pain but its a pain & theres simply no reason to keep this badpractive, when its standard to write the colors in lowercase
Theres no technical reason to keep it in upper or lower case its actually perfectly valid to even combine these to
color: #ffffff;
color: #FfFfFf;
color: white;
the new css3 rbg(...),rbga(...), hsl(...), hsla(...) is not supported by ie8 - so lets not go there.
Its a minor thing, but theres no reason to keep a dumb thing to do, we all now the prober way to write css, even that we all know that UPPERCASE is awesome ;)
change the [#302199]
.awesomesauce {
color: #efefef;
}
Comment | File | Size | Author |
---|---|---|---|
#44 | core-hex_colors_lower_case-1360790-44.patch | 12.64 KB | KrisBulman |
#40 | core-hex_colors_lower_case-1360790-40.patch | 12.64 KB | KrisBulman |
#37 | core-hex_colors_lower_case-1360790-37.patch | 13.74 KB | KrisBulman |
#30 | core-hex_colors_lower_case-1360790-29.patch | 20.59 KB | KrisBulman |
#19 | hex_colors_lower_case_19.patch | 11.54 KB | beltofte |
Comments
Comment #1
JacineI also prefer lowercase, personally. I find it a lot easier to distinguish letters from numbers.
Comment #2
dcmouyard CreditAttribution: dcmouyard commented+1 for lowercase hex colors
Comment #2.0
mortendk CreditAttribution: mortendk commentedUpdated issue summary.
Comment #3
sun+1 for lowercase, too.
- Lowercase is easier to read for humans. EVERY TEXT IN UPPERCASE TAKES ADDITIONAL BRAINPOWER TO READ.
- The only app that ever produced uppercase hex colors is PhotoShop. Sometimes I make sure to convert them before saving, sometimes not.
In the end, I don't really care. It should be a recommendation, not a rule.
Comment #4
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedExcept that color module is case sensitive when parsing your stylesheet and replacing/shifting colors.
+1 for for lowercase
Comment #5
jvsoutoI also prefer lowercase
Comment #6
cweagansResetting status. I have always used uppercase, but I'm not particularly attached to either standard. Doesn't make much difference to me as long as we're consistent in all CSS files in core.
Comment #7
sunLooks like we have an agreement here. Slightly improving the issue title, and adding the more common coding standards tag.
Does that mean there are code changes required for this coding standards change?
Comment #8
JurriaanRoelofs CreditAttribution: JurriaanRoelofs commentedno it means that it will guarantee color module(s) will always work because it's always lowercase :)
Comment #9
sunLet's call this RTBC then.
Comment #10
Dries CreditAttribution: Dries commentedI agree with lower-case. There is no patch though. Want me to virtually commit this? :)
Comment #11
aspilicious CreditAttribution: aspilicious commentedWe need to change http://drupal.org/node/302199 but I dan't edit it. Stupid permissions...
Comment #12
JacineHaha, thanks @Dries :)
I can't edit the page either. @sun do you have permission?
Comment #13
sunUpdated accordingly: http://drupal.org/node/302199
Comment #14
JacineThanks!
Comment #15
mortendk CreditAttribution: mortendk commentedawesome thanks :)
... now better go patch go go lowercase
Comment #16
beltofteWas a bit faster than the King ;-)
Comment #17
stBorchertHere is a patch that changes all uppercase color codes to lowercase.
While looking through the files I noticed that the rule "Multiple properties should be listed in alphabetical order." does not apply to all css-files in core. Do we want to fix this, too?
---
edit: ups, beltofte was faster
Comment #18
beltofteLooks like the patch in #17 is better than mine. I missed some colors in comment_hacks.css.optimized.css.
Another issue I discovered is that both bartik and seven some places are not using shorthand hex codes. It would make sense to fix this too.
Comment #19
beltofteUpdated my patch with the missing colors in comment_hacks.css.optimized.css + fixing two hex codes in Seven to use shorthand style.
Comment #20
JacineHey guys... I'm sorry, but can we wait on this? It would cause some other patches in progress to need to be re-rolled and that would really suck. The plan was not to provide a patch here (that's why it was marked fixed after the docs change was done), but to outline the standard.
Comment #21
beltofteNo problem :-) We can fix it later.
Comment #22
JacineYay, thanks so much for understanding! :D
Comment #23
cweagansJust talked with Jacine in IRC. I'm hesitant to just postpone this, lest it fall through the cracks and we never come back to it. So let's postpone this with the stipulation that it will be reopened on Jan 15. That will give the other patches time to land so we don't create conflicts.
Comment #24
cweagansWhoops.
Comment #25
cweagansReopening per #23.
Comment #26
aspilicious CreditAttribution: aspilicious commented#19: hex_colors_lower_case_19.patch queued for re-testing.
Comment #27
KrisBulman CreditAttribution: KrisBulman commented#19: hex_colors_lower_case_19.patch queued for re-testing.
Comment #29
KrisBulman CreditAttribution: KrisBulman commentedclearly this standard hasn't been enforced on new commits, I will do a quick clean-up here
Comment #30
KrisBulman CreditAttribution: KrisBulman commentedre-rolled, caught a lot more stuff since many new commits have been made.
Comment #32
KrisBulman CreditAttribution: KrisBulman commentedhmm, I'm having trouble getting the testing module running in my local setup.. until I can get this working, I won't be able to find out the issue.
Comment #33
cweagansLooks like the only one that's failing is a color module test. ColorTestCase->_testColor(), to be exact, and the problem stems from the changes made to bartik.
Here's an example of the problem. Do not shorten hex color codes from 6 digits to 3 digits, even if it's technically allowed. The ONLY thing that we're doing with this patch is making the letters lowercase.
Comment #34
JacineThanks Kris :)
I don't think we should touch jQuery UI's code either, since that is an external library. Anyone else have thoughts on that?
Comment #35
cweagansOh yeah, good catch. No changes to jquery javascript or css files please. :)
Comment #36
KrisBulman CreditAttribution: KrisBulman commentedoops! sorry about that, will re-roll
Comment #37
KrisBulman CreditAttribution: KrisBulman commentedexcluded the jquery ui css, should have caught that first time around.
Comment #38
KrisBulman CreditAttribution: KrisBulman commentedsorry, ignore this patch :\ forgot to remove the shortened hex codes.. thought this was ok, since it was mentioned being done in #19
Comment #39
KrisBulman CreditAttribution: KrisBulman commentedComment #40
KrisBulman CreditAttribution: KrisBulman commentedok, no shorthand changes, no external lib changes
Comment #41
cweagansGo testbot, go!
Comment #42
cweagansCode looks good, tests pass, RTBC.
Comment #43
markabur CreditAttribution: markabur commentedWhoops, changed a color here:
Comment #44
KrisBulman CreditAttribution: KrisBulman commentedgood thing you guys are here to keep me in line
Comment #45
markabur CreditAttribution: markabur commentedLooks good.
Comment #46
KrisBulman CreditAttribution: KrisBulman commentedThis patch will go out of date really quickly considering the amount of different core modules affected.
Comment #47
xjmA number of the major bugs are RTBC or to be backported, so hopefully we should below thresholds soon. (Unfortunately the fact that this patch is so prone to needing a reroll is the same reason we might need to wait to commit it until we're back below issue thresholds.) Thanks for staying on top of it!
Comment #48
webchickActually, now that we have a dedicated committer for these kinds of patches, I think they're fine to go in even when we're over thresholds. Just eyeball the RTBC queue first to make sure it's not likely to conflict with anything else in there.
Assigning to Jennifer to take a look at.
Comment #49
xjmEr. This isn't a docs patch? I mean, not that it makes any difference really.
Comment #50
webchickhttp://buytaert.net/jennifer-hodgdon
"Her responsibility will be solely around documentation and code style patches" :)
Comment #51
xjmOK. :)
Comment #52
KrisBulman CreditAttribution: KrisBulman commented#44: core-hex_colors_lower_case-1360790-44.patch queued for re-testing.
Comment #53
jhodgdonThe patch looks fine to me too. I'll look at the RTBC queue and assuming nothing else seems to conflict, get it in hopefully today.
Comment #54
jhodgdonThere are currently at least 5 issues in the RTBC queue that include CSS files that are also in this patch. They *might* not conflict, but I didn't feel like trying them all... So I guess I'll just wait on this one.
Comment #55
KrisBulman CreditAttribution: KrisBulman commentedk, I'll watch for updates in case a quick re-roll is needed.
Comment #56
jhodgdonWe're under thresholds, so I committed this.
Comment #57.0
(not verified) CreditAttribution: commentedUpdated issue summary.