diff --git a/build-tools/tasks/package-json.js b/build-tools/tasks/package-json.js index 4cd2424ac2..572caef636 100644 --- a/build-tools/tasks/package-json.js +++ b/build-tools/tasks/package-json.js @@ -74,7 +74,9 @@ function getSideEffects() { '*.css', // this file exposes `awsuiVersions` object './internal/base-component/index.js', - // this file contains css-variables overrides for dark and other modes + // this file contains the base theme css-variables and overrides for dark and other modes + './internal/base-theme/styles.css.js', + // this file contains other global styles and tokens './internal/base-component/styles.css.js', ]; } diff --git a/src/internal/base-component/index.ts b/src/internal/base-component/index.ts index e574405b7e..f1d656e1b7 100644 --- a/src/internal/base-component/index.ts +++ b/src/internal/base-component/index.ts @@ -8,6 +8,7 @@ import { BaseComponentProps } from '../../types/base-component'; import { PACKAGE_SOURCE, PACKAGE_VERSION } from '../environment'; // these styles needed to be imported for every public component +import '../base-theme/styles.css.js'; import './styles.css.js'; initAwsUiVersions(PACKAGE_SOURCE, PACKAGE_VERSION); diff --git a/src/internal/base-component/styles.scss b/src/internal/base-component/styles.scss index 482f0140f8..735f6526f9 100644 --- a/src/internal/base-component/styles.scss +++ b/src/internal/base-component/styles.scss @@ -2,12 +2,6 @@ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 */ - -/* - Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - SPDX-License-Identifier: Apache-2.0 -*/ -@use 'awsui:globals'; @use '../styles/global'; @use '../generated/custom-css-properties' as custom-styles; diff --git a/src/internal/base-theme/styles.scss b/src/internal/base-theme/styles.scss new file mode 100644 index 0000000000..e8125ce8c0 --- /dev/null +++ b/src/internal/base-theme/styles.scss @@ -0,0 +1,5 @@ +/* + Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + SPDX-License-Identifier: Apache-2.0 +*/ +@use 'awsui:globals';