Articles categorized Code Reusability

Write Efficient CSS, save Browser’s efforts, optimize for speed. Write clean, semantic html with well organised, maintainable CSS. Important principles and more.

The presentation, content, and behavior should always be separate. These should exist and maintained individually. Your markup should be well-formed, it should be semantically correct and it should be generally valid. Presentation and layouts should never depend upon JavaScript. JS should just progressively enhance the experience. And Yes, inefficient css can reduce the page speed . . . read more

Pseudo Class Selectors work on Beforehand too

Pseudo class selectors have always been there, we have used them indefinite times to make our states more cooler and interactive. We have always appended them at the end like a:hover but here I am talking about something on beforehand like: and yes this declaration works too. Such css can be really helpful sometimes, It’s . . . read more

Do not bloat less / sass nested rules, do not kill reusability 1

Wherever possible, we should avoid nested rules in less/sass. When you start using less/sass and the way you can create nested rules to compile to full css, it is so Cool, but I found my team creating nested and overqualified rules automatically. We were happy about it, thinking all the css for a section will . . . read more