administration mode
Pssst...Ferdy is the creator of JungleDragon, an awesome wildlife community. Visit JungleDragon

 

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)
It's just an example, but if everybody would compyl with some standard similar to this, integrating the UI of products would be much easier, at the very least. Is anybody aware of such a standard?

Share |

Comments: 4

COMMENT: SEAN BURGESS emailhomepage

OCT 25, 04:19:46 AM

comment » Think about it a different way. As easy as it is to screw up css, why would you make it easy to have some corporate "webmaster" make your pride and joy look like crap?

Sean--- «

COMMENT: JUAN F. RUIZ F. emailhomepage

OCT 25, 15:37:59

comment » Another standard??? 08

Well ... no. Why? Imagine W3C developes a new standard, for example : "Recommendation for CSS Selectors and Class Naming". 12

I'm SURE, in five days or less Microsoft and other companies will develope an *incompatible* version of the new recomendation in their products ... 04 It's the sad reality of IT. 03

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" ). 09

Ferdy, write an standard for your job and work with it. Forget interoperability and third products .... 02

Regards. «

COMMENT: JASON ROBERTS emailhomepage

OCT 26, 12:08:12 AM

comment » I started a comment here which turned into a post suggesting that perhaps an abstraction layer could be created that, at the very least, would ease the pain in upgrading already integrated apps.

Thanks for the inspiration :)

http://i.ndustrio.us/2006/10/25/established-css-3rd-party-app-integration/ «

COMMENT: FERDY

OCT 27, 20:03:11

comment » I agree with everyone on the issue of ISVs not following standards, but I'm not bitter about it. If we push long enough, eventually things get better. IE7 is a first sign of better industry-wide CSS support, for example. «

CREATE A NEW COMMENT
required field
required field HTML is not allowed. Hyperlinks will automatically be converted.