r49959 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49958‎ | r49959 | r49960 >
Date:14:52, 27 April 2009
Author:demon
Status:reverted (Comments)
Tags:
Comment:
(bug 18069) Fixed some CSS validation issues with colors
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)
  • /trunk/phase3/skins/monobook/main.css (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/monobook/main.css
@@ -1428,7 +1428,7 @@
14291429 }
14301430
14311431 div#searchTarget ul li:before {
1432 - color: orange;
 1432+ color: #ffa500;
14331433 content: "\00BB \0020";
14341434 }
14351435
Index: trunk/phase3/skins/common/shared.css
@@ -159,7 +159,7 @@
160160 }
161161
162162 div.searchresults {
163 - border:1px solid darkblue;
 163+ border:1px solid #00008b;
164164 padding-top: 10px;
165165 padding-bottom: 10px;
166166 padding-left: 20px;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1477,7 +1477,7 @@
14781478 * to ensure that client-side caches don't keep obsolete copies of global
14791479 * styles.
14801480 */
1481 -$wgStyleVersion = '214';
 1481+$wgStyleVersion = '215';
14821482
14831483
14841484 # Server-side caching:
Index: trunk/phase3/RELEASE-NOTES
@@ -376,6 +376,7 @@
377377 languages while the the text is typed as URLs.
378378 * (bug 18535) Search tab tool-tops are corrupted
379379 * (bug 17614) Prev / Next links not need on ImagePage file history if less than limit
 380+* (bug 18069) Fixed some CSS validation issues with colors
380381
381382 == API changes in 1.15 ==
382383 * (bug 16858) Revamped list=deletedrevs to make listing deleted contributions

Follow-up revisions

RevisionCommit summaryAuthorDate
r50160Revert r49959 (Fixed some CSS validation issues with colors)demon21:36, 3 May 2009

Comments

#Comment by Simetrical (talk | contribs)   10:54, 1 May 2009

My comment from bug 18069 (forgot about this new code review doohickey):

Reopening, recommend revert. darkblue and orange are both valid CSS3 colors:

http://www.w3.org/TR/css3-color/#svg-color

They've been interoperably implemented since forever in all browsers, and "orange" and "darkblue" are much more comprehensible than their hex-color equivalents. Broken validators that disagree with the specs should be ignored.

Reply by bug reporter:

I used the official W3C CSS Validator, see this result:

http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fen.wikipedia.org&profile=css3&usermedium=all&warning=1&lang=en

Reply by me:

The official CSS validator doesn't recognize pretty much any CSS3. That doesn't mean we should refuse to use CSS3 when it's stable and interoperably implemented. In this case, the CSS3 has the notable benefit of being easier to read: it's especially impossible for anyone to figure out that "#FFA500" means "orange" without checking it out (#00008B is admittedly more comprehensible). Shutting up validators that are demonstrably *wrong* is not a legitimate reason to do anything, especially if it has negative effects.


#Comment by 😂 (talk | contribs)   14:23, 1 May 2009

Disagree. While they may be valid, they cause the validators to throw (albeit stupid) errors. We're not trying to increase legibility here as CSS is not meant to be read by end users.

#Comment by Simetrical (talk | contribs)   14:43, 3 May 2009

It's meant to be read by developers. Like us. I have no idea what #FFA500 is. We shouldn't need to add a comment when the code can be self-documenting.

And moreover, we shouldn't pander to stupid validators just to shut them up ― validators are only a useful tool to help you spot errors, and should be treated as such. We should be standards-compliant for interoperability, but there's absolutely no reason we should be validator-compliant when the validator is wrong. Users who complain that we don't validate should be educated as to the actual purpose of validators, which is not "obey every stupid thing they say and then you don't have to think about standards".

#Comment by Simetrical (talk | contribs)   17:17, 3 May 2009

Danny_B points out that orange is even a valid color in CSS2.1. I have no idea what the validator is smoking.

#Comment by Simetrical (talk | contribs)   20:36, 3 May 2009

Also, to address two points Danny brought up in #mediawiki: first of all, both color: orange and color: darkblue are supported at least back to IE4. I'd suspect they were supported in the very first CSS1 implementations ― they were well-defined colors in Netscape (for <font>) before CSS even existed, and I think IE/Netscape just supported the whole old Netscape color list for CSS from the get-go.

Second of all, I'm against the use of weird color names like "bisque" or "moccasin". Those are less comprehensible than hex codes. But "orange" and "darkblue" are significantly more readable than their hex equivalents.

#Comment by 😂 (talk | contribs)   21:36, 3 May 2009

Reverted in r50160.

Status & tagging log