|
26 | 26 | // Reverted for full-width fields. |
27 | 27 | // |
28 | 28 | // 8. Grid settings are inherited from horizontal FormLayout and applied using `subgrid`. |
29 | | -// A fallback is supplied to browsers that don't support `subgrid` yet. See FormLayout styles |
30 | | -// for more. |
| 29 | +// A fallback is supplied to browsers that don't support `subgrid` yet. |
| 30 | +// |
| 31 | +// Chrome 117+ supports `subgrid` but it doesn't work for `<fieldset>`. This is why we always |
| 32 | +// use the fallback for `<fieldset>`. |
| 33 | +// |
| 34 | +// https://bugs.chromium.org/p/chromium/issues/detail?id=1473242 |
31 | 35 | // https://github.com/react-ui-org/react-ui/issues/232 |
32 | 36 | // |
33 | 37 | // 9. Help texts and validation messages can take up full width of FormLayout. There is no reason |
|
180 | 184 | } |
181 | 185 | } |
182 | 186 |
|
183 | | -@mixin in-form-layout() { |
| 187 | +@mixin in-form-layout($is-fieldset: false) { |
184 | 188 | justify-self: start; // 12. |
185 | 189 |
|
186 | 190 | .field { |
|
192 | 196 | width: auto; // 11. |
193 | 197 | } |
194 | 198 |
|
195 | | - &.isRootLayoutHorizontal, |
196 | | - &.isRootLayoutHorizontal.hasRootSmallInput { |
197 | | - grid: inherit; // 8. |
198 | | - grid-template-columns: subgrid; // 8. |
199 | | - grid-column: span 2; // 8. |
200 | | - |
201 | | - @supports not (grid-template-columns: subgrid) { |
202 | | - display: contents; // 8. |
| 199 | + // 8. |
| 200 | + @if $is-fieldset { |
| 201 | + &.isRootLayoutHorizontal, |
| 202 | + &.isRootLayoutHorizontal.hasRootSmallInput { |
| 203 | + display: contents; |
| 204 | + } |
| 205 | + } @else { |
| 206 | + &.isRootLayoutHorizontal, |
| 207 | + &.isRootLayoutHorizontal.hasRootSmallInput { |
| 208 | + grid: inherit; |
| 209 | + grid-template-columns: subgrid; |
| 210 | + grid-column: span 2; |
| 211 | + |
| 212 | + @supports not (grid-template-columns: subgrid) { |
| 213 | + display: contents; |
| 214 | + } |
203 | 215 | } |
204 | | - } |
205 | 216 |
|
206 | | - &.isRootLayoutHorizontal.isRootFullWidth { |
207 | | - grid-template-columns: subgrid; // 8. |
| 217 | + &.isRootLayoutHorizontal.isRootFullWidth { |
| 218 | + grid-template-columns: subgrid; |
| 219 | + } |
208 | 220 | } |
209 | 221 |
|
210 | 222 | &.isRootLayoutHorizontal .label, |
|
0 commit comments