Show Topics

Less

Less (which stands for Leaner Style Sheets) is an extension of CSS that enables you to use things like variables, nested rules, inline imports and more.

Options

  • Output File

    Click the output file path to manually change it or use project wide output options to adjust output path for all Less files.

  • SourceMap

    Enable this option to create a sourcemap (.map) file along with the output CSS file. SourceMap file allows you to find the original position of rule sets and properties in the Less file while inspecting pages with developer tools.

  • Line Number

    Enable this option to output comments in the CSS file containing the file name and line number of a rule set in the input Less file.

  • Strict Units

    Enable this option to prevent Less from performing invalid math operations. For instance

    .class { width: 1px * 2px; }

    In this case, things are clearly not right - a length multiplied by a length gives an area, but CSS does not support specifying areas. So Less assumes that you meant px and outputs 2px. When strict units are enabled, Less assumes this is a bug in the calculation and throws an error.

  • Enable Javascript

    Enable this option to evaluate JavaScript embedded JavaScript.

  • Strict Imports

    Enable this option to disallow imports inside of a rule set.

  • Allow Insecure Imports

    Enable this option to allow imports from insecure HTTP hosts.

  • Math

    Check math documentation for available math operations.

  • Prefix CSS

    Enable this option to add vendor prefixes to the output CSS file with Autoprefixer.

  • Minify CSS

    Enable this option to minify the output CSS file.

Imported Files

Prepros compiles the parent file whenever you edit an imported file. Prepros also re-scans imported files whenever you edit a file. Refresh project with CTRL+R or CMD+R to manually re-scan imported files.

@import 'b';
@import 'c.less';

// This file will compiled automatically whenever you edit b.less or c.less

Use partial file name prefixed with an underscore (eg: _imported.less) if you don't want Prepros to automatically compile a file whenever you edit it.

Learn more about Less from Less website.