GAUD-8866 remove button scss from bsi - #7254
Conversation
|
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. |
23ef02c to
65c7403
Compare
54e3564 to
65c7403
Compare
…les functions and use them in the d2l-button component
…ating button focus styles
…2l-button to use it
…l-button to use it
There was a problem hiding this comment.
I think would be better if you use the split view so you can see what was replaced by what
| selector = unsafeCSS(selector.trim()); | ||
|
|
||
| return css` | ||
| /* Firefox includes a hidden border which messes up button dimensions */ |
There was a problem hiding this comment.
Lots of generator methods. Was hoping core would just have two - one for the base styles (defined in the mixin), and another for the d2l-button styles.
Can this be combined with the template immediately above?
There was a problem hiding this comment.
So I have done the following:
- I am not exposing them any more
- I am calling them within the
_generateButtonStylesfunction - I am only exposing the
_generateButtonStylesfunction to generate d2l-button specific styles.
I need these private functions later in order to generate the BSI styles reusing their logic (here is the PR for that, but this one must be merged first)
| `; | ||
| } | ||
|
|
||
| export function _generateButtonDisabledStyles(selector, isForBsi = false) { |
There was a problem hiding this comment.
Same thing here - do we need to support a special generator just for the disabled styles?
The BSI aspect creeping in here isn't great. If we really need to distinguish the context, I think we can make it more meaningful by naming it something like hasHost or forWebComponent.
There was a problem hiding this comment.
Thanks for the feedback....it's been a while since reviewing this so I will come up if some updates trying to put all together into a single generator function (2 tops as you suggested).
There was a problem hiding this comment.
The deletes styles from this component are now being generated using the _generateButtonStyles('button') (line 10) function and also I use an alias (buttonStyles as baseButtonStyles) to be more accurate about each style
Jira
GAUD-8866
Description
Extracts and encapsulates button styles that will be used in BSI into functions, in order to replace BSI's sass code and instead use the generator functions so there is only one source of truth