diff --git a/src/pages/sandbox.css b/src/pages/sandbox.css index 6e7b3957..2aa66a66 100644 --- a/src/pages/sandbox.css +++ b/src/pages/sandbox.css @@ -56,6 +56,18 @@ align-items: safe center; justify-content: center; overflow-anchor: auto; + position: relative; + + container: preview / inline-size; + @container preview (inline-size > 400px) { + &.narrow { + > [class^='status-'], + > .status, + > *:not(.status-card-link, [class^='status-']) > .status { + max-width: 320px !important; + } + } + } > [class^='status-'], > .status, @@ -235,6 +247,13 @@ color: var(--text-insignificant-color); } + .toggle-display { + display: none; + @media (width > calc(400px + 320px)) { + display: block; + } + } + footer { margin-top: 2em; border-top: 1px solid var(--divider-color); diff --git a/src/pages/sandbox.jsx b/src/pages/sandbox.jsx index 29b8dd17..2bc5edeb 100644 --- a/src/pages/sandbox.jsx +++ b/src/pages/sandbox.jsx @@ -314,6 +314,7 @@ const INITIAL_STATE = { mediaPreference: 'default', expandWarnings: false, contextType: 'none', // Default context type + displayStyle: 'adaptive', // Display style for preview }; export default function Sandbox() { @@ -708,7 +709,7 @@ export default function Sandbox() {