Files
duplicati/Duplicati/Server/README.md
T

22 lines
1.3 KiB
Markdown
Raw Normal View History

## Update style sheets
2024-08-31 12:40:48 -04:00
We use [Less CSS](https://lesscss.org) as a CSS preprocessor and its minify plugin along with it. We also use [Stylelint](https://stylelint.io/) with a plugin for Less ([stylelint-config-standard-less](https://www.npmjs.com/package/stylelint-config-standard-less)).
2024-08-14 12:18:06 -04:00
2024-08-14 13:37:26 -04:00
Before proceeding, please make sure that [npm](https://www.npmjs.com/) is installed on your computer and available on your PATH. For install instruction, check the [official documentation](https://docs.npmjs.com/cli/v9/configuring-npm/install/).
2024-08-31 12:40:48 -04:00
Then, run `npm install --prefix ../../` on the current directory to install the packages.
2024-08-31 12:40:48 -04:00
To use Stylelint and compile the Less files, run the commands below:
2024-08-14 12:18:06 -04:00
```
2024-08-14 12:18:06 -04:00
npx stylelint "**/less/*.less"
npx lessc webroot/ngax/less/dark.less webroot/ngax/styles/dark.css --clean-css -m=always
npx lessc webroot/ngax/less/default.less webroot/ngax/styles/default.css --clean-css -m=always
```
2024-08-14 21:41:20 -04:00
Add `--fix` option to have Stylelint fix the errors which the linter can fix by itself.
2024-08-14 12:18:06 -04:00
2024-08-14 15:01:14 -04:00
Alternatively, it is possible to run those commands with `npm run-script`. See `package.json` on the root directory for available scripts.
2024-08-31 12:40:48 -04:00
Note: there are warnings about math=always on running `lessc`, but to fix those all divisions in `.less` need to be wrapped in parentheses.