diff --git a/packages/core/documentation/Spacing/Spacing.tsx b/packages/core/documentation/Spacing/Spacing.tsx index 45d86a9796d..af8214b9225 100644 --- a/packages/core/documentation/Spacing/Spacing.tsx +++ b/packages/core/documentation/Spacing/Spacing.tsx @@ -31,13 +31,21 @@ const SpacingTableRow: React.FC<{ spacing: spacingClass }> = ({ spacing }) => { }; const baseFontSize = 16; // 1rem = 16px const remValue = pxValue !== "N/A" ? parseInt(pxValue) / baseFontSize : pxValue; + + // Bruker ikke useBrowserPreferences her pga sirkulær avhengighet. Ikke følg dette eksempelet! + const forcedColors = window && window.matchMedia ? window.matchMedia("(forced-colors: active)").matches : false; + return (