- From: SimDigital - Gustavo Villa <gustavo@simdigital.com.br>
- Date: Thu, 12 Feb 2009 17:54:09 -0200
- To: www-style@w3.org
It is allowed today? No. Why to use? To simplify CSS day-by-day maintence, once it allow designers to use more cascade advantages. How does it is did today? if we have something like this: <div class="header"></div> <div class="content"></div> To adjust site width, we need to do it: 1) ..header { width:800px; font-size:20px;} ..content { width:800px; font-size:12px;} or: 2) ..header, .content {width:800px;} ..header {font-size:20px;} ..content {font-size:20px;} or still it: 3) <div class="header layoutwidth"></div> <div class="content layoutwidth"></div> ..layoutwidth {width:800px;} ..header {font-size:20px;} ..content {font-size:20px;} The problem is that if we use the solution 1, we need to read all lines of CSS to be sure that we dont forget nothing. If we use the solution 2, we need to read all lines of HTML to be sure that we dont forget nothing. And if we use solution 3, we will need to change HTML if in the future that element dont need to be width adjusted. That solution I think is poor, because CSS just need to format HTML/XHTML generated, not to change the generated code to allow formating. Now, the solution that i suggest: Create an way to concatenate classes attributes like this: ..layoutwidth {width:800px;} ..header { import:.layoutwidth; font-size:20px; } ..content { import:.layoutwidth; font-size:12px; } Once changed .layoutwidth, all elements that use this format will change, easily! It is a simple sample, but even more complex, more util this feature will be. What about? -- SimDigital - Tecnologia com resultado Visite nosso site: www.simdigital.com.br Sorocaba (15) 34117200 Londrina (43) 33015779
Received on Thursday, 12 February 2009 22:43:32 UTC