[TYPO3-dev] CSS Coding GuidLines

Christopher Torgalson bedlamhotel at gmail.com
Sun Jun 1 22:55:40 CEST 2008


Hi,

On Sun, Jun 1, 2008 at 10:47 PM, Steffen Kamper <steffen at sk-typo3.de> wrote:
> Hi,
>
> "Christopher Torgalson" <bedlamhotel at gmail.com> schrieb im Newsbeitrag
> news:mailman.4352.1212352350.4573.typo3-dev at lists.netfielders.de...
>
>> I'd say +1 to all except that I'd like to hear a justification for
>> item (b) above (also, I assume you meant 'prevent' and not
>> 'pretend'?). I can't think of any particular reason for recommending
>> *against* the use of the 'background' shortcut (or its analogues)…
>
> oh sry, yes my english is pretty bad.
> prevent was it, and this should be no rule but an advice. it's much more
> easy to read and understand formatting if single expressions are used.
>
>> Do you have any thoughts about how CSS files should be ordered (aside
>> from cases where the order is dictated by specificity)?
>
> I think this is drifferent from case to case.
> If the blocks are semantically grouped and well commented it should be easy
> to see the structure.
> Also this might differ for many people as this is also personal taste.
> May be a little advice:
> use level depth for structure
>
> .div1 {
>  ...
> }
>
> .div1 span {
>  ...
> }
>
> div1 span a {
>  ...
> }


That's what I meant by 'specificity'...we seem to agree about that :)

I don't agree that shortcuts are hard to read (since the properties
*must* occur in a certain order), but I can live with a recommendation
to use fewer shortcuts like 'background,' as long as it's not a hard
rule--they're great labour-saving devices...

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




More information about the TYPO3-dev mailing list