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

More compact look when embedded #47

Open
OToussaint opened this issue Nov 20, 2022 · 1 comment
Open

More compact look when embedded #47

OToussaint opened this issue Nov 20, 2022 · 1 comment
Labels
feature request New feature or request

Comments

@OToussaint
Copy link
Contributor

OToussaint commented Nov 20, 2022

This is not a problem.
I wanted to share with you what I did to make it more compact looking when it is embedded.
I know you already did something but I came with a look that is pleasing me using card-mod.
Unfortunately, it is not that easy for me to propose that change myself in the code and would prefer you, if you like it, to include it in a release.

Suggested feature / solution

image

How it is made using card-mod:

            card_mod:
              style:
                .: |
                  ha-card {
                    margin: -20px -4px -38px 0px;
                  }
                .time-picker-row:
                  .time-picker-content:
                    time-unit:
                      $: |
                        .time-unit {
                          padding: 5px !important;
                        }
                        .time-input {
                          border: 1px solid var(--switch-checked-button-color) !important;
                          height: 5px;
                          background-color: rgba(0,0,0,0) !important;
                          color: var(--primary-text-color) !important;
                          border-radius: 7px;
                          margin: -12px;
                        }     
                        .time-picker-icon {
                          color: var(--switch-checked-button-color) !important;
                        }
@OToussaint OToussaint added the feature request New feature or request label Nov 20, 2022
@PulsarFX
Copy link

My take on it, based on the example above, to match it to mushroom cards:

grafik

type: custom:time-picker-card
entity: input_datetime.wecker_zeit
hour_mode: 24
hour_step: 1
minute_step: 5
name: Wecker
hide:
  name: true
  seconds: true
  icon: true
layout:
  embedded: false
  hour_mode: single
  align_controls: center
  name: inside
  thin: true
link_values: false
card_mod:
  style:
    .time-picker-row:
      $: |
        { padding: 3px !important; }
      .time-picker-content:
        time-unit:
          $: |
            .time-input 
            {
               height: 5px;
               margin: -10px;
            }
            .time-input-icon 
            {
               padding: 5px !important;
            }
            .time-picker-icon:first-of-type 
            {
               margin: 0px;
               padding: 0 !important;
               padding-bottom: 7px !important;
            }
            .time-picker-icon:nth-of-type(2) {
               margin: 0px;
               padding: 0 !important;
               padding-top: 7px !important;
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants