Component Selectors + FSS Class names

Jacob Farber jacob.farber.work at gmail.com
Wed Mar 4 18:24:28 UTC 2009


Hi Everyone,Something that I think we should take care of by the time
Infusion 1.0 goes public should be the inclusion of FSS class names in
Components' dynamic options.styles object, and the name-spacing of default
component selectors. This would separate the practices of selecting
something versus styling something.

There are a few reasons why I think this is an important initiative:

   1. Clearer roles: By default, it gives a clear distinction where
   stylistic selectors end and purely structural selectors begin.
   2. Separation of Style & State: This will emphasize how CSS is not
   embedded in a components fundamental operation, its merely enhancing it.
   3. Easy modifications: similar to our templating concept; it will become
   more obvious that if you change the default selectors, you wont break the
   appearance and vice-versa. This encourages better coding practices since
   there will be no fear of optimizing code, and no mystery as to where those
   modifications need to be made.

For a components default selector namespace, I would recommend using a
variant on the FSS "fl-" namespace: "fl-find-" and whatever you are looking
for. I think it's a good idea to use a single major prefix (that being the "
fl-") in all our materials (FSS, Components, etc).

So, this would mean every component would need to be "scrubbed" to comply
with some sort of consistent selector namespace, as well as all the
styles:{} blocks need to be converted to FSS class names. In some cases,
there is no FSS class name where there might need to be one, so it will have
to be added. These are pretty large tasks, but I would be happy to help
here.

What do you think?

Jacob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://fluidproject.org/pipermail/fluid-work/attachments/20090304/40a307f6/attachment.html>