Skip to content

Commit

Permalink
fix: support non-flat "color" application
Browse files Browse the repository at this point in the history
  • Loading branch information
Westbrook committed Apr 6, 2023
1 parent fe316a3 commit efc0159
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/swatch/src/swatch.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,23 @@ governing permissions and limitations under the License.
*/

@import './spectrum-swatch.css';

/**
* Begin work around for https://github.com/adobe/spectrum-css/issues/1460
*/

.fill:before {
background: var(--spectrum-picked-color, transparent);
}

:host([border='none']) .fill:before {
background: var(--spectrum-picked-color, transparent);
}

:host .is-image .fill:before {
background: #0000;
}

/**
* End workaround for https://github.com/adobe/spectrum-css/issues/1460
*/
4 changes: 4 additions & 0 deletions packages/swatch/stories/swatch.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ const template = ({
};

export const Default = (args: Properties): TemplateResult => template(args);
export const gradient = (args: Properties): TemplateResult => template(args);
gradient.args = {
color: 'linear-gradient(90deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 35%, rgba(0,212,255,1) 100%)',
};
export const mixedValue = (args: Properties): TemplateResult => template(args);
mixedValue.args = {
mixedValue: true,
Expand Down

0 comments on commit efc0159

Please sign in to comment.