Giter VIP home page Giter VIP logo

Comments (3)

DBuit avatar DBuit commented on July 22, 2024 1

Hello @Stinocon

i am missing the style part in your configuration.
When you check the info on the github page for the card there is some information and where i add this style:

style:
      $: |
        .mdc-dialog .mdc-dialog__container {
          width: 100%;
        }
        .mdc-dialog .mdc-dialog__container .mdc-dialog__surface {
          width:100%;
          box-shadow:none;
        }
      .: |
        :host {
          --mdc-theme-surface: rgba(0,0,0,0);
          --secondary-background-color: rgba(0,0,0,0);
          --ha-card-background: rgba(0,0,0,0);
          --mdc-dialog-scrim-color: rgba(0,0,0,0.8);
          --mdc-dialog-min-height: 100%;
          --mdc-dialog-min-width: 100%;
          --mdc-dialog-max-width: 100%;
        }
        mwc-icon-button {
          color: #FFF;
        }

I guess if you add this the popup should look good on pc.

from light-popup-card.

Stinocon avatar Stinocon commented on July 22, 2024

Oh sorry, I really didn't realize the style part was mandatory :(
Since I'm not exactly an ace with this (I already have card-mod) could you point me to where to put it?
Because the whole thing will be part of a glance card with many more entity lights, I guess I'll have to repeat the style code for each light?

This is an example of a glance card with a single entity:

type: glance
entities:
  - entity: light.flos
    name: Flos
    tap_action:
      action: toggle
    double_tap_action:
      action: more-info
    hold_action:
      action: fire-dom-event
      browser_mod:
        command: popup
        title: Flos
        card:
          type: 'custom:light-popup-card'
          entity: light.flos
          icon: 'mdi:lightbulb'
          settings: true
          settingsCard:
            type: 'custom:light-entity-card'
            cardOptions:
              entity: light.flos
              hide_header: true
              brightness: false
              smooth_color_wheel: true
          actionsInARow: 2
          brightnessWidth: 150px
          brightnessHeight: 400px
          switchWidth: 150px
          switchHeight: 400px
          borderRadius: 12px
          actions:
            - service: scene.turn_on
              color: '#FDCA64'
              service_data:
                entity_id: scene.scrivania_relax
            - service: scene.turn_on
              color: '#FDCA64'
              service_data:
                entity_id: scene.test
            - service: scene.turn_on
              color: '#FDCA64'
              service_data:
                entity_id: scene.test

Many many thanks!

EDIT:

In the meantime, I've tried multiple ways to enter the styling code but either I'm not entering it in the right place or I'm entering it incorrectly.
When it doesn't give any syntax error however the popup remains cut off or even worse doesn't show up.

I don't understand what I'm doing wrong :(

from light-popup-card.

Ned-Tom avatar Ned-Tom commented on July 22, 2024

@Stinocon , have you installed the lovelace-card-mod to ?

That mod enables some styling of the light-popup-card, you can then also use the Optional styling attribute what @DBuit mentioned.

Hope that helps, greetings Tom.

from light-popup-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.