BaseControl: Use CSS-in-JS #25842
Merged
BaseControl: Use CSS-in-JS #25842
Conversation
sarayourfriend
requested review from
ajitbohra,
chrisvanpatten and
youknowriad
as
code owners
Oct 5, 2020
sarayourfriend
changed the title
Refactor/use css in js for base control
BaseControl: Use CSS-in-JS
Oct 5, 2020
sarayourfriend
force-pushed the
sarayourfriend:refactor/use-css-in-js-for-base-control
branch
2 times, most recently
Oct 8, 2020
It looks like this is the start of a collection of The snapshot changes make sense, as I think we may need to rebase + regenerate a snapshot, and we should be good |
sarayourfriend
force-pushed the
sarayourfriend:refactor/use-css-in-js-for-base-control
branch
to
Oct 9, 2020
2d33ec7
6 tasks done
1 task
@@ -1,6 +1,5 @@ | |||
@import "./animate/style.scss"; | |||
@import "./autocomplete/style.scss"; | |||
@import "./base-control/style.scss"; |
talldan
Mar 4, 2021
Contributor
@sarayourfriend Was just making some changes to BaseControl and wondering if the style.scss file should be deleted as well, or do we keep it around for some back compat purposes?
@sarayourfriend Was just making some changes to BaseControl and wondering if the style.scss file should be deleted as well, or do we keep it around for some back compat purposes?
sarayourfriend
Mar 4, 2021
Author
Contributor
@talldan It should be deleted, that was an oversight on my part, sorry about that! Thanks for catching it 🙂
@talldan It should be deleted, that was an oversight on my part, sorry about that! Thanks for catching it
sarayourfriend
deleted the
sarayourfriend:refactor/use-css-in-js-for-base-control
branch
Mar 4, 2021
7 tasks done
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
sarayourfriend commentedOct 5, 2020
•
edited
Description
This PR updates the
BaseControl
component to use CSS-in-JS similar to how newer components do like theAnglePickerControl
andText
. This should not include any breaking changes as all the old classnames are still being rendered so consumers may still easily target those components.I also updated the story to use the
TextareaControl
component rather than araw
textarea.This also introduces a new style-mixin called
font
. I'm just guessing at this part @ItsJonQ might have some good input.How has this been tested?
I've tested the changes in Storybook and have confirmed there are no visual changes between the two versions.
One thing that is not tested is the
components-panel__row
rule. I'm unsure how to test this.Screenshots
Storybook before
Storybook after
Types of changes
Non-breaking CSS-in-JS usage instead of Sass.
Checklist: