-
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
Introduce new attention level designs for button and related theming for card #2735
Introduce new attention level designs for button and related theming for card #2735
Conversation
3300f2b
to
505a42d
Compare
c5b2c6b
to
558a347
Compare
@@ -2,20 +2,69 @@ import { Component, Input } from '@angular/core'; | |||
|
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.
All the changes in this file are just to have a good showcase for the three different versions of dropdown on each theme. It is not the most beautiful solution, but at least it mirrors 100% how we do it for button.
@use '../utils'; | ||
|
||
@mixin apply-dark-theme { | ||
--kirby-interactive-background-color: #{utils.get-color('white-overlay')}; |
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.
Can we come up with a better prefix than --kirby-interactive-
here?
I want it to signal that this is used for our "interactive" components, like buttons, segmented control, form field etc. So it is mostly form-controls, but not quite isolated to those, as segmented control is not a form-control I guess 🤷
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.
That's a really good question 🤔 The only suggestion I can come up with is --kirby-interactive-element-background-color
or --kirby-interactive-component-background-color
. If you hadn't explained the reasoning for the naming, then I think it would have been unclear to me, what it targets 🙂 I know that the naming becomes a bit long, but I'm a firm believer in "clarity over brevity", when it comes to naming variables and functions 😄
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.
Agree! I changed it to --kirby-interactive-element-background-color
and --kirby-interactive-element-background-color
@@ -184,8 +184,12 @@ describe('AvatarComponent', () => { | |||
|
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.
This change seems unrelated, but the approach chosen here for looping over each color broke when I introduced the overlay variants in libs/core/src/scss/themes/_colors.scss
.
Instead it is now aligned with the actual implementation inside the component.
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.
Really great work! 😄 And nice updates to the documentation as well! I only have some minor comments.
apps/cookbook/src/app/examples/dropdown-example/examples/attention-level.ts
Outdated
Show resolved
Hide resolved
apps/cookbook/src/app/examples/dropdown-example/examples/attention-level.ts
Outdated
Show resolved
Hide resolved
apps/cookbook/src/app/examples/dropdown-example/examples/attention-level.ts
Outdated
Show resolved
Hide resolved
@use '../utils'; | ||
|
||
@mixin apply-dark-theme { | ||
--kirby-interactive-background-color: #{utils.get-color('white-overlay')}; |
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.
That's a really good question 🤔 The only suggestion I can come up with is --kirby-interactive-element-background-color
or --kirby-interactive-component-background-color
. If you hadn't explained the reasoning for the naming, then I think it would have been unclear to me, what it targets 🙂 I know that the naming becomes a bit long, but I'm a firm believer in "clarity over brevity", when it comes to naming variables and functions 😄
d10e080
to
751b767
Compare
Co-authored-by: mark-drastrup <mark.drastrup@gmail.com>
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.
…for card (#2735) Co-authored-by: mark-drastrup <mark.drastrup@gmail.com>
Which issue does this PR close?
This PR closes #2684 closes #2602
What is the new behavior?
As card implements the
themeColor
directive, card is now also responsible for setting the correct theme CSS custom properties that buttons (form-field and segmented-control too, down the line) implement asbackground-color
andcolor
.Otherwise the button would not have the correct theme when
themeColor
was not set on card, as the card would have no.kirby-color-brightness-white
class applied in that situation. Thus the button would not be able to adapt correctly in itshost-context()
css selectors.See both issues linked above for additional context, especially #2602 for the design context.
All in all, this PR includes:
Does this PR introduce a breaking change?
Are there any additional context?
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Reminders
Review
When the pull request has been approved it will be merged to
develop
by Team Kirby.