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

Breakpoints Don't Work Post v2.0.1 #7

Open
akeslo opened this issue Nov 6, 2022 · 6 comments
Open

Breakpoints Don't Work Post v2.0.1 #7

akeslo opened this issue Nov 6, 2022 · 6 comments

Comments

@akeslo
Copy link

akeslo commented Nov 6, 2022

I'm running v2.0.1 as I can't seem to get breakpoints working in anything past this version. Is this a known issue?

Thanks!

image

@mattydebie
Copy link

@akeslo Seems to work again on 2022.12.0

@The-Croz
Copy link

Definitely still occurring on 2023.1. Had to revert to v2.0.1 to get the breakpoints to work again

@akeslo
Copy link
Author

akeslo commented Jan 30, 2023

o v2.0.1 to get the breakpoints to work

Yeah I can't upgrade past v2.0.1 - I just keep it on this version as it's totally not fixed in anything above.

@CumpsD
Copy link

CumpsD commented May 22, 2023

Probably because this of this commit: 93b9bf4
Where your custom config gets overwritten by the default config

@CumpsD
Copy link

CumpsD commented May 22, 2023

This is the default, which will overwrite what you specify:

export default {
  padding: 0,
  gap: '8px',
  breakpoints: [
    {
      name: 'mobile',
      mq: '(max-width: 767px)',
      columns: 1,
    }, {
      name: 'tablet',
      mq: '(min-width: 768px) and (max-width: 1023px)',
      columns: 2,
    }, {
      name: 'desktop',
      mq: '(min-width: 1024px)',
      columns: 3,
    }
  ]
}

However, from rule 4 on, there is nothing to overwrite, so this config works:

type: custom:auto-entities
filter:
  include:
    - integration: shelly
      domain: switch
      options:
        type: custom:mushroom-entity-card
sort:
  method: friendly_name
show_empty: true
card_param: cards
card:
  type: custom:themable-grid
  padding: 0
  gap: 8px
  breakpoints:
    - name: mobile
      mq: '(max-width: 767px)'
      columns: 1
    - name: tablet
      mq: '(min-width: 768px) and (max-width: 1023px)'
      columns: 2
    - name: desktop-small
      mq: '(min-width: 1024px)'
      columns: 3
    - name: desktop
      mq: '(min-width: 1240px)'
      columns: 4
    - name: desktop-wide
      mq: '(min-width: 1600px)'
      columns: 5

@akeslo
Copy link
Author

akeslo commented Jul 9, 2023

This works with Grid (layout-card) view type and this config on all cards I want to use. Thank you very much @CumpsD. This is a good workaround.

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

4 participants