Wouldn't it be cool if... »
FERDY CHRISTANT - OCT 24, 2006 (07:21:30 PM)
Wouldn't it be cool if there was a standard for naming CSS selectors?
Think of it. Imagine you work at a company that has taken care of their CSS. They have a single company-wide CSS file that defines the corporate web GUI. All applications refer to it. When the CSS changes, the UI of all the applications automatically change along. All is good.
Now, insert any third party product into the mix and you're screwed:
- Often you cannot even adjust the look & feel of it, you can't access the source code
- If you can access it, the CSS selectors in the third party product will be named differently from the ones in your company CSS file. As a result, you have to dive deep into the 3rd party application and modify. The effort this requires hardly justifies the sake of an integrated look & feel
- Let's say you managed to alter the CSS of the 3rd party product to fit it into your own CSS. Now, the third party products has a new version, and you have to start all over again
I'm thinking there must be an easier way. What if all ISVs would name their CSS selectors the same? Just for the sake of the idea, here are some examples I made up:
- l_hdr_m (layout header menu)
- l_con_col1 (layout content column 1)
- l_ftr (layout footer)
- s_hrd_m_l (style header menu link)



Comments: 4
COMMENT: SEAN BURGESS

OCT 25, 04:19:46 AM
Sean--- «
COMMENT: JUAN F. RUIZ F.

OCT 25, 15:37:59
Well ... no. Why? Imagine W3C developes a new standard, for example : "Recommendation for CSS Selectors and Class Naming".
I'm SURE, in five days or less Microsoft and other companies will develope an *incompatible* version of the new recomendation in their products ...
It's the sad reality of IT.
It's better the bad thing's we know than ... ( I'm not sure if this last phrase is correct but sounds better in spanish : "Mas vale lo malo conocido que lo bueno por conocer" ).
Ferdy, write an standard for your job and work with it. Forget interoperability and third products ....
Regards. «
COMMENT: JASON ROBERTS

OCT 26, 12:08:12 AM
Thanks for the inspiration :)
http://i.ndustrio.us/2006/10/25/established-css-3rd-party-app-integration/ «
COMMENT: FERDY
OCT 27, 20:03:11