Hacker News new | ask | show | jobs
by itafroma 4822 days ago
Not very many substitutions performed[1]:

    'colour'       => 'color',
    'grey'         => 'gray',
    '!please'      => '!important',
    'transparency' => 'opacity',
    'centre'       => 'center',
    'plump'        => 'bold',
    'photograph'   => 'image',
    'capitalise'   => 'capitalize'
Would've thought there'd be a ton of opportunities to pedantically correct CSS's choice of words. !please instead of !important made me laugh, though.

[1]: Taken from https://github.com/idiot/Spiffing/blob/master/spiffing.php (aside, please don't use this project as a good example of PHP code style).

3 comments

> !please instead of !important made me laugh

Reminded me of INTERCAL:

INTERCAL has [..] modifiers such as "PLEASE". This last keyword provides two reasons for the program's rejection by the compiler: if "PLEASE" does not appear often enough, the program is considered insufficiently polite, and the error message says this; if too often, the program could be rejected as excessively polite.

Some are incorrect. Transparency and opacity are opposites.
They are in the sense that 100% transparency = 0% opacity. But in the end, aren't they both giving the same effect in CSS?

In Illustrator, for example, the interface has an opacity setting but the help file refers to it as setting the transparency since that is essentially what you're doing when you lower the opacity. (Personally, I prefer the word transparency, it just seems clearer to me.)

"I prefer the word transparency, it just seems..."

I cannot decide to up vote or down vote your comment based solely upon this statement. Therefore, take my lack of voting as a positive affirmation that I have no strong feelings one way or the other.

Yes, but the processor doesn't flip the values.

  transparency: 0;
!=

  opacity: 0;
Har har.
Looks like an issue and pull request were filed for that:

https://github.com/idiot/Spiffing/issues/1

https://github.com/idiot/Spiffing/pull/7

Indeed. They also forgot 'quite' => 'text-transform' ;)
Whose fault is it is British folks aren't the majority in W3C or even none of the British companies manufacture browser who implement the CSS specs. Hence, words are spelled like they are in America.
It has nothing to do with how the W3C is stacked. Us Australians and Brits use American spelling ('color', etc) when programming for consistency. We would rather our APIs are spelled incorrectly (setColor()) than inconsistently (sometimes setColor() and sometimes setColour()).