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

[Swatch] background-color prevents gradients from the outside

Open Westbrook opened this issue 3 years ago • 2 comments

https://github.com/adobe/spectrum-css/blob/ed6a68d0dd209ee0c993de10367789aab27151fe/components/swatch/index.css#L225

As seen in https://opensource.adobe.com/spectrum-css/swatch.html#gradient this statement requires that swatches representing non-flat colors have their internals reached into in order to prevent the value of the swatch to users. If this was background instead, it should support both use cases.

synced to jira: https://jira.corp.adobe.com/browse/CSS-204

Westbrook avatar Jun 27 '22 13:06 Westbrook

@Westbrook Just wanted to follow-up and make sure this was addressed in the most recent updates to Swatch before I close out this ticket. Thank you!

castastrophe avatar Feb 27 '24 18:02 castastrophe

I don't currently see this working in the CSS docs site with the following code:

<div class="spectrum-Swatch spectrum-Swatch--sizeM" tabindex="0" style="--spectrum-picked-color: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);">
  <div class=" spectrum-OpacityCheckerboard spectrum-Swatch-fill">
    
  </div>
</div>

Westbrook avatar Feb 27 '24 18:02 Westbrook