-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial Conversion of SCSS to CSS #5375
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: b91b8a2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left a couple of comment about some opportunities we have to clean up the variable usage in the CSS.
With the ButtonGroup I can see the a CSS module but a SCSS module deletion in the PR diff / an update to the CSS import.
Ooo, also I'd checkout the UI tests for the Avatar, a little bit of funkiness see to be happening in the Avatar stickersheets 😉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you want to chat through any comments, or if you think any of it is too much work :) Most comments are suggestions for how to compose the CSS better (figured it's a good learning opportunity), but I'm open to descoping some of it if you have other priorities, since this is an improvement regardless.
border: 3px solid var(--color-white); | ||
} | ||
|
||
.wrapper.small { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha oh no! I must not have been clear enough. Here's an example:
.wrapper.small { | |
.small { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😭
.reversed { | ||
--badge-background-color: rgba(var(--color-white-rgb), 0.1); | ||
|
||
color: var(--color-white); | ||
} | ||
|
||
.reversed.active { | ||
--badge-background-color: var(--color-green-300); | ||
|
||
color: var(--color-purple-800); | ||
} | ||
|
||
.reversed.dark { | ||
--badge-background-color: var(--color-purple-700); | ||
|
||
color: var(--color-white); | ||
} | ||
} | ||
|
||
.badge.large { | ||
display: inline-flex; | ||
justify-content: center; | ||
border-radius: var(--spacing-48); | ||
font-size: var(--typography-data-medium-font-size); | ||
line-height: var(--typography-data-medium-line-height); | ||
letter-spacing: var(--typography-data-medium-letter-spacing); | ||
padding: 2px 1.875rem; | ||
width: 24px; | ||
} | ||
|
||
.default { | ||
color: var(--color-purple-800); | ||
} | ||
|
||
.active { | ||
--badge-background-color: var(--color-blue-500); | ||
|
||
color: var(--color-white); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this helps a little in understanding the structure?
.reversed { | |
--badge-background-color: rgba(var(--color-white-rgb), 0.1); | |
color: var(--color-white); | |
} | |
.reversed.active { | |
--badge-background-color: var(--color-green-300); | |
color: var(--color-purple-800); | |
} | |
.reversed.dark { | |
--badge-background-color: var(--color-purple-700); | |
color: var(--color-white); | |
} | |
} | |
.badge.large { | |
display: inline-flex; | |
justify-content: center; | |
border-radius: var(--spacing-48); | |
font-size: var(--typography-data-medium-font-size); | |
line-height: var(--typography-data-medium-line-height); | |
letter-spacing: var(--typography-data-medium-letter-spacing); | |
padding: 2px 1.875rem; | |
width: 24px; | |
} | |
.default { | |
color: var(--color-purple-800); | |
} | |
.active { | |
--badge-background-color: var(--color-blue-500); | |
color: var(--color-white); | |
} | |
} | |
.reversed { | |
--badge-background-color: rgba(var(--color-white-rgb), 0.1); | |
color: var(--color-white); | |
} | |
// TODO: .dark.reversed moved into .dark | |
.large { | |
display: inline-flex; | |
justify-content: center; | |
border-radius: var(--spacing-48); | |
font-size: var(--typography-data-medium-font-size); | |
line-height: var(--typography-data-medium-line-height); | |
letter-spacing: var(--typography-data-medium-letter-spacing); | |
padding: 2px 1.875rem; | |
width: 24px; | |
// TODO: | |
// &.dot { ... } can probably go here, but it does mean that .dot must go above it. | |
// this .large can likely go further down in the file after the variants | |
} | |
.default { | |
color: var(--color-purple-800); | |
} | |
.active { | |
--badge-background-color: var(--color-blue-500); | |
color: var(--color-white); | |
&.reversed { | |
--badge-background-color: var(--color-green-300); | |
color: var(--color-purple-800); | |
} | |
} |
Why
Converting SCSS to CSS
https://cultureamp.atlassian.net/browse/KZN-2877
What
Converts Avatar, AvatarGroup, Badge, Brand, BrandMoment to CSS