KTibow / lovelace-light-soft-ui-theme

🎨 Home Assistant soft UI light theme, with help from @JuanMTech, @thomasloven, and @N-L1.
MIT License
59 stars 6 forks source link

Cards are left-aligned #13

Closed brent-au closed 3 years ago

brent-au commented 3 years ago

Expected Behavior

On a fresh install, all cards are centre-aligned.

Actual Behavior

Cards are left-aligned.

Observations

Following error is thrown in the console:

Uncaught (in promise) TypeError: Cannot read property 'length' of null
    at HTMLElement.setStyle (card-mod.js:1)
    at async HTMLElement._setTemplate (card-mod.js:1)

Steps to Reproduce the Problem

(on a new Home Assistant OS install)

  1. Installed card-mod via HACS
  2. Installed 'Lovelace Soft UI light theme' via HACS
  3. Set theme to 'Lovelace Soft UI light theme'
  4. View any dashboard or create a new dashboard

Specifications

Debugging/Resolution attempts

Example Screenshot

Screenshot of erroneous alignment

github-actions[bot] commented 3 years ago

Hey! This is your first issue, so I just want to make sure you've read the docs and fourm thread. Thanks!

KTibow commented 3 years ago

Try reinstalling from main.

brent-au commented 3 years ago

Tried reinstalling the theme from main, still having the same issue even after a restart.

KTibow commented 3 years ago

Huh. No issues for me, could be related to the fact that you're at 2010.12.2 but I'm at 2021.1.0b0. image

brent-au commented 3 years ago

Ah, typo in the original, meant to say version 2020.12.2 (current stable). Updated to 2021.1.0b0, same issue unfortunately.

KTibow commented 3 years ago

See any issues in the browser console?

brent-au commented 3 years ago

Only that noted in the observations above, I've included a screenshot for reference.

Console Output

baby7 commented 3 years ago

I have the same problem here,I also use HACS installation. I think the problem is here:

#columns { flex-direction: column !important; margin: 0 auto; max-width: 500px; }

Without this code, the style is normal

KTibow commented 3 years ago

@baby7 Mind making a PR? Just change theme.yaml, run theme_maker.py, and create a PR for both repos.

stale[bot] commented 3 years ago

Any updates? Did @KTibow forget to follow up? No point in keeping something open with no status updates.

brent-au commented 3 years ago

I'll look at this tonight (AEDT) if a PR isn't in.

baby7 commented 3 years ago

Each style file has this code, I will try to PR, but I don't know where this code was used before.

KTibow commented 3 years ago

Edit theme.yaml and use the generator Python file.

baby7 commented 3 years ago

OK

baby7 commented 3 years ago

I submitted PR, but one of them didn't seem to pass the inspection

baby7 commented 3 years ago

@KTibow I see you've updated HACS(Dark Soft UI Theme),the updated style works fine.

KTibow commented 3 years ago

Yeah I'm lazy. I'll get around to it.