diff --git a/showcase/app/components/mock/theming/basic-container.gts b/showcase/app/components/mock/theming/basic-container.gts new file mode 100644 index 00000000000..f758f39e400 --- /dev/null +++ b/showcase/app/components/mock/theming/basic-container.gts @@ -0,0 +1,25 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +import Component from '@glimmer/component'; + +interface MockThemingBasicContainerSignature { + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} + +export default class MockThemingBasicContainer extends Component { + +} diff --git a/showcase/app/styles/app.scss b/showcase/app/styles/app.scss index 6b721b362ff..b5fe7f85176 100644 --- a/showcase/app/styles/app.scss +++ b/showcase/app/styles/app.scss @@ -26,6 +26,7 @@ @use "./showcase-components/placeholder"; @use "./showcase-components/theme-switcher"; @use "./mock-components/app"; +@use "./mock-components/theming/basic-container"; // Notice: this list can be automatically edited by the Ember blueprint, please don't remove the start/end comments diff --git a/showcase/app/styles/mock-components/theming/basic-container.scss b/showcase/app/styles/mock-components/theming/basic-container.scss new file mode 100644 index 00000000000..a0f39626ec9 --- /dev/null +++ b/showcase/app/styles/mock-components/theming/basic-container.scss @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +.mock-theming-basic-container { + display: flex; + align-items: center; + justify-content: center; + width: fit-content; + min-width: 120px; + min-height: 120px; + padding: 50px; + color: var(--token-color-foreground-strong); + font-weight: bold; + font-size: 10px; + font-family: monaco, Consolas, "Lucida Console", monospace; + line-height: 1.2; + background-color: var(--token-color-surface-strong); +} diff --git a/showcase/app/styles/showcase-pages/theming.scss b/showcase/app/styles/showcase-pages/theming.scss index d8f0cc07103..ad58aa54fc2 100644 --- a/showcase/app/styles/showcase-pages/theming.scss +++ b/showcase/app/styles/showcase-pages/theming.scss @@ -3,52 +3,6 @@ * SPDX-License-Identifier: MPL-2.0 */ -// TYPOGRAPHY +// THEMING -body.foundations-theming { - .shw-theming-demo-container { - display: flex; - align-items: center; - justify-content: center; - width: fit-content; - min-width: 120px; - min-height: 120px; - padding: 50px; - color: var(--shw-test-theme-foreground-color); - font-weight: bold; - font-size: 10px; - font-family: monaco, Consolas, "Lucida Console", monospace; - line-height: 1.2; - background-color: var(--shw-test-theme-background-color); - } - - .shw-theming-demo-container--class { - color: var( - --shw-test-theme-class-foreground-color, - var(--shw-test-theme-foreground-color) - ); - background-color: var( - --shw-test-theme-class-background-color, - var(--shw-test-theme-background-color) - ); - } - - .shw-theming-demo-container--data { - color: var( - --shw-test-theme-data-foreground-color, - var(--shw-test-theme-foreground-color) - ); - background-color: var( - --shw-test-theme-data-background-color, - var(--shw-test-theme-background-color) - ); - } - - .shw-theming-container-background-light { - background-color: #fff; - } - - .shw-theming-container-background-dark { - background-color: #000; - } -} +// body.foundations-theming {} diff --git a/showcase/app/templates/foundations/theming/index.hbs b/showcase/app/templates/foundations/theming/index.hbs index bd176b266f7..6332f921d7e 100644 --- a/showcase/app/templates/foundations/theming/index.hbs +++ b/showcase/app/templates/foundations/theming/index.hbs @@ -18,20 +18,15 @@ Page-level theming - - - prefers-color-scheme -
TEXT
-
- - body.theme class -
TEXT
-
- - body[data-theme] attribute -
TEXT
-
-
+ + + Container with color + foreground-strong + / background + surface-strong + + + @@ -39,15 +34,15 @@ - .theme-light class -
-
TEXT
+ .hds-theme-light class +
+
- .theme-dark class -
-
TEXT
+ .hds-theme-dark class +
+
@@ -56,66 +51,57 @@ - .theme-light > .theme-dark -
-
-
-
- TEXT -
+ .hds-theme-light > .hds-theme-dark +
+ +
+
-
+
- .theme-dark > .theme-light -
-
-
-
- TEXT -
+ .hds-theme-dark > .hds-theme-light +
+ +
+
-
+
- .theme-dark > .theme-light > .theme-dark -
-
-
-
-
-
- TEXT -
+ .hds-theme-dark + > + .hds-theme-light + > + .hds-theme-dark +
+ +
+ +
+
-
+
-
+
- + - Components +{{! For some reason, Ember tests don't play well with iframes (URL not found) so we don't snapshots them in Percy }} +
+ - - -
- - - - - v.2.0 - - - Product Name - - -
-
-
+ Demo +
\ No newline at end of file