Skip to content

Commit d3c4ace

Browse files
authored
UX: Style policy footer relative to policy container width (#36112)
1 parent 462a814 commit d3c4ace

File tree

1 file changed

+13
-15
lines changed

1 file changed

+13
-15
lines changed

plugins/discourse-policy/assets/stylesheets/common/discourse-policy.scss

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
@use "lib/viewport";
2-
31
// Policy in post styles
42
.cooked .policy {
3+
container-type: inline-size;
54
position: relative;
65
border: 1px solid var(--primary-low);
76

@@ -17,10 +16,6 @@
1716
display: flex;
1817
justify-content: space-between;
1918
gap: 1rem;
20-
21-
@include viewport.until(md) {
22-
flex-direction: column;
23-
}
2419
}
2520

2621
.toggle {
@@ -96,17 +91,8 @@
9691
gap: 0.5rem;
9792
flex-wrap: wrap;
9893

99-
@include viewport.until(lg) {
100-
width: 100%;
101-
}
102-
10394
.btn {
10495
white-space: nowrap;
105-
106-
@include viewport.until(lg) {
107-
width: 100%;
108-
white-space: inherit;
109-
}
11096
}
11197
}
11298

@@ -144,6 +130,18 @@
144130
margin-bottom: 0;
145131
}
146132
}
133+
134+
@container (max-width: 25rem) {
135+
.policy-footer {
136+
flex-direction: column;
137+
}
138+
139+
.user-lists,
140+
.policy-actions,
141+
.policy-actions .btn {
142+
width: 100%;
143+
}
144+
}
147145
}
148146

149147
// Policy in editor styles

0 commit comments

Comments
 (0)