Skip to content

Harmonize the font sizes on area and device page#7357

Merged
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:device-page-font-size
Oct 17, 2020
Merged

Harmonize the font sizes on area and device page#7357
bramkragten merged 1 commit intohome-assistant:devfrom
spacegaier:device-page-font-size

Conversation

@spacegaier
Copy link
Member

Breaking change

Proposed change

If there are no automation, scenes or scripts for a device, the corresponding note text uses a too big font size, not matching the rest of the visual feel. To be consistent, I applied the same font size, to when there are created elements in those boxes as well.

Same applies to the area display.

Note: Before the change, the paper font size for a sub header was applied.

Before
image

After
image

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link
Contributor

@zsarnett zsarnett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm I am not sure if we should use paper sizes. Can we just use a px?

@spacegaier
Copy link
Member Author

@zsarnett I would be fine either way. In many places int he frontend we do already set the font-size fix to 14px, but on the other hand we do have the same paper size used in our haStyle:

export const haStyle = css`
:host {
font-family: var(--paper-font-body1_-_font-family);
-webkit-font-smoothing: var(--paper-font-body1_-_-webkit-font-smoothing);
font-size: var(--paper-font-body1_-_font-size);
font-weight: var(--paper-font-body1_-_font-weight);
line-height: var(--paper-font-body1_-_line-height);
}

Should we wait for @bramkragten to chime in as well?

@bramkragten bramkragten merged commit 874f3b3 into home-assistant:dev Oct 17, 2020
@spacegaier spacegaier deleted the device-page-font-size branch October 17, 2020 20:36
@bramkragten bramkragten mentioned this pull request Oct 21, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants