Skip to content

Increase font size for alarm keypad number buttons#8120

Merged
bramkragten merged 3 commits intohome-assistant:devfrom
spacegaier:alarm-key-button-font
Jan 16, 2021
Merged

Increase font size for alarm keypad number buttons#8120
bramkragten merged 3 commits intohome-assistant:devfrom
spacegaier:alarm-key-button-font

Conversation

@spacegaier
Copy link
Copy Markdown
Member

@spacegaier spacegaier commented Jan 9, 2021

Breaking change

Proposed change

Allow the option to style the font size for alarm keypad number buttons for better readability. The non-number buttons are left unchanged.

Example when styled to 22px:
grafik

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

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:

@KTibow
Copy link
Copy Markdown
Contributor

KTibow commented Jan 11, 2021

Maybe this could be in the middle, or a config option? It seems to just not fit in with the rest of the UI.

@spacegaier
Copy link
Copy Markdown
Member Author

@KTibow What do you mean by "be in the middle"?

If we end up not changing it via this PR, then we should perhaps ensure that the keypad number font size can be controlled by a theme, so users have a chance to adjust since I do understand the reasoning for this from a usability point of view..

@bramkragten
Copy link
Copy Markdown
Member

I'd rather see this as a themeable option

@KTibow
Copy link
Copy Markdown
Contributor

KTibow commented Jan 11, 2021

I mean 21px.

@spacegaier
Copy link
Copy Markdown
Member Author

I mean 21px.

I don't think Material Design allows uneven numbers. But either way, we will not change it directly in the frontend core (see Bram's response), but instead offer the option for themes to define a size. There you could then go for 21px if you wanted to.

@spacegaier spacegaier marked this pull request as draft January 14, 2021 12:09
}

mwc-button.numberkey {
--mdc-typography-button-font-size: var(--keypad-font-size, 0.875rem);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

0.875rem is the default from MDC.

@spacegaier spacegaier marked this pull request as ready for review January 16, 2021 01:18
@bramkragten bramkragten merged commit 9659ebe into home-assistant:dev Jan 16, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2021
@spacegaier spacegaier deleted the alarm-key-button-font branch May 26, 2021 06:44
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