W3C home > Mailing lists > Public > www-style@w3.org > January 2005

Re: inner structures

From: Philip TAYLOR <P.Taylor@Rhul.Ac.Uk>
Date: Fri, 07 Jan 2005 11:34:51 +0100
Message-ID: <41DE65CB.1040101@Rhul.Ac.Uk>
To: aquino welkin <emp@vsen.com>
Cc: www-style@w3.org

Although I understand your desire for "minimalism"
(which I perceive as an admirable attempt to
avoid unnecessary repetition in CSS),
I do not think your example is correct : surely
if ".head." occurs /within/ the braces of "#main",
then ".logo" should occur /within/ the braces of
".head".   N'est-ce pas ?

Philip TAYLOR
--------
aquino welkin wrote:
 > Hi,
 >
 > I have a very specify idented way to write css, and started looking for a
 > solution to avoid repetition of ID/classes, since my research was
 > unsuccessful I want to ask you guys if this is possible, and if not, sugest
 > it to next implementations of the technology.
 >
 > the following code:
 >
 > #main
 > {
 > 	width: 416px;
 > 	float: left;
 > }
 >
 >     #main .head
 >     {
 >         width: 414px; height: 60px;
 >         position: relative;
 >         display: table-cell;
 >         border-right: solid 1px #81868C;
 >     }
 >
 >         #main .head .logo
 >         {
 >             margin: 10px 0px 10px 0px;
 >         }
 >
 > would look like this:
 >
 >
 > #main
 > {
 > 	width: 416px;
 > 	float: left;
 > 	
 >     .head
 >     {
 >         width: 414px; height: 60px;
 >         position: relative;
 >         display: table-cell;
 >         border-right: solid 1px #81868C;
 >     }
 >
 >         .logo
 >         {
 >             margin: 10px 0px 10px 0px;
 >         }
 > 	
 > }
 >
 > note that the classes are contained inside the parent structure. I think the
 > advantages are visible, in these tabeless days, minimalist and clear code is
 > the goal
 >
 > Regards
 > emp
Received on Friday, 7 January 2005 10:35:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:35 GMT