[TYPO3-dev] CSS Coding GuidLines

Christopher Torgalson bedlamhotel at gmail.com
Mon Jun 2 09:33:58 CEST 2008


On Mon, Jun 2, 2008 at 9:17 AM, Dmitry Dulepov [typo3] <dmitry at typo3.org> wrote:
> Christopher Torgalson wrote:
>> No. TYPO3 insists on using xhtml only, and in xhtml, 'TABLE' is not
>> the same thing as 'table' [1]. Besides, any decent editor (e.g.
>> Textmate) displays, or can display, various selectors in different
>> colours.
>
> Did I say anything about using TABLE instead of table in HTML? No, I did not. Your reply talks about the wrong thing.
>
> CSS is case-insensitive. So TABLE=table in CSS and every browsers knows the spec and follows it.


This is true, but not particularly relevant. The elements to be styled
(i.e. the markup) *must* be lower-case, and the css selectors should
match. CSS is case-insensitive, but for every kind of selector
*except* xhtml elements, the case *must* match what is found in the
markup. I see no reason to allow such an inconsistency in formal
coding guidelines.

Incidentally, the author of the spec--w3c--does say that selector
names should match what is found in the styled document:

"The case-sensitivity of document language element names in selectors
depends on the document language. For example, in HTML, element names
are case-insensitive, but in XML they are case-sensitive." [1]


>> Sure, it's ok with *one* property, but what about with multiple
>> properties? It becomes totally incomprehensible with a long list:
>
> Did I say I want single line always?


No, but this would add another unnecessary inconsistency.



[1]http://www.w3.org/TR/CSS21/selector.html#pattern-matching

-- 
Christopher Torgalson
http://www.typo3apprentice.com/




More information about the TYPO3-dev mailing list