Bobby Jack wrote:
> It's an interesting approach but I think, until it can fully express all CSS 
> selectors, it's flawed.

Well, it is still a 0.1 release, it's work-in-progress! :)

> How, for example, can you use hcss to generate this CSS?
>
> .container p { line-height: 2; }

For cases where the child element can appear anywhere within the
parent element (such as the case above), you can do:

<div class="container">
   p {
     line-height: 2px;
   }
</div>

That is one of the convention I've adopted. For everything where the
hierarchy matters, use tags. But if you need to add selectors that are
supposed to be appended without the ">" modifier, you can use straight
CSS.

Another convention HCSS uses:

<div class="a">
   padding: 5px;
   .b {
     padding: 10px;
   }
   #c {
     font-size: 15px;
   }
</div>

Results in:

div.a {
  padding: 5px;
}
div.b {
  padding: 10px;
}
div#c {
  font-size: 15px;
}

This is so you can stack small variations of the same element in the
same scope, for convenience's sake.

HCSS still has some big limitations, which are not that annoying (for
me at least) but should be gone in the future releases anyway:

1) Can't use CSS comments (only HTML comments);
2) Can't have one-line selectors (where the { and } start and end at
the same line);
3) Can't have multiple selectors (seperated by comma).

I'm planning on fixing #2 and #3 in the 0.2 release. Unsure if #1 is
worth it, but shouldn't be too hard to implement.

Thanks a million for the feedback!

-- Jonas
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to