-
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 unit to temperature tile number button group #17841
Conversation
Hello 👋 We should only show unit if there isn't enough space. May be using https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_container_queries? I never tested it but browser support is not bad : https://caniuse.com/css-container-queries |
That's pretty sweet, we should use that in other places too where we now use |
I used container queries to hide the unit if space is missing. I also used |
|
||
return html` | ||
<div class="container"> | ||
<div | ||
id="input" | ||
class="value" | ||
role="number-button" | ||
role="spinbutton" |
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.
Role was wrong
Breaking change
Proposed change
The tile feature was missing the temperature unit.
I pulled out the value and unit formatting logic so we are not redundantly copying that around.
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: