-
Notifications
You must be signed in to change notification settings - Fork 0
feat: cleanup Carbon override stylesheet #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Please check the sample `main.tsx` file for a React application: | ||
| - In your project, create a new folder called `styles` under `src` | ||
| - Copy the `assets/font` folder to the `styles` folder | ||
| - Copy the `design-tokens` folder to the `styles` folder | ||
| - Copy the `style-sheets/overrides.scss` file to the `styles` folder. The `styles` folder should look like  | ||
| - Import the `overrides.scss` file into your `main.tsx` | ||
| - Config the theme in `main.tsx` and use "SideNav" and "Content" component to apply the layout | ||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we still publishing this on npm?
Copying files from the npm package is not maintainable. Use SCSS @use to import styles and tokens directly from the package so updates are managed via npm and manual copying is avoided. Recommend updating the docs to reflect this. The code may also need changes to support direct SCSS imports from the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Craig, I think we're not allowed to publish npm packages anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.npmjs.com/package/@bcgov/bc-sans
look what i found 😆 do they really care about this rule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Carbon override stylesheet to improve organization and maintainability. The cleanup includes grouping styles by component, adding descriptive comments for each section, and reorganizing the code structure without making any functional style changes.
- Regrouped CSS overrides by Carbon component type with clear section headers
- Added detailed comments explaining the styling changes for each component
- Updated font file paths to use newer BC Sans font variants with light weight support
Reviewed Changes
Copilot reviewed 3 out of 16 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| style-sheets/overrides.scss | Complete reorganization of CSS overrides with component-based grouping and comprehensive commenting |
| design-tokens/type-family.scss | Updated font file paths and added light font weight support |
| README.md | Added new React usage documentation with code examples |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Following the documentation in this issue, I cleaned up the existing Carbon override stylesheet, regrouped the style changes by component, and added comments for each section. There was no style change, just cleanup and refactoring.