svelte-plugins / datepicker

A simple datepicker component designed for Svelte.
https://svelte-plugins.github.io/datepicker
MIT License
54 stars 12 forks source link

🐛 --datepicker-spacing not working #33

Open fdebef opened 2 months ago

fdebef commented 2 months ago

Describe the bug Changing --datepicker-spacing custom css variable does not work, calendar layout does not change.

To Reproduce Try to use:

<style>
    :global(.datepicker[data-picker-theme='custom-datepicker']) {
        --datepicker-spacing: 3px;
        --datepicker-container-left: -400px;
        --datepicker-calendar-day-width: 26px;
        --datepicker-calendar-day-height: 26px;
        --datepicker-calendar-width: 240px;
        --datepicker-calendar-header-text-font-size: 0.9rem;
    }
</style>

All values are changed and calendar changes according to them except --datepicker-spacing. Even if this value is the only one I let in the custom them.

Expected behavior The calendar padding should change according to calculated values.

When I try to change the value of --datepicker-spacing in browser inspection tools, it works. Both Safari and Chrome.