Skip to content

GAUD-8866 remove button scss from bsi - #7266

Open
EdwinACL831 wants to merge 6 commits into
ecollazos/GAUD-8866_remove_button_scss_from_bsifrom
ecollazos/GAUD-8866_remove_button_scss_from_bsi_2
Open

GAUD-8866 remove button scss from bsi#7266
EdwinACL831 wants to merge 6 commits into
ecollazos/GAUD-8866_remove_button_scss_from_bsifrom
ecollazos/GAUD-8866_remove_button_scss_from_bsi_2

Conversation

@EdwinACL831

@EdwinACL831 EdwinACL831 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Jira

GAUD-8866

Description

This is the second PR (here is the first one) in order to remove button.scss from BSI

Here the goal is to generate the same styles that BSI generates through sass for the .d2l-button, .vui-button, and -vui-button-primary css classes. And this PR is against the first one to clearly observe the code that will replace bsi's

The next step is to import these styles into BSI and remove the according sass file

Note: this code has a Feature Flag associated to it

@EdwinACL831
EdwinACL831 requested a review from a team as a code owner July 23, 2026 21:04
`;

// remove this variable when cleaning up GAUD-8866-remove-button-scss-from-bsi flag
const bsiButtonSassStyles = css`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the fallback for the FF (the current generated styles from sass in bsi)

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/core/pr-7266/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

}
`;

const bsiD2lButtonStyles = css`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are the styles related to d2l-button. This one is the one where I could reuse some of the styles from our button component

`;
}

function _generateVuiButtonStyles(selector) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generator function is basically the mixin from sass. I'm not a big fan of this approach but I think it is much riskier to try to generate this styles using the generator functions above. This is because there are selectors specific to .vui-button and .vui-button-primary so it is hard to abstract them into a reusable generator, plus there are some style values that change based on the selector so another layer of complexity.

However, If you have any suggestion or proposal for this to approach it in a better way, I would be more than happy to look into it, cause as I said, I am not a big fan of this one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not really super fan of "vui", "bsi", and "sass" creeping their way into core itself.

Where/how much are these vui specific selectors used? Maybe it would be possible to do some clean-up to eliminate the need for them, to allow a cleaner adoption of the core button styles.

My ideal end state is LMS using the button component. My second-most ideal end-state would be the LMS buttons using the exact same selectors and styles as the core web component. I know that might take a couple more steps to put ourselves into a position where that's possible, but... what would it take for that to be possible?

…collazos/GAUD-8866_remove_button_scss_from_bsi_2
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.

2 participants