File: namespacing-8.less

package info (click to toggle)
less.js 3.13.0%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,020 kB
  • sloc: javascript: 23,275; makefile: 12; perl: 11; sh: 6
file content (31 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// see: https://github.com/less/less.js/issues/3368
@vars: {
  background-color: black;
  color: contrast($background-color, #000, #fff);
}
  
:root {
  each(@vars, {
    --@{key}: @value;
  });
}

div {
  display: inline-block;
  padding: 1rem;
  background-color: var(--background-color);
  color: var(--color);
}

// see: https://github.com/less/less.js/issues/3339
// still fails - move to 4.0
// @components: {
//   columns: true;
//   ratios: false;
// };

// each(@components, {
//   & when (@value = true) {
//       @import (optional) "components/@{key}.less";
//   }
// });