Skip to content

Switch theme#4017

Merged
bramkragten merged 3 commits into
home-assistant:devfrom
iantrich:switch-theme
Oct 16, 2019
Merged

Switch theme#4017
bramkragten merged 3 commits into
home-assistant:devfrom
iantrich:switch-theme

Conversation

@iantrich
Copy link
Copy Markdown
Member

Expose CSS vars for ha-switch theming

--switch-checked-color
--switch-unchecked-color
--switch-unchecked-button-color
--switch-unchecked-track-color

closes #3989

@iantrich iantrich requested a review from bramkragten October 16, 2019 02:57
@iantrich iantrich self-assigned this Oct 16, 2019
Comment thread src/resources/ha-style.ts
Comment on lines -56 to -57
--toggle-button-color: var(--primary-color);
/* --toggle-button-unchecked-color: var(--accent-color); */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Oh we already had official none paper variables, that should have been used in themes. Should we reuse those instead of creating switch ones?

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.

We could, but I like switch better 🤷‍♂️

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That would be breaking, and keeping toggle-button in theory not, but since everyone uses paper anyway it doesn't really matter I think...

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.

Right, that's what I meant to say more clearly ;) Would love for us to build a theme generator after we overhaul theming in general

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.

I'll be sure to highlight this in the changelog and the release notes

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks for the great response. You guys rock!

@jamesw4
Copy link
Copy Markdown

jamesw4 commented Nov 4, 2019

Is there any reason it was decided to bin off the checked track colour? We used to have four attributes previously, now we only have three.

@naofireblade
Copy link
Copy Markdown

naofireblade commented Nov 9, 2019

Is there any reason it was decided to bin off the checked track colour? We used to have four attributes previously, now we only have three.

Sadly this button design is not possible anymore (white knob with colored background)
image

@naofireblade
Copy link
Copy Markdown

I created an issue: #4200

@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.

switch paper-toggle-button to mwc-switch #3683 breaks my theme using paper-toggle-button-checked-button-color

6 participants