Skip to content

Commit 576b200

Browse files
committed
Let Banner react on container size instead of screen size
1 parent 6554fba commit 576b200

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.changeset/ripe-bananas-cut.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@openproject/primer-view-components': patch
3+
---
4+
5+
Let Banner component react on container size instead of screen size

app/components/primer/alpha/banner.pcss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
/* Banner alert */
2+
x-banner {
3+
container-type: inline-size;
4+
display: block;
5+
}
26

37
.Banner {
48
position: relative;
@@ -14,7 +18,7 @@
1418
grid-template-rows: min-content;
1519

1620
/* `sm` breakpoint variation */
17-
@media (max-width: 543.98px) {
21+
@container (max-width: 543.98px) {
1822
grid-template-areas:
1923
'visual message close'
2024
'. actions actions';

0 commit comments

Comments
 (0)