Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Standardize classnames and layout to facilitate theming

From MoodleDocs
Revision as of 21:03, 19 December 2012 by Amy Groshek (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

I like the way this is going. Naturally I will only comment on the bits I don't completely like ;-)

I still don't get why "Eliminate span.maincontent" is a good idea, but then I already explained my reasoning in MDL-34723.

On an unrelated note, I recommend reading some articles like http://css-tricks.com/efficiently-rendering-css/ and http://boblet.tumblr.com/post/34751669/tips-for-css-performance and the classic https://developer.mozilla.org/en-US/docs/CSS/Writing_Efficient_CSS that they both link to. Hence, some parts of your recommendations worry me a bit, like the one to always prefer classes to ids.

--Tim Hunt 15:31, 30 November 2012 (WST)


Hi Tim. I hear you on the selectors issue. From the bottom of the CSS-Tricks post:

So we know that ID's are the most efficient selectors. If you wanted to make the most efficiently rendering page possible, you would literally give every single element on the page a unique ID, then apply styling with single ID selectors. That would be super fast, and also super ridiculous. It would probably be extremely non-semantic and extremely difficult to maintain. You don't see this approach even on hardcore performance based sites. I think the lesson here is not to sacrifice semantics or maintainability for efficient CSS.