class vs. id in code

A place for general not CMSimple related discussions
Post Reply
Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

class vs. id in code

Post by Tata » Wed Jul 23, 2014 4:55 am

I have found IMHO VERY INTERESTING articel at http://csswizardry.com/2014/07/hacks-fo ... ecificity/.

I STRONGLY RECCOMMEND all designer and coders read this and think about following this simple explained philosophy.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: class vs. id in code

Post by cmb » Wed Jul 23, 2014 10:11 am

Tata wrote:I have found IMHO VERY INTERESTING articel at http://csswizardry.com/2014/07/hacks-fo ... ecificity/.

I STRONGLY RECCOMMEND all designer and coders read this and think about following this simple explained philosophy.
That is a very interesting article indeed, and I will try to avoid styling IDs in the future, as that actually makes sense. It might be noteworthy that inline-styling (<p style="...">) is even worse than styling IDs, so it should usually be avoided, too. As the article is lacking a link to the specification: http://www.w3.org/TR/CSS2/cascade.html#specificity.

Something else I like to suggest especially for plugin developers: don't overstyle your plugins! It might look great when viewed with one template, but it might look bad when viewed with another (sometimes the plugin might be even partially unusable, unless the user makes some customizations).
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: class vs. id in code

Post by Tata » Wed Jul 23, 2014 10:21 am

The simplest is the styling of a plugin backend, the better. There is no crucial need to save space or force any gorgeus design. The functionality is the m ost important.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: class vs. id in code

Post by svasti » Wed Jul 23, 2014 5:04 pm

Tata wrote:I have found IMHO VERY INTERESTING articel at http://csswizardry.com/2014/07/hacks-fo ... ecificity/.
+1 indeed
I propose to use this article for template guidelines. ... of course for plugin authors too.

svasti

Post Reply