Skip to content

Conversation

@MCatherine1994
Copy link
Collaborator

@MCatherine1994 MCatherine1994 commented Sep 9, 2025

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.

Comment on lines +23 to +30
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 ![styles folder image](./assets/images/react-styles-folder-sample.png)
- 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
```
Copy link
Collaborator

@craigyu craigyu Sep 15, 2025

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator

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?

@craigyu craigyu requested a review from Copilot September 18, 2025 22:01
Copy link

Copilot AI left a 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.

@craigyu craigyu self-requested a review September 18, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants