-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add outline to a label (2) #22803
Add outline to a label (2) #22803
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
At this point let's just add the outline in the ha-label
component
I preferred not to do it since in some cases (like for users, quick search) P.S. Also, it is not outline, it has to be a |
Yes. Even a fixed color can clash with the theme |
src/components/ha-label.ts
Outdated
@@ -26,6 +26,7 @@ class HaLabel extends LitElement { | |||
0.15 | |||
); | |||
--ha-label-background-opacity: 1; | |||
border: 1px solid var(--divider-color); |
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.
why --divider-color
instead of --outline-color
?
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.
Well,
- In this PR a
border
is used instead ofoutline
- since a parent element is clipping outline. - I got an impression that the
--divider-color
is mainly used for dividers/separators/etc, and the--outline-color
is used mainly for outlines; also, a "plus" class forha-label
uses the--divider-color
. So I thought that--divider-color
fits better. - Currently both
--divider-color
&--outline-color
have same values in a default theme - but ofc they could be different. - In the previous PR the
--outline-color
was used.
So, thinking about that - and probably we should:
-- either change here to --outline-color
as well
-- or change to --divider-color
in the 1st PR,
what do you think?
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.
Semantically outline is the same border here, especially since we already have box-sizing: border-box
, so let's just use --outline-color
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.
OK, changed to --outline-color
. Thanks for the suggestion!
src/components/ha-label.ts
Outdated
@@ -26,6 +26,7 @@ class HaLabel extends LitElement { | |||
0.15 | |||
); | |||
--ha-label-background-opacity: 1; | |||
border: 1px solid var(--divider-color); |
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.
Semantically outline is the same border here, especially since we already have box-sizing: border-box
, so let's just use --outline-color
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
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.
We should be more consistent and change the other outlines to border but I'm not gonna nit pick that much and merge this for now
Well, let's do it! What do you think? |
Go for it if you want. But make sure to have |
@MindFreeze please check #22812 if possible, thanks a lot! |
Breaking change
Proposed change
Follow up #22392
Before:
After:
Before:
After:
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: