Skip to content

Commit 0164faa

Browse files
author
volker
committed
add bubbling for @container like @media
1 parent e13fe47 commit 0164faa

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/com/inet/lib/less/Rule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void appendTo( @Nullable String[] mainSelector, CssFormatter formatter ) {
220220
private void bubbling( String[] mediaSelector, String[] blockSelector, CssFormatter formatter ) {
221221
if( properties.size() > 0 ) {
222222
String media = mediaSelector[0];
223-
if( media.startsWith( "@media" ) || media.startsWith( "@supports" ) || media.startsWith( "@document" ) ) {
223+
if( media.startsWith( "@media" ) || media.startsWith( "@supports" ) || media.startsWith( "@document" ) || media.startsWith( "@container" ) ) {
224224
// conditional directives
225225
int size0 = formatter.getOutputSize();
226226
CssFormatter block = formatter.startBlock( mediaSelector );

test/com/inet/lib/less/samples/general/parenthesis.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
background-size: 123 456;
77
}
88
}
9+
@container sidebar (width > 400px) {
10+
.container-fixed {
11+
back-color: red;
12+
}
13+
}
914
@media print {
1015
.visible-print {
1116
display: block !important;

test/com/inet/lib/less/samples/general/parenthesis.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
only screen and ( min-resolution: 192dpi) {
66
background-size: 123 456;
77
}
8+
@container sidebar (width > 400px) {
9+
back-color: red;
10+
}
811
}
912

1013
.responsive-visibility() {

0 commit comments

Comments
 (0)