Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/less/src/less/tree/atrule.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,6 @@ AtRule.prototype = Object.assign(new Node(), {

if (value) {
value = value.eval(context);
if (value.value && this.keywordList(value.value)) {
value = new Anonymous(value.value.map(keyword => keyword.value).join(', '), this.getIndex(), this.fileInfo());
}
}

if (rules) {
Expand Down
40 changes: 40 additions & 0 deletions packages/test-data/css/_main/layer.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,43 @@
color: #555;
}
}
@layer theme;
@layer layout, utilities;
body {
color: black;
}
@layer components {
.btn {
color: red;
}
.btn:hover {
color: blue;
}
}
@layer {
p {
margin-block: 1rem;
}
}
@layer framework.buttons.primary {
.btn-primary {
background: dodgerblue;
color: white;
}
}
.feature {
color: gray;
}
@layer component {
.feature h2 {
font-size: 1.5rem;
}
}
@layer ui {
.btn {
padding: 0.5rem 1rem;
border-radius: 4px;
background: rebeccapurple;
color: white;
}
}
3 changes: 3 additions & 0 deletions packages/test-data/css/_main/tailwind.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.box {
@apply h-64 w-64;
}
54 changes: 54 additions & 0 deletions packages/test-data/less/_main/layer.less
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,57 @@
color: #555;
}
}

@layer theme;
@layer layout, utilities;

body {
color: black;
}

@layer components {
.btn {
color: red;
&:hover {
color: blue;
}
}
}

@layer {
p {
margin-block: 1rem;
}
}

@layer framework.buttons.primary {
.btn-primary {
background: dodgerblue;
color: white;
}
}

.feature {
color: gray;

@layer component {
h2 {
font-size: 1.5rem;
}
}
}

@primary-color: rebeccapurple;

.button-styles() {
padding: 0.5rem 1rem;
border-radius: 4px;
}

@layer ui {
.btn {
.button-styles();
background: @primary-color;
color: white;
}
}
3 changes: 3 additions & 0 deletions packages/test-data/less/_main/tailwind.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.box {
@apply h-64 w-64;
}