TECH7Fox / sip-hass-card

A SIP client inside home assistant!
MIT License
179 stars 38 forks source link

popup css styling injection #98

Open radoprajitno opened 1 year ago

radoprajitno commented 1 year ago

Hi there,

The current popup seems not showing the right size. it overflow to the right side of my other cards. Im curently using the Horizontal (layout-card), provided by HACS frontend layout-card mod.

image

What i want to approach is: Full screen pop up with 10% margin of each side. css shud be something like this..

div.popup { display: block; position: fixed; height: 80%; width: 80%; top: 10%; left: 10%; z-index: 9999; background: #000; }

Question 1. what is the best approach to inject the CSS to the card? i was trying to using card-mod but im unable to give the css accordingly.

I think it will be very great to have control or having few options, of how the popup behavior in the card settings.

cheers..

TECH7Fox commented 1 year ago

We moved on from the popup, and have it in the card itself. Because of the way HA uses popups (dialogs) there wasn't a good way to implement it without bugs. (Not without changing core at least) Guessing your theme is allowing the card to "spread out".

I don't know if it's possible to inject CSS. The CSS changes dynamically when loading the card view. You could fork the card and change the source.