#Moodle CSS coding guidelines released @moodledev

August 1st, 2016

Moodle HQ has finally released the CSS coding guidelines for developers working on or with Moodle code. The guidelines talks purely about the mechanics of code layout and the choices made for Moodle. Now with the introduction of the CSS guidelines, there will be a consistent coding style throughout all areas of the Moodle project.

#Moodle CSS coding guidelines released @moodledev

Consistent coding style is important in any development project, and particularly so when many developers are involved. A standard style helps to ensure that the code is easier to read and understand, which helps overall quality.

In a recent announcement on Moodle developer forums, Dan Poltawski announced about the release of the coding guidelines. Additionally, Moodle has opted for Stylelint as the CSS linter to ensure conformance to the style in Moodle core.

So, if you are a theme designer, you need to get comfortable with the Moodle CSS guidelines as soon as possible. Check out the CSS guidelines here. Also have a look over these Moodle docs:

Many thanks to Frédéric Massart who did the bulk of the work getting these guidelines in place and to Daniel Wahl, Amy Groshek and others which this document was built on.

How these CSS guidelines are going to affect/improve your code as a Moodle developer? Let us know in the comments below.