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

'no_card: true' don‘t work with 'in_card: true' in vertical-stack #14

Open
Krocko opened this issue Feb 17, 2021 · 12 comments
Open

'no_card: true' don‘t work with 'in_card: true' in vertical-stack #14

Krocko opened this issue Feb 17, 2021 · 12 comments

Comments

@Krocko
Copy link

Krocko commented Feb 17, 2021

The option no_card: true don‘t work in a vertical-stack card if set in_card: true also.

@jcwillox
Copy link
Owner

jcwillox commented Feb 18, 2021

Hmm, I suppose I could include that ability, you could always add no_card: true to the inner cards to hide their backgrounds, and you can probably use canary_style to adjust to card spacing.

type: vertical-stack
cards:
  - type: entities
    title: Lights
    no_card: true
    entities:
      - entity: light.bedroom_light
        secondary_info:
          entity: light.bedroom_underglow
          prefix: 'The Underglow is '
  - type: entities  
    title: Lights
    no_card: true
    canary_style:
      margin-top: -24px;
    entities:
      - light.bedroom_underglow

The reason it doesn't just work implicitly is that the no_card option only works and cards that use the ha-card element, e.g. the entities card, vertical-stack cards do not use ha-card even when using in_card: true.

@Krocko
Copy link
Author

Krocko commented Feb 18, 2021

Thank you, for your help.
I have no_card: true on the inner cards. But this don't work also.
Can you please explain how to use this canary_style?

@jcwillox
Copy link
Owner

Can you provide an example config to demonstrate the issue you're having?

I've updated the example above to include an example of canary_style, there's also some more info in the docs.

canary_style:
  margin-top: -24px;

@Krocko
Copy link
Author

Krocko commented Feb 19, 2021

  - type: vertical-stack
    in_card: true
    cards:
      - type: markdown
        no_card: true
        content: >-
          ## <center><font color= '#FF8300'>bla bla bla</font></center>
      - type: markdown
        no_card: true
        content: Some Text
      - type: markdown
        no_card: true
        content: Some Value

image


  - type: vertical-stack
    cards:
      - type: markdown
        no_card: true
        content: >-
          ## <center><font color= '#FF8300'>bla bla bla</font></center>
      - type: markdown
        no_card: true
        canary_style:
          margin-top: -24px;
        content: Some Text
      - type: markdown
        no_card: true
        canary_style:
          margin-top: -24px;
        content: Some Value

image

@jcwillox
Copy link
Owner

Ahhh, I made the mistake of testing on my development version, you're correct canary_style does not work correctly in the currently released version. I'll release a fixed version shortly.

@Krocko
Copy link
Author

Krocko commented Feb 19, 2021

Thank you very much!

@jcwillox
Copy link
Owner

This should be fixed in 0.3.2, let me know if it's working now.

@Krocko
Copy link
Author

Krocko commented Feb 19, 2021

It is still the same problem with 0.3.2

@jcwillox
Copy link
Owner

Did you make sure you're running the new version, it will show which version you are running in the browser console. In that image you sent, no_card is working, and I can confirm that after copy and pasting the second example you sent canary_style is working correctly in 0.3.2.

@Krocko
Copy link
Author

Krocko commented Feb 19, 2021

Yes, the latest version is installed.

@jcwillox
Copy link
Owner

Hmm, well I'm not sure what's happening then, this is what I get.
image

Does canary_style not work in any way, e.g. trying to change text color?

canary_style:
  margin-top: '-24px;'
  color: red

@Krocko
Copy link
Author

Krocko commented Feb 19, 2021

The color: is working but not the margin-top:

  - type: vertical-stack
    cards:
      - type: markdown
        no_card: true
        content: >-
          ## <center><font color= '#FF8300'>bla bla bla</font></center>
      - type: markdown
        no_card: true
        canary_style:
          margin-top: '24px;'
          color: red
        content: Some Text
      - type: markdown
        no_card: true
        canary_style:
          margin-top: '24px;'
          color: red
        content: Some Value

IMG_7088

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants