Hacker News new | past | comments | ask | show | jobs | submit login
The Queen’s stylesheets (spiffingcss.com)
164 points by marcolz on April 14, 2013 | hide | past | favorite | 72 comments



While the linguist in me is appalled by the author's joking (hopefully!) prescriptivist notion that British English is equivalent to such a thing as "correct English" (the American in me is also perturbed by such a claim), I'd like to point out that the home page's phrase "amount of features" is considered by such prescriptivists to be incorrect English. :) They would insist on "number of features" :P


A brief note to the Author of the Page in question

"...one must check whether one has PHP 5.2 (or newer) installed upon their Internet server..."

Should this not be 'one's Internet server'?

"Something our primitive stateside friends can understand"

What is this 'stateside' you speak of, Sir? Our Colonial Cousins may also resent the adjective that has been applied.

I personally rather regret the automatic recitation of Arne's ditty when visiting the page.


Prescriptivists would say it should be "one [..] upon his", but the author may wish to avoid using gender specific pronouns and is thus using the singular "their" instead.


I accept both points. I was reflecting on usage I have seen in late Victorian/Edwardian sources. That seemed to fit with the style of the text (although not the visual presentation of the page).

PS: 'Spiffing' is later and the Jeeves references in the HTML markup point to 1920s. Biggles. Biplanes.


> I personally rather regret the automatic recitation of Arne's ditty when visiting the page.

Possibly the first time I have appreciated auto-play music on a site, made me laugh. And now it's put me into a baroque mood which is always a good thing.


The auto-play might have worked with a more appropriate visual presentation...

http://www.victorian-novels.co.uk/?page=shop/flypage&pro...


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).


> !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()).


The sound. Oh my goodness, the sound. Why is there not a button to stop it?

I was listening to some music in the background with multiple tabs open, and I didn't expect a project link from HN to autoplay music. Confusion ensues.


<iframe src="http://www.youtube.com/embed/yHNfvJc99YY?fs=1&autoplay=1... style="width: 400px; height: 400px; position: absolute; left: -999em; top: -999em; visibility: hidden; -webkit-user-select: none; -webkit-user-drag: none;" frameborder="0" allowfullscreen></iframe>


Love it, reminds me of "If PHP Were British" ( http://www.addedbytes.com/blog/if-php-were-british/ )

Wouldn't mind a few more substitutions in the language, but it seems like most of the work went into making a really nice landing page. Great job there! (Autoplay music forgivable on a joke at least)


It's amusing, although I'm lost with their proposal of "transparency" over "opacity", since they are opposites and, as far as I know, used on both sides of the Atlantic. Also obtaining the transparency would require applying the transformation x -> 1-x to the opacity.

I feel I'm missing something with this example.


As a Brit I concur with you good sir. We use both words (transparency and opacity) this side of the Atlantic.

And as you say, "transparency: 0.2;" would equal "opacity: 0.8;"


Ok, this is only tangentially related, but does anyone know why it's "background-repeat: no-repeat" instead of "none"? Or why it's "text-wrap: none" but "white-space: nowrap" or "white-space: pre-wrap"?


It's because you're able to define all the background styling in one line:

background: #000 url(pic.png) no-repeat;

So having background-repeat: none; would conflict with background/background-image: none;


People seem to be taking this a tad seriously. It's a joke, right? (S)he's not actually expecting anyone to change all their css to use some random PHP script just so they can have British spelling and backwards transparency/opacity semantics.


Of course it's a joke. As a joke it's about as funny as "all Americans are fat and uneducated" (i.e. not funny if it's not directed at you and offensive if it is).


As an Englishman I must say that it really does bother me when people attempt to write or talk in the manner they imagine an English gentleman might. It always feels quite stilted, particularly in the not-quite-correct usage of unnecessarily antiquated vocabulary.


Some English gentlemen speak with what is quite stilted and not-quite-correct usage of unnecessarily antiquated vocabulary though ...

Oh well, toodle-pip.


I am going to put this into our development workflow. It totally made my day. Thank you so much! I admit that background music is highly relevant. However, using 'photograph' => 'image', is not good. I suggest 'picture' => 'image', since it covers both illustrations and photographs.


I guess we also need ones for other languages

    透明度: 0.5;
    色: 紫;
which does bring up the point, are we being at all culturally insensitive by making nearly all web standards English?

Or how about UsingCamelCase? Give than some languages don't have the concept of UPPER/lower case.

Does Go require you to use "er" for interfaces as in Writer, Reader, Serializer? That seems even worse given that it not just roman letters only it's English only. I don't know other languages but I suspect the suffix 'er' has no meaning in Spanish, Italian, French, and that being forced to added it to classes written using those languages would really suck.

    type Escribirer interface  // !?!?


The thing about English use is, well, at least it is consistent. Everything uses American English, so if you need to learn to program, there is only one language to learn. Allowing other languages wouldn't solve much since English would still be present in all the API methods and so on, so I think consistency is better.


> Everything uses American English...

Isn't that kind of disingenuous? Everything may use the American English character set and dialect, but they're called programming languages for a reason. I don't consider my work to be in English, I consider it Objective-C or Java. In this way, they have their own subdialects anyway.


"Everything uses American English"? Yeah, no. There's plenty of technical stuff on the web that uses British English.


There's very little code on the internet that uses British English. I'm Australian, and even when I write software that will only be used by other Australians, I still use American English so I don't have to think about it.

Spelling in documentation is much less important.


Do you have any examples to share? All the languages I've used have been american english, which is a sensible decision.


Schools here [Belgium] teach their pupils British English. Rightfully so, I'd say.


Sure. European schools teach European English. I'm not complaining about that, I speak British English.


Go does not require "er", and in fact most code I've seen outside the standard library doesn't seem to follow any particular convention for using it. If there /was/ such a convention, it would obviously make sense to use the closest equivalent suffix in the language.


Also known as international English. This point can't be stressed enough.


What about US (International) English? :P


Don't miss the comments in the HTML.


Hilarious indeed.


As a Briton I find these kinds of things as offensive as I suppose Americans must find international stereotypes of their country, people and education.


Your example is incorrect

"transparency: 1" != "opacity: 1"

We use transparency in the US. Transparency is how much light passes through an object and Opacity is how much it blocks.

so:

"transparency: 1" == "opacity: 0"


Funny enough, the example is ambiguous since:

"transparency: 0.5" == "opacity: 0.5"


Yeah, when I caught that, I thought that it might just be semantic trolling! (a terrible variant)


ooohh, devious!


If you ask what the difference is between ‘transparent’ and ‘opaque’, most people will answer correctly. If you append –y, people somehow get confused.


This isn't complete until the shorthand box notation is changed from top, right, bottom, left to top, left, bottom, right.


I may be mistaken, but I don't think British clocks run backwards...


Smashing! Next order of business: i18n whereby .com becomes .co.us and .co.uk becomes .com?


That would be not politically correct. Instead .com-s have to be redirected to co.uk and co.us respective to their geography, and in 3 years course, .com TLD has to be abandoned in favour of equality rights. Long live the Queen.


This is not something that ought to require substitution. It is not beyond the realms of technical possibility to make the parsers accept both "color" and "colour" as correct. Similarly for other common substitution pairs.


This would be awesome if I could use LESS and not open myself to a possible LFI.


It should change all the vendor prefixes too:

   border-radius-for-all
   border-radius-for-Webkit
   border-radius-for-Opera
   border-radius-for-Firefox
And maybe @summons instead of @import.


If any Rubists want to play with it, I wrote a gem for it: https://github.com/muan/spiffing :)


Autoplay music had me cracking up. How can you people actually criticize it of all things for what is so clearly a joke?


I am quite sure I'm not the only one that read the text with a brit accent in my mind.


No, I think a lot of us Brits do that too


By "British accent" you probably mean Received Pronunciation or Queen's English... but there is more to Britain than the South East (we have the North, Scotland and Wales, plus plenty of regional accents).


Music starts playing automatically, quickly closed window.


auto playing music on the web is a bit 90s no?


Indeed, it puzzles me why people still enable it in their browsers.


It’s implemented not using the old-fashioned tags, but by embedding an invisible Youtube video.


Ew autoplay music. What is this, Geocities?


The bowler tilts upon rollover. Nice touch.


it turns on and off the music too!


It links to the same page, so the music stop and start again....


Does transparency: 0.1; -> opacity: 0.9;

Because it should.


Autoplay music? Are you kidding me?


No, one is having a jape with you.


TURN OFF THE MUSIC DAMNIT




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: