spectrum-css icon indicating copy to clipboard operation
spectrum-css copied to clipboard

Color Handle delivery sensitive to CSS inclusion order.

Open Westbrook opened this issue 2 years ago • 1 comments

The mark up for a Color Handle is as follows:

<div class="spectrum-ColorHandle spectrum-OpacityCheckerboard" is-disabled" style="--spectrum-picked-color: rgba(255, 0, 0, 0.5); position: absolute; inset-block: 50%; inset-inline: 50%">
  <div class="spectrum-ColorHandle-inner"></div>
</div>

With both the spectrum-ColorHandle and the spectrum-OpacityCheckerboard classes applied to the host element the rules within those selectors will race depending on how CSS is deployed in a consuming application. Specifically, the size rules for .spectrum-OpacityCheckerboard:

.spectrum-OpacityCheckerboard {
    inline-size: 100%;
    block-size: 100%;
}

Can overwright those of .spectrum-ColorHandle:

.spectrum-ColorHandle {
    inline-size: var(--mod-colorhandle-size, var(--spectrum-colorhandle-size));
    block-size: var(--mod-colorhandle-size, var(--spectrum-colorhandle-size));
}

Westbrook avatar Sep 01 '23 13:09 Westbrook

Tracking this in Jira here: https://jira.corp.adobe.com/browse/CSS-587

pfulton avatar Sep 05 '23 18:09 pfulton

This appears to be resolved with the latest code.

castastrophe avatar Dec 10 '24 22:12 castastrophe