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

layout-card mediaquery doesn't work when contained in a decluttering-card #46

Open
MadMaxMcKinney opened this issue Sep 4, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@MadMaxMcKinney
Copy link

MadMaxMcKinney commented Sep 4, 2021

So I've got a simple grid from layout_card:

base_myhomekit_card_grid:

  # Detault vars ####
  default:
    - cards: ""

  card:
    type: custom:layout-card
    layout_type: grid
    layout_options:
      grid-template-columns: 1fr 1fr 1fr 1fr 1fr
      grid-template-rows: auto
      grid-gap: 8px
      mediaquery:
      "(max-width: 650px)":
        grid-template-columns: 1fr 1fr 1fr
    cards: '[[cards]]'

However, the mediaquery doesn't work for some reason. If I use the layout-card on its own and not as a template for the decluttering-card everything works as it should.

What's going on here?

Reference for layout-card

@MadMaxMcKinney MadMaxMcKinney added the bug Something isn't working label Sep 4, 2021
@fbsdmon
Copy link

fbsdmon commented Jan 14, 2024

Fixing this would make my life a lot easier

@ildar170975
Copy link

The code in the 1st post is wrongly indented:

      mediaquery:
      "(max-width: 650px)":
        grid-template-columns: 1fr 1fr 1fr

So it is not supposed to work properly.
The fixed code works OK as a decluttering template.
No issue here, just a wrong use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants