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
18 changes: 18 additions & 0 deletions packages/test-data/tests-unit/container/container.css
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,21 @@
font-size: 75%;
}
}
.mixin-container-test {
color: red;
}
@container name (width < 125px) {
.mixin-container-test {
display: none;
}
}
@container sidebar (width < 500px) {
.sidebar-test {
display: none;
}
}
@container header (width < 800px) {
.header-test {
display: none;
}
}
24 changes: 24 additions & 0 deletions packages/test-data/tests-unit/container/container.less
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,27 @@
font-size: 75%;
}
}

// Regression test: mixin with variable container name and variable query condition
// Issue: mixins with parameters using @container @name (condition < @var) failed
// with "variable @bp is undefined" error in older versions
@issue-width: 125px;

.container-query-mixin(@container-name; @bp) {
@container @container-name (width < @bp) {
display: none;
}
}

.mixin-container-test {
.container-query-mixin(name, @issue-width);
color: red;
}

// Verify multiple calls with different params produce correct output
.sidebar-test {
.container-query-mixin(sidebar, 500px);
}
.header-test {
.container-query-mixin(header, 800px);
}
Loading