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
Articles categorized Tips & Tricks
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
Neat & clean html conditional classes
We have been using html conditional classes for a couple of years now. We have always talked about neat and clean code. Out of all the things, your html conditional classes should be neat and clean, precise, compact and targeted correctly. After-all, this is the very first thing you serve. Lets look at the most . . . read more
Progress Bar / Profile Completeness Meter with the Text Cut in Two Colors
What are we Creating today ? This is one of the first innovations. This dates back to around January 2011. At that time, when I was able to code this, it looked so cool to me. Lets get to it: We are going to create a cool Progress Bar ( or in specific case, we . . . read more
compass-animation saves all the time and efforts
Just wanted to introduce the compass animate plugin. It great and saved our lots of efforts. A normal css animation looks like this: But that’s not the reality, you need to include all the vendors 😡 , your code gets from 1x to 4-5x of lines immediately. Multiple times copy pasting the same code and . . . read more
Checklist before merging / pushing changes to main branch
In the various git workflows you use, you always have a main branch, reserved for the stable code, the mainstream deployments and the version tagging. We touch these branches with precaution and care, right. Now in the agile development process we need to do rebases and merges often. That’s the necessary part. Now these rebases . . . read more
Transparent link overlay, z-index may not work in older Internet Explorers
We have worked on all sorts of user interfaces, designs and specs. Now there are certain sections in which we need a link on the whole block. The easiest way to do this is to wrap the whole block in an anchor tag. Now if you have complex markup in your code block, you can . . . read more
Selector and Options independent jQuery coding
We all have passed that phase, our big and long script.js contained nothing but plugins initializing scripts and their options configuration scripts. There was a strong need of following two things: Make jQuery plugin initialization independent Store all the configuration in markup itself And then came in the data attributes in HTML5, just at the . . . read more