Skip to content

Commit 37a6f2c

Browse files
committed
feat(colorslider): s2 migration
1 parent 213f61b commit 37a6f2c

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.changeset/serious-clouds-jam.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
"@spectrum-css/colorslider": minor
3+
---
4+
5+
# S2 colorslider migration
6+
7+
This migrates the `colorslider` component to S2. Custom properties have been remapped per the design spec.
8+
9+
| Before | After |
10+
| ------------------------- | -------------------------- |
11+
| `--spectrum-gray-900-rgb` | `--spectrum-gray-1000-rgb` |

components/colorslider/index.css

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* Copyright 2023 Adobe. All rights reserved.
3-
*
2+
* Copyright 2024 Adobe. All rights reserved.
3+
*
44
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License. You may obtain a copy
66
* of the License at <http://www.apache.org/licenses/LICENSE-2.0>
7-
*
7+
*
88
* Unless required by applicable law or agreed to in writing, software distributed under
99
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1010
* OF ANY KIND, either express or implied. See the License for the specific language
@@ -16,7 +16,7 @@
1616
--spectrum-color-slider-handle-margin-block: var(--spectrum-component-top-to-text-75);
1717

1818
/* @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(). */
19-
--spectrum-color-slider-border-color-rgba: rgba(var(--spectrum-gray-900-rgb), var(--spectrum-color-slider-border-opacity));
19+
--spectrum-color-slider-border-color-rgba: rgba(var(--spectrum-gray-1000-rgb), var(--spectrum-color-slider-border-opacity));
2020

2121
/* Checkerboard pattern */
2222
--spectrum-color-slider-checkerboard-size: var(--spectrum-opacity-checkerboard-square-size);
@@ -74,11 +74,6 @@
7474
inset-inline-start: 50%;
7575
inset-block-start: 0;
7676
}
77-
78-
.spectrum-ColorSlider-handle {
79-
inset-inline-start: 50%;
80-
inset-block-start: 0;
81-
}
8277
}
8378

8479
.spectrum-ColorSlider-handle {

0 commit comments

Comments
 (0)