W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: Feature request for CSS

From: David Chambers <david.chambers.05@gmail.com>
Date: Wed, 18 Aug 2010 13:21:37 +1200
Message-ID: <AANLkTik0zqp88Ay70VbG1T_PYzjxSM4fdT6F_ifZEw-B@mail.gmail.com>
To: "Jens O. Meiert" <jens@meiert.com>
Cc: "Goderre,Laurent [NCR]" <Laurent.Goderre@ec.gc.ca>, www-style@w3.org, bert@w3.org, laurent.goderre@gmail.com
Goderre,Laurent [NCR] <Laurent.Goderre@ec.gc.ca> wrote:

This is amazing! Exactly what I wanted. The concurent development of two
> almost identical projects is a bit problematic. One of them should be
> adopted as a standard and be adopted by browser. This would signmificantly
> reduce bandwith and speed up web browsing, espcially for mobile browsers.



In you opinion David, which one would be more likely to be adopted?


While I know of the existence of these CSS frameworks, I'm yet to use either
so can't recommend one over the other (and in fact there are more than just
two options).

The idea of adding constants to CSS has been raised here in the past. The
consensus seems to be that this is the realm of CSS preprocessors (such as
the those mentioned). While I would like to see such features included in
CSS one day, even if they were to be adopted immediately we'd be unable to
make use of them in production until the current crop of browsers cycled out
of use.

My advice is to pick a CSS framework and give it a whirl. :)

David


On 18 August 2010 06:37, Jens O. Meiert <jens@meiert.com> wrote:

> Laurent,
>
>
> I believe, and that is something to generally keep in mind, that you
> will benefit from cleaning up your style sheet first. Without
> bothering to improve the class names of your sample which are mostly
> presentational and thus problematic from a maintainability point of
> view [1] here’s what a simple update can do for you:
>
> #banner, #left h2, #right h2, #footer ul {
>  background:#363;
>  color:#FFF;
> }
> #banner {
>  font-size:120%;
>  text-align:center;
> }
> .column1_2, .column2_2, .column1_1 {
>   border:#363 solid;
> }
> .column1_2, .column2_2 {
>  border-width:1px;
> }
> .column1_1 {
>  border-width:3px;
> }
> #left h2, #right h2 {
>   margin-bottom:.2em;
> }
> #left ul, #footer ul {
>  list-style:none;
>   margin:0;
>  padding:0;
> }
> #left ul {
>   background:#CC9;
>  color:#000;
> }
> #footer ul li {
>  float:left;
> }
>
> As you might notice, things got a bit simpler, and all of a sudden
> you’re only dealing with 5 declarations that define colors of 4
> different values (vs 9 and 4). I am not sure that this is not
> manageable and absolutely requires variables or constants. The same
> holds true for significantly more complex projects where there’s also
> less need for variables but for craft [2].
>
> The way your write your CSS truly goes a long, long way.
>
>
> How convenient:
>
> [1] http://meiert.com/en/blog/20090617/maintainability-guide/#toc-markup
> [2] http://meiert.com/en/blog/20090401/why-css-needs-no-variables/
>
> --
> Jens O. Meiert
> http://meiert.com/en/
>
>
Received on Wednesday, 18 August 2010 01:22:10 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT