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
2 changes: 1 addition & 1 deletion packages/less/src/less/parser/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,7 @@ const Parser = function Parser(context, imports, fileInfo, currentIndex) {
parserInput.forget();
return new(tree.AtRule)(name, value, rules, index + currentIndex, fileInfo,
context.dumpLineNumbers ? getDebugInfo(index) : null,
isRooted
isRooted, undefined, hasUnknown
);
}

Expand Down
6 changes: 4 additions & 2 deletions packages/less/src/less/tree/atrule.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ const AtRule = function(
currentFileInfo,
debugInfo,
isRooted,
visibilityInfo
visibilityInfo,
hasUnknown
) {
let i;
var selectors = (new Selector([], null, null, this._index, this._fileInfo)).createEmptySelectors();
Expand Down Expand Up @@ -62,6 +63,7 @@ const AtRule = function(
this.isRooted = isRooted || false;
this.copyVisibilityInfo(visibilityInfo);
this.allowRoot = true;
this.hasUnknown = hasUnknown;
}

AtRule.prototype = Object.assign(new Node(), {
Expand Down Expand Up @@ -135,7 +137,7 @@ AtRule.prototype = Object.assign(new Node(), {

if (value) {
value = value.eval(context);
if (value.value && this.keywordList(value.value)) {
if (!this.hasUnknown && value.value && this.keywordList(value.value)) {
value = new Anonymous(value.value.map(keyword => keyword.value).join(', '), this.getIndex(), this.fileInfo());
}
}
Expand Down
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;
}
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;
}
Loading