Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Update Themes and Theme's Scope or properties #195

Closed
ghost opened this issue Nov 23, 2018 · 12 comments
Closed

Update Themes and Theme's Scope or properties #195

ghost opened this issue Nov 23, 2018 · 12 comments

Comments

@ghost
Copy link

ghost commented Nov 23, 2018

@marcpabst commented on Nov 23, 2018, 8:13 AM UTC:

Currently it's not possible to use CSS ot themes to set border-radius and some other properties of ha-card because encapsulation of web components works petty well in modern browsers and those properties don't use CSS custom properties as of now.

I'm therefore proposing to add a number of properties to ha-card.js and ha-style.js:

–card-border-radius
–card-margin
–card-border-width
–card-border-color
–card-border-style

This would not break anything because if not set, then the properties would just resort to default values. If you agree I would be happy to make a PR.

This issue was moved by iantrich from home-assistant/home-assistant-polymer#2086.

@thomasloven
Copy link

If we wish to do this - which I'm not sure we do - I think it would be better to have a --card-styleor something that's added to the card css with @apply --card-style. That way we won't need to worry about which properties to support.

@marcpabst
Copy link

marcpabst commented Nov 26, 2018

If that's the method of choice, we should think about adding -XXX-style properties to every built-in element for consistency. This would also enable theme authors to do a lot more than currently possible. They could still opt for the standard properties but also use completely custom styles for everything.

@zsarnett
Copy link

I am not sure if @balloob wants this kind of freedom in the Theming

@iantrich
Copy link
Member

Maintaining support for that is my main concern.

@marcpabst
Copy link

marcpabst commented Nov 26, 2018

I am not sure if @balloob wants this kind of freedom in the Theming

Isn't that the idea behind an open system like HASS? Sure, I can write hacky JS workaround (which I did) but that's not really a good solution. Why not give users the ability to customize the hell out of their frontends if they wish so?

@marcpabst
Copy link

Maintaining support for that is my main concern.

Maintaining support for what?

@zsarnett
Copy link

No the idea is that there is a way to do everything not that we give you a way to do everything. Open doesnt mean we make every feature suggested. And Support is the problem, the more freedom we give less techy users the more questions we get

@marcpabst
Copy link

marcpabst commented Nov 27, 2018

No the idea is that there is a way to do everything not that we give you a way to do everything.

That's basically the same thing. At least from a user's perspective. Sure, technically there is already a way: I could just go and fork the whole thing. But then I would have to maintain the whole thing too.

Open doesnt mean we make every feature suggested.

Sure, after all it's the maintainers choice which ideas to agree on and which not. I'm just arguing the case that there is no reason to not give users power over the frontend in a more convenient way.

And Support is the problem, the more freedom we give less techy users the more questions we get

I don't really see the problem here - there is already theming. This wouldn't introduce anything new but rather extend existing functionality. It doesn't even change existing functionality.

@balloob
Copy link
Member

balloob commented Nov 27, 2018

Isn't that the idea behind an open system like HASS?

Just because we're open source doesn't mean that we go in every direction that any random user on the internet suggests we take.

Until our current officially theming supported variables have been defined and cleaned up, we are not going to expose any new theming variables.

@marcpabst
Copy link

Thanks for your answer. I wasn't implying that you should follow any random idea that some suggest and I'm sorry if that's what it sounded like.

The point I tried to make was that if you decide a feature like theming, there is no reason to restrict what people can do with it - especially if you're trying to make an open system (and not just open source) that encourages users to customize it to their own needs. There are many systems like HASS and some of them even offer more or less the same functionality. HASS might have a number of benefits over them but one of biggest (at least in my opinion) advantages is that I can customize almost everything without forking it or messing with the internal structure.

However, I do understand that you don't want to change the theming support until there is a clear plan on how it should look.

@jeremiecook
Copy link

Hi and thanks for all these answers.

As far as I love the Hass project and the incredible work you've done, I don't really understand the value for Hass in preventing users from styling and customizing their interface.

Some UX/UI designers may be glad to experiment, share and help :)

@zsarnett zsarnett changed the title Impossible to set border radius for ha-card through css (or themes) Update Themes and Theme's Scope or properties Nov 30, 2018
@home-assistant home-assistant deleted a comment from iantrich Oct 4, 2019
@ghost
Copy link
Author

ghost commented Oct 4, 2019

This issue was moved by iantrich to home-assistant/home-assistant-polymer#3929.

@ghost ghost closed this as completed Oct 4, 2019
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants