.popup { width: 304px; max-width: calc(100vw - 12px); max-height: calc(100vh - 12px); overflow: auto; } .opaque .control:global(.react-colorful) { grid-template-rows: var(--saturation-height) 48px; } .opaque .control :global(.react-colorful__hue) { align-self: center; } .opaque .fields { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(78px, 1.65fr); } .pickerArea { position: relative; } .control:global(.react-colorful) { --saturation-height: clamp(104px, 36vh, 152px); display: grid; grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: var(--saturation-height) 24px 24px; align-items: center; width: 100%; height: auto; border-radius: 0; } .control :global(.react-colorful__saturation) { grid-column: 1 / -1; grid-row: 1; align-self: stretch; overflow: hidden; border-radius: 0; } .control :global(.react-colorful__hue), .control :global(.react-colorful__alpha) { grid-column: 2; height: 12px; margin-inline-end: var(--space-3); border-radius: var(--radius-small); } .control :global(.react-colorful__hue) { grid-row: 2; } .control :global(.react-colorful__alpha) { grid-row: 3; } .control :global(.react-colorful__hue-pointer), .control :global(.react-colorful__alpha-pointer) { width: var(--h-control-small); height: var(--h-control-small); } .sampleRow { position: absolute; left: 0; bottom: 0; display: flex; align-items: center; gap: var(--space-2); width: 88px; height: 48px; padding-inline: var(--space-2); } .preview { width: 32px; height: 32px; border: 1px solid var(--border-strong); border-radius: 50%; overflow: hidden; background: conic-gradient(var(--fg-muted) 25%, var(--bg-input) 0 50%, var(--fg-muted) 0 75%, var(--bg-input) 0); background-size: 10px 10px; } .preview span { display: block; width: 100%; height: 100%; } .fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(78px, 1.65fr); gap: var(--space-1); padding-inline: var(--space-3); } .field { min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); color: var(--fg-muted); font-size: var(--fs-small); text-align: center; } .field input { width: 100%; min-width: 0; height: var(--h-control); border: 1px solid var(--border-input, var(--border)); border-radius: var(--radius-small); padding: 0 3px; background: var(--bg-input); color: var(--fg-strong); font-family: inherit; font-size: var(--fs-ui); font-variant-numeric: tabular-nums; text-align: center; outline: none; } .field input:focus { border-color: var(--focus-ring); } .field input[aria-invalid="true"] { border-color: var(--danger); } .actions { position: sticky; bottom: 0; z-index: 1; display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-2) var(--space-3) var(--space-3); background: var(--bg-popup); } .recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(24px, 1fr)); justify-items: center; gap: var(--space-1); margin: var(--space-2) var(--space-3) 0; padding-top: var(--space-2); border-top: 1px solid var(--border); } .recentColor { width: 24px; height: 24px; border: 1px solid var(--border-strong); border-radius: var(--radius-small); padding: 0; overflow: hidden; background: conic-gradient(var(--fg-muted) 25%, var(--bg-input) 0 50%, var(--fg-muted) 0 75%, var(--bg-input) 0); background-size: 10px 10px; } .recentColor[aria-pressed="true"], .recentColor:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 1px; } .recentColor span { display: block; width: 100%; height: 100%; }