Conversation
- Flattened the `v2/` directory structure into `styles/` for clearer import paths. - Consolidated dual-variable system into a single source of truth in `utils/_properties.scss`. - Co-located component styles next to their respective React components, enhancing maintainability. - Removed legacy v1 root files and dead code, including unused styles and imports. - Moved accessibility styles to `utils/_accessibility.scss` for better organization. - Updated imports across components to reflect new file structure. - Added new SCSS files for loading and waiting components in their respective directories.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request is a major refactor of the CSS architecture for the
@cdc/corestyle system. The changes aim to modernize, simplify, and clarify the structure and ownership of styles across the monorepo. The refactor was carried out in four phases: flattening directory structures, consolidating variables, co-locating component styles, and dissolving legacy files. It also introduces Stylelint for consistent code quality. The most important changes are summarized below.CSS architecture and directory restructuring:
styles/v2/directory structure intostyles/, updating all import paths and deleting the obsoletev2/directory. This removes unnecessary version coupling and makes import paths clearer.accordion.scss,button.scss,card.scss, and others fromstyles/components/to their respective component directories. All consuming files now import styles via relative paths, and the oldstyles/components/directory was deleted.Variable system consolidation:
styles/utils/_properties.scss, and updated all imports to use this unified source of truth. This eliminates duplication and confusion between v1 and v2 variables.button.scss,editor.scss, etc.) to use CSS custom properties withvar(--...)instead of SCSS variables, ensuring consistency and easier theming. [1] [2] [3] [4] [5] [6] F77db3a3L1, [7] [8] [9] [10] [11] [12] [13]Legacy file cleanup and import updates:
$thememap,.loaderclass, and duplicate imports incove-main.scss. Extracted Bootstrap-compat shims and restored scoped resets to prevent style bleed.Component style import updates:
Button.jsx,Card.jsx,Loading.jsx,Waiting.tsx, etc.) to import their styles from co-located paths instead of the old global styles directory. [1] [2] [3] [4]Stylelint integration:
These changes collectively improve maintainability, clarity, and scalability of the style system, making it easier for developers to locate, update, and own styles for each component.