How to improve your CSS


Don’t Repeat Yourself

Most front end developers are familiar with some sort of CSS framework like Bootstrap or Boilerplate. Libraries like these have gotten so popular because they have created systems of reusable classes that make it faster and easier to write CSS. Having classes that can be used on all pages not only make the developers life easier, but ensures coherency throughout the website. 


Understanding Browser Support

Although many companies differ in browser support, the vast majority need to support the most popular browsers: Chrome, Firefox, Safari and IE. Understanding how each browser renders its CSS and the idiosyncrasies each browser has can help you write CSS that will render correctly for each browser. Since CSS allows for many solutions to one problem, this can help you limit your solution to be the best for each browser.


Think Responsive

It is not a new concept for front end developers to have to develop for many different platforms. Thinking ahead and planning for each device from the beginning is a great way to ensure your code stays organized and makes it easier for other developers to jump into. Optimizing images, reusable classes specific to devices, commenting and excluding unnecessary elements can all benefit the user experience for different devices.

Enjoy what you’re reading? Sign up for the AYC Media newsletter and receive updates on our posts.