- 🇮🇳India Preeti.chawla
I attempted to troubleshoot and resolve this issue locally using various methods, such as applying max-width and utilizing media queries.
I discovered a potential solution that involves using media queries specifically for cases where the font size is set to large or very large.
CSS for Font Size-Specific Adjustments
To detect when the user has changed their default font size, I recommend using the @supports rule. This allows for adjustments to the form layout or text styles accordingly:css
@supports (font-size: var(--font-size-large)) {.layout-form {
display: grid;
grid-template-rows: auto 1fr;
grid-template-columns: minmax(0, 3fr) minmax(22.5rem, 1fr);
gap: var(--space-l);
}.layout-region--main,
.layout-region--footer {
grid-column: 1;
margin-inline: auto;
width: var(--layout-region-edit-width);
}/* When the layout has vertical tabs */
.layout-region--main:has(.vertical-tabs),
.layout-region--main:has(.vertical-tabs) ~ .layout-region--footer {
width: var(--layout-region-edit-extended-width);
}/* Push sidebar down to horizontal align with form section. */
.layout-region--secondary {
grid-row: span 2;
margin-block-start: var(--space-l);
}@media (max-width: 40rem) {
.layout-form {
grid-template-columns: 1fr;
}
}
}I have tested the above solution locally, and it is working well. Please refer to the screenshot for reference.