From 7803f87805b23620fb5e48295447038b25923555 Mon Sep 17 00:00:00 2001 From: Trevor Burnham Date: Thu, 13 Aug 2026 21:32:07 -0400 Subject: [PATCH] fix: Declare the SCSS license headers with line comments Sass copies loud comments into the compiled CSS, so the header of a partial is emitted once per stylesheet that @uses it. Both of these files are consumed that way: they are copied into lib and exported as the sass/style entry points for @cloudscape-design/components and its siblings. Declaring the header with line comments keeps the notice in the shipped source while keeping it out of consumers' compiled output. Measured against cloudscape-design/components, this removes 16.5 KB of duplicated comments from its 1770 KB of published CSS and takes the median from two license blocks per stylesheet down to one. Neither file is compiled to CSS in this repo, and both already use line comments throughout their bodies. Refs cloudscape-design/components#4905. --- src/internal/focus-visible/index.scss | 6 ++---- src/internal/style-api/index.scss | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/internal/focus-visible/index.scss b/src/internal/focus-visible/index.scss index 03307d8..1adf317 100644 --- a/src/internal/focus-visible/index.scss +++ b/src/internal/focus-visible/index.scss @@ -1,7 +1,5 @@ -/* - 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 // mixin to apply styles only when keyboard focus is needed // requires JavaScript part from useFocusVisible hook to be applied diff --git a/src/internal/style-api/index.scss b/src/internal/style-api/index.scss index 8ed72f0..7be1d3b 100644 --- a/src/internal/style-api/index.scss +++ b/src/internal/style-api/index.scss @@ -1,7 +1,5 @@ -/* - 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 'sass:map'; @use 'sass:list';