/** Credits to Stephanie Eckles
* https://moderncss.dev/12-modern-css-one-line-upgrades
/* Optional: constrain image size */
/* Optional: constrain image size */
/** Stable Enhancements */
/** text-underline-offset */
text-underline-offset: 0.25em;
* outlines are not computed as part of the element’s box size, so
* increasing the distance will not increase the amount of space an element
* occupies. This is similar to how box-shadow is rendered without impacting the
outline: 2px dashed blue;
outline-offset: var(--outline-offset, 0.5em);
/** scroll-margin-top/bottom */
/* Update --scroll-margin with JS if needed */
scroll-margin-top: var(--scroll-margin, 2rem);
/** color-scheme & accent-color */
color-scheme: dark light;
/** width: fit-content */
inline-size: fit-content;
/** Progressive Enhancements */
/** overscroll-behavior */
overscroll-behavior: contain;
:is(h1, h2, h3, h4, .text-balance) {
/* Consider which element this applies to... */
/* From https://moderncss.dev/12-modern-css-one-line-upgrades/#scrollbar-gutter
In some scenarios, the appearance or disappearance of scrollbars can cause an
unwanted layout shift. For example, when a dialog overlay is displayed and the
background page adds overflow: hidden to prevent scrolling, causing a shift from
removing the no longer needed scrollbars.
The modern CSS property scrollbar-gutter enables a reservation of space for
scrollbars in the layout, which prevents that undesirable shift. When there’s no
need for a scrollbar, the browser will still paint a gutter as extra space
created in addition to any padding on the scroll container.
scrollbar-gutter: stable both-edges;