Web Development Style Guide

Frontend features implemented using a combination of JavaScript, CSS and HTML in Chromium are known as WebUI features. Developers coding for these features should adhere to the following rules just as C++ code must conform to the Chromium Coding Style. For JavaScript, HTML and CSS, the Chromium style generally follows the Google JavaScript Style Guide and the Google HTML/CSS style guide. Additional guidelines are listed below.

Separation of presentation and content

When designing a WebUI feature, split up the content you are presenting to the user (HTML) from the styling of the data (CSS). Taking the concept a step further, the logic that controls the dynamic behavior of the content and presentation (JS) should also be separated. This factoring helps by highlighting the meaning of the content and easing future changes to either the content, presentation or logic.