0

Is there any reason why in css naming convention, some object preferably start with prefix o- and component starts with c- ?

I know o- will stand for object and c- stand for component, but why don't we just ignore that rules? For example c-btn, why we're using c-, I thought it was too verbose. Instead using some of that prefix, we can just use btn, simple clean and straight to the point.

Please, enlighten me guys. : )

csldry
  • 1
  • 1
  • Since its referrence based on class objects like: they categorized object as o- and component as c- then they call it that way! – moh89 Jul 08 '17 at 17:27
  • @moh89 we already categorized those `object` and `component` on separated folder in `css architecture`, but why we still need to naming it like that? My point is those prefix really verbose, am I wrong if I stripped all that prefix on my `components` and `objects`? – csldry Jul 08 '17 at 17:33
  • U are not wrong but it might be misfunction sometimes then u could use it for assurance – moh89 Jul 08 '17 at 17:36
  • @moh89 can you give me an example on how may it be misfunction? – csldry Jul 08 '17 at 17:40
  • it might doesnt load ur css objects due to poor reference once u doesnt call it properly. – moh89 Jul 09 '17 at 10:00

1 Answers1

0

ITCSS is not OOCSS . To aswer your question, with ITCSS you have specific folder location for components, objects...and other family types.

Since it was meant to work with other people, if you write the namespace before the classname everyone can easily recognise where the code and his file is located. If you don't do it, you can have a .btn, .button, .circular-button. What is an object and what is a component?

Mattia Astorino
  • 1,396
  • 14
  • 18