GAUD-8866 remove button scss from bsi - #7266
Conversation
…cusRingStyles. They are included by default
| `; | ||
|
|
||
| // remove this variable when cleaning up GAUD-8866-remove-button-scss-from-bsi flag | ||
| const bsiButtonSassStyles = css` |
There was a problem hiding this comment.
This is the fallback for the FF (the current generated styles from sass in bsi)
|
Thanks for the PR! 🎉 We've deployed an automatic preview for this PR - you can see your changes here:
Note The build needs to finish before your changes are deployed. |
| } | ||
| `; | ||
|
|
||
| const bsiD2lButtonStyles = css` |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Jira
GAUD-8866
Description
This is the second PR (here is the first one) in order to remove
button.scssfrom BSIHere the goal is to generate the same styles that BSI generates through sass for the
.d2l-button, .vui-button, and -vui-button-primarycss classes. And this PR is against the first one to clearly observe the code that will replace bsi'sThe 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