Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SCSS uses 2 space indentation instead of 4 space and rule ordering was introduced for the CSS to keep the code more consistent. We enforce this with Prettier during the development and integration process.

Sizing and helpers

Generally, all sizing is derived from the root font size. In Totara 19 and later, this is the browser default, equivalent to 16px.

Most other sizes in Totara are derived from the root font size, via the rem unit.

You can convert a pixel value to the equivalent rem value using the rem-px helper. For example, rem-px(32) evaluates to 2rem.

Expand
titleTotara 18 and earlier

In Totara 18 and earlier, the root font size therefore 1rem is equal to 10px, and these helpers are not available, as the math to convert is very simple.

Tips and known limitations

...