Refactor cover controls into a separate component.#233
Conversation
|
@andrey-git, thanks for your PR! By analyzing the history of the files in this pull request, we identified @armills and @turbokongen to be potential reviewers. |
| <template> | ||
| <style> | ||
| .state { | ||
| text-align: right; |
There was a problem hiding this comment.
This should be part of state-card-cover.html as it's about how the component should be rendered.
| .state { | ||
| text-align: right; | ||
| white-space: nowrap; | ||
| width: 127px; |
There was a problem hiding this comment.
Actually both of those are not needed at all. Removing.
There was a problem hiding this comment.
Are you sure, our cards can be pretty wide if you have only 1 column. In that case the controls should be right aligned which I don't think they are now.
There was a problem hiding this comment.
The controls are right aligned because state-card-cover has class='horizontal justified layout'.
width:127px does nothing because the "natural" width of the 3 buttons is 126.5px. When some buttons are unsupported they are visibility: hidden so width is not changed.
If the state container were wider, for example 226.px then text-align: right; would affect to which side of the 226.5px the 3 buttons are aligned. Since the container tightly wraps the buttons - text-align: right; has no effect.
…home-assistant#233) Bumps @docusaurus/preset-classic from 2.0.0-alpha.55 to 2.0.0-alpha.56. Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Refactor cover controls into a separate component.
It will allow the new component to be used from custom components