Skip to content
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

Alarm Panel card: number buttons outline and adjusted padding and font-size fixing #2812 #3991

Merged
merged 5 commits into from
Oct 14, 2019
Merged

Alarm Panel card: number buttons outline and adjusted padding and font-size fixing #2812 #3991

merged 5 commits into from
Oct 14, 2019

Conversation

mr-awk
Copy link
Contributor

@mr-awk mr-awk commented Oct 12, 2019

Thanks to @bramkragten for helping out.

Outline on buttons and less padding.
Found a solution for the font-size issue before mwc-button height bug is fixed.

fixes #2812

@mr-awk

This comment has been minimized.

@mr-awk
Copy link
Contributor Author

mr-awk commented Oct 12, 2019

it's not absolutely best but a possible solution before mwc-button height bug is sorted out.
image

@mr-awk mr-awk changed the title Alarm Panel card: number buttons outline and adjusted padding Alarm Panel card: number buttons outline and adjusted padding fixing #2812 Oct 12, 2019
@mr-awk mr-awk changed the title Alarm Panel card: number buttons outline and adjusted padding fixing #2812 Alarm Panel card: number buttons outline and adjusted padding and font-size fixing #2812 Oct 12, 2019
@@ -136,7 +136,7 @@ class HuiAlarmPanelCard extends LitElement implements LovelaceCard {
@click="${this._handleActionClick}"
outlined
>
${this._label(state)}
<h1 style="font-size:16px;">${this._label(state)}</h1>
Copy link
Member

Choose a reason for hiding this comment

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

Style should not be inline

${value === "clear"
? this._label("clear_code")
: value}
<h1 style="font-size:16px;">
Copy link
Member

Choose a reason for hiding this comment

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

Don't use h1 inside a button, that's a header tag

@bramkragten
Copy link
Member

I don't thing this looks good, let's keep all the font sizes normal, and just add a outline on the buttons.

@mr-awk
Copy link
Contributor Author

mr-awk commented Oct 13, 2019

I don't thing this looks good, let's keep all the font sizes normal, and just add a outline on the buttons.

Okey, thought this could be a possible solution. I know it is not a good looking or very smart but it works, and help for people who is visual impaired.

@bramkragten
Copy link
Member

bramkragten commented Oct 14, 2019

I suggest this:
image

I can push my changes to your branch if you want?
Removing the base unit will make sure that the font sizes can scale when settings change. Not sure if it is possible to set font-size with a theme, but we might want to look into that.

With a base font of 20px instead of 14px it would look like this:
image

@mr-awk
Copy link
Contributor Author

mr-awk commented Oct 14, 2019 via email

@mr-awk
Copy link
Contributor Author

mr-awk commented Oct 14, 2019

I suggest this:
image

I can push my changes to your branch if you want?
Removing the base unit will make sure that the font sizes can scale when settings change. Not sure if it is possible to set font-size with a theme, but we might want to look into that.

With a base font of 20px instead of 14px it would look like this:
image

@bramkragten Sorry didn't read your whole post. Please push your changes!

@iantrich
Copy link
Member

ah, nice find @bramkragten. That makes sense now.

@bramkragten bramkragten merged commit 424d677 into home-assistant:dev Oct 14, 2019
@mr-awk mr-awk deleted the alarm_panel_card_better_accessibility branch October 14, 2019 21:05
@bramkragten bramkragten mentioned this pull request Oct 23, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 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.

Accessibility in new Alarm Panel
4 participants