Skip to content

Commit

Permalink
feat(colorslider): s2 migration
Browse files Browse the repository at this point in the history
  • Loading branch information
cdransf committed Dec 17, 2024
1 parent 69cb1b9 commit ff4309f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .changeset/serious-clouds-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@spectrum-css/colorslider": minor
---

# S2 colorslider migration

This migrates the `colorslider` component to S2. Custom properties have been remapped per the design spec.

| Before | After |
| ------------------------- | -------------------------- |
| `--spectrum-gray-900-rgb` | `--spectrum-gray-1000-rgb` |
13 changes: 4 additions & 9 deletions components/colorslider/index.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* Copyright 2023 Adobe. All rights reserved.
*
* Copyright 2024 Adobe. All rights reserved.
*
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at <http://www.apache.org/licenses/LICENSE-2.0>
*
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
Expand All @@ -16,7 +16,7 @@
--spectrum-color-slider-handle-margin-block: var(--spectrum-component-top-to-text-75);

/* @todo Refactor with --spectrum-color-slider-border-color once gray rgb token is no longer necessary to workaround nested rgb color token value using rgba(). */
--spectrum-color-slider-border-color-rgba: rgba(var(--spectrum-gray-900-rgb), var(--spectrum-color-slider-border-opacity));
--spectrum-color-slider-border-color-rgba: rgba(var(--spectrum-gray-1000-rgb), var(--spectrum-color-slider-border-opacity));

/* Checkerboard pattern */
--spectrum-color-slider-checkerboard-size: var(--spectrum-opacity-checkerboard-square-size);
Expand Down Expand Up @@ -74,11 +74,6 @@
inset-inline-start: 50%;
inset-block-start: 0;
}

.spectrum-ColorSlider-handle {
inset-inline-start: 50%;
inset-block-start: 0;
}
}

.spectrum-ColorSlider-handle {
Expand Down

0 comments on commit ff4309f

Please sign in to comment.