Skip to content

Commit 5f20c4a

Browse files
committed
support @host. Fixes #1560
1 parent 15e8897 commit 5f20c4a

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

lib/less/parser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1508,6 +1508,7 @@ less.Parser = function Parser(env) {
15081508
case "@right-bottom":
15091509
hasBlock = true;
15101510
break;
1511+
case "@host":
15111512
case "@page":
15121513
case "@document":
15131514
case "@supports":

test/css/css-3.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,11 @@ h1 {
115115
.upper-test {
116116
UpperCaseProperties: allowed;
117117
}
118+
@host {
119+
div {
120+
display: block;
121+
}
122+
}
123+
::distributed(input::placeholder) {
124+
color: #b3b3b3;
125+
}

test/less/css-3.less

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,12 @@ foo|* { color: yellow; }
114114
h1 { color: green; }
115115
.upper-test {
116116
UpperCaseProperties: allowed;
117+
}
118+
@host {
119+
div {
120+
display: block;
121+
}
122+
}
123+
::distributed(input::placeholder) {
124+
color: #b3b3b3;
117125
}

0 commit comments

Comments
 (0)