Skip to content

Commit d6de839

Browse files
authored
feat(asset,cyclebutton,quickaction,site): deprecate skin.css assets (#2438)
1 parent 60b44bb commit d6de839

File tree

11 files changed

+129
-181
lines changed

11 files changed

+129
-181
lines changed

components/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,12 @@ Each component has the following files:
1313
- `themes/*.css` - The theme-specific styles for the component.
1414
- `stories/*.stories.js` and `stories/template.js` - The storybook assets for rendering components in the Storybook tool and eventually to be used for visual regression testing.
1515

16-
The following asset will only be seen in legacy components that have not yet migrated to the new tokens system:
17-
18-
- `skin.css` - The theme-specific styles for the component: colors, box-shadows, etc (these change between color stops)
19-
2016
See [documentation generation](/tools/bundle-builder/docs/README.md) documentation for more information on the properties available within the `.yml` files.
2117

2218
## Editing an existing component
2319

2420
1. Run `gulp dev` in the root of the project to begin developing.
25-
2. Edit `components/$COMPONENT/index.css` and `components/$COMPONENT/skin.css` with dimensions and color properties respectively. The documentation will live reload with your changes.
21+
2. Edit `components/$COMPONENT/index.css` with dimensions and color properties. The documentation will live reload with your changes.
2622
3. Edit the markup examples within `components/$COMPONENT/metadata/*.yml`. The documentation will live reload with your changes.
2723

2824
## Adding a new component

components/asset/index.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,23 @@ governing permissions and limitations under the License.
3333
max-inline-size: var(--spectrum-asset-icon-max-width);
3434
margin: var(--spectrum-asset-icon-margin);
3535
}
36+
37+
.spectrum-Asset-folderBackground {
38+
fill: var(--highcontrast-asset-folder-background-color, var(--spectrum-asset-folder-background-color));
39+
}
40+
41+
.spectrum-Asset-fileBackground {
42+
fill: var(--highcontrast-asset-file-background-color, var(--spectrum-asset-file-background-color));
43+
}
44+
45+
.spectrum-Asset-folderOutline,
46+
.spectrum-Asset-fileOutline {
47+
fill: var(--spectrum-asset-icon-outline-color);
48+
}
49+
50+
@media (forced-colors: active) {
51+
.spectrum-Asset {
52+
--highcontrast-asset-folder-background-color: currentColor;
53+
--highcontrast-asset-file-background-color: currentColor;
54+
}
55+
}

components/asset/skin.css

Lines changed: 0 additions & 31 deletions
This file was deleted.

components/asset/stories/template.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { classMap } from "lit/directives/class-map.js";
33
import { ifDefined } from "lit/directives/if-defined.js";
44

55
import "../index.css";
6-
import "../skin.css";
76

87
export const Template = ({
98
rootClass = "spectrum-Asset",

components/cyclebutton/skin.css

Lines changed: 0 additions & 11 deletions
This file was deleted.

components/quickaction/index.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,11 @@ governing permissions and limitations under the License.
5454
@inherit: %spectrum-overlay--right--open; /* should animate to the right when aligned left */
5555
}
5656
}
57+
58+
.spectrum-QuickActions-overlay {
59+
background-color: var(--spectrum-quickactions-overlay-color);
60+
}
61+
62+
.spectrum-QuickActions {
63+
background-color: var(--spectrum-quickactions-background-color);
64+
}

components/quickaction/skin.css

Lines changed: 0 additions & 19 deletions
This file was deleted.

components/quickaction/stories/template.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { ifDefined } from "lit/directives/if-defined.js";
55
import { Template as ActionButton } from "@spectrum-css/actionbutton/stories/template.js";
66

77
import "../index.css";
8-
import "../skin.css";
98

109
export const Template = ({
1110
rootClass = "spectrum-QuickActions",

components/site/index.css

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,3 +647,102 @@ governing permissions and limitations under the License.
647647
border-block: 2px solid rgba(0, 0, 0, 0);
648648
background-clip: padding-box;
649649
}
650+
651+
.spectrum-Site {
652+
/* .spectrum-Site */
653+
--spectrum-site-background-color: var(--spectrum-global-color-gray-75);
654+
--spectrum-site-content-background-color: var(--spectrum-global-color-gray-50);
655+
--spectrum-site-header-border-color: var(--spectrum-global-color-gray-300);
656+
--spectrum-site-header-background-color: var(--spectrum-site-content-background-color);
657+
--spectrum-site-sidebar-background-color: var(--spectrum-site-background-color);
658+
--spectrum-site-scrollbar-track-color: var(--spectrum-site-background-color);
659+
--spectrum-site-scrollbar-thumb-color: var(--spectrum-global-color-gray-400);
660+
661+
/* .spectrum-Site-overlay */
662+
--spectrum-site-overlay-underlay-background-color: rgba(0, 0, 0, 0.2);
663+
664+
/* .spectrum-CSSExample */
665+
--spectrum-cssexample-markup-background-color: var(--spectrum-global-color-gray-75);
666+
--spectrum-cssexample-border-color: var(--spectrum-global-color-gray-100);
667+
}
668+
669+
/* Site */
670+
.spectrum-Site {
671+
background-color: var(--spectrum-site-content-background-color);
672+
}
673+
674+
.spectrum-Site-header {
675+
border-block-end-color: var(--spectrum-site-header-border-color);
676+
background-color: var(--spectrum-site-header-background-color);
677+
}
678+
679+
.spectrum-Site-sideBar {
680+
background-color: var(--spectrum-site-sidebar-background-color);
681+
}
682+
683+
.spectrum-Site-mainContainer {
684+
background: var(--spectrum-site-content-background-color);
685+
}
686+
687+
.spectrum-Site-overlay {
688+
background: var(--spectrum-site-overlay-underlay-background-color);
689+
}
690+
691+
.spectrum-CSSComponent-resource--github {
692+
background-color: rgba(0, 0, 0, 0.1) !important;
693+
color: black;
694+
}
695+
696+
.spectrum-CSSComponent-resource--adobe {
697+
color: #FA0F00 !important;
698+
background-color: var(--spectrum-global-color-gray-100) !important;
699+
}
700+
701+
/* Scrollable */
702+
.u-scrollable::-webkit-scrollbar-track,
703+
.u-scrollable::-webkit-scrollbar-track-piece {
704+
background: var(--spectrum-site-scrollbar-track-color);
705+
}
706+
707+
.u-scrollable::-webkit-scrollbar-thumb {
708+
background-color: var(--spectrum-site-scrollbar-track-color);
709+
}
710+
711+
.u-scrollable:hover::-webkit-scrollbar-thumb {
712+
background-color: var(--spectrum-site-scrollbar-thumb-color);
713+
}
714+
715+
/* CSS Example */
716+
.spectrum-CSSExample-example {
717+
background-color: var(--spectrum-alias-background-color-default, var(--spectrum-global-color-gray-100));
718+
}
719+
720+
.spectrum-CSSExample-markup {
721+
border-block-start: 1px solid var(--spectrum-cssexample-border-color);
722+
723+
background: var(--spectrum-cssexample-markup-background-color);
724+
}
725+
726+
.spectrum-CSSExample-markupToggle {
727+
z-index: 1;
728+
729+
background: var(--spectrum-cssexample-markup-background-color);
730+
}
731+
732+
.spectrum-CSSExample-markup.is-open .spectrum-CSSExample-markupToggle {
733+
background-color: transparent;
734+
}
735+
736+
.spectrum-CSSExample-example--overlay {
737+
background: rgba(0,0,0,0.4);
738+
color: rgba(0,0,0,0.4);
739+
}
740+
741+
.spectrum-CSSExample-oldAPI {
742+
color: var(--spectrum-semantic-negative-text-color-small);
743+
}
744+
745+
.spectrum-CodeBlock {
746+
border-color: var(--spectrum-global-color-gray-400);
747+
background-color: var(--spectrum-global-color-gray-75);
748+
}

components/site/skin.css

Lines changed: 0 additions & 110 deletions
This file was deleted.

0 commit comments

Comments
 (0)