Classes, ids and styles organization November 10, 2014, 07:12:49 pm While writing addons, I frequently find myself swear around because the style of a block depends upon an id and so I cannot "borrow" it for my addon and I cannot inherit the style from the "current theme", but I have to write my own set of css in order to let make my piece of html look similar to the one I have just few pixels above.Practical example: #description_board.I was trying to add another box that should look like the #description_board one, and I hoped to just attach a class and be happy (actually I imagined it wouldn't be that easy ). Unfortunately, the style of that area heavily rely on the #description_board is and few others, so borrow the style is impossible unless I duplicate the id making the markup invalid.Would it be so terrible to rely only on classes?
Re: Classes, ids and styles organization Reply #1 – November 11, 2014, 05:26:35 am When I'm writing themes I only use classes for the same reason, so I can reuse them later on and prevent from having invalid W3C check.