- From: GreLI <greli@mail.ru>
- Date: Thu, 28 Oct 2010 19:10:02 +0400
- To: "Eric Twilegar" <Eric.Twilegar@onpeak.com>
- Cc: "www-style@w3.org" <www-style@w3.org>
Thinking on it I found one more way that doesn't require extra class: [class^="someRealClassOnDiv"] /* classes starting with "someRealClassOnDiv" */ { border-style:solid; border-width:1px 1px 0; } .someRealClassOnDiv-one { border-color:green; } .someRealClassOnDiv-two { border-color:blue; } CSS3 selectors are really powerful tool. On Tue, 26 Oct 2010 02:20:20 +0400, Eric Twilegar <Eric.Twilegar@onpeak.com> wrote: > Many times in CSS I find myself copying and pasting the exact block of > CSS statements from block to block. > > It would be nice if in CSS you could reference one block of CSS inside > of another block. > > I would suggest that we could create a block with a name perhaps using > the $ character to start it. Then refer to it in another block like an > include so that the CSS lines are copied in. > > > $bottomLessBorderStyleGroup > { > border-style:solid; > > border-top-width:1px; > border-left-width:1px; > border-right-width:1px; > border-bottom-width:0px; > } > > ..someRealClassOnADiv > { > $bottomLessBorderStyleGroup > } > > > For now I'm implementing something similar by generating the CSS server > side, but it would be nice to not have to go to a pre-processor. > > > et > >
Received on Thursday, 28 October 2010 15:10:48 UTC