Skip to content

Commit

Permalink
feat(thumbnail-opacity-checkboard): s2 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
cdransf committed Nov 12, 2024
1 parent 2c62239 commit 87bbb9c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-ladybugs-smile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/thumbnail": major
---

Adds thumbnail specific `--spectrum-opacity-checkerboard-size` token. This impacts the display of the `opacity-checkerboard` when used within the `thumbnail` component.
4 changes: 4 additions & 0 deletions components/thumbnail/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ governing permissions and limitations under the License.
--spectrum-thumbnail-color-opacity-disabled: var(--spectrum-thumbnail-opacity-disabled);
}

.spectrum-OpacityCheckerboard {
--spectrum-opacity-checkerboard-size: var(--spectrum-thumbnail-opacity-checkerboard-square-size);
}

.spectrum-Thumbnail--size50 {
--spectrum-thumbnail-size: var(--spectrum-thumbnail-size-50);
}
Expand Down
3 changes: 0 additions & 3 deletions components/thumbnail/stories/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ export const Template = ({
${OpacityCheckerboard({
rootClass: backgroundColor ? `${rootClass}-image-wrapper` : undefined,
customClasses: isLayer ? [`${rootClass}-layer-inner`] : !backgroundColor ? [`${rootClass}-image-wrapper`] : [],
customStyles: {
"--spectrum-opacity-checkerboard-size": "var(--spectrum-thumbnail-opacity-checkerboard-square-size)"
},
content: image ? [image] : [],
})}
</div>
Expand Down

0 comments on commit 87bbb9c

Please sign in to comment.