vaheqelyan / svelte-grid

A responsive, draggable and resizable grid layout, for Svelte. [NOT MAINTAINED]
https://svelte-grid.now.sh/
MIT License
970 stars 58 forks source link

how to change svlt-grid-resizer? #120

Closed j2l closed 2 years ago

j2l commented 2 years ago

Hello, This is a great helpful project, thank you! I don't get how to tweak the grid-resizer location, in my project's style, I added:

.svlt-grid-resizer:after {
    bottom: 5px;
    right: 5px;
  }

and the hardcoded .svlt-grid-resizer.svelte-x23om8::after but it is superseded by the module.

It worked for other classes so I don't get why it's not working in this case. Any idea?

vaheqelyan commented 2 years ago

hello

try to use the :global(...) modifier. right now this is the only way to customize css

<style>
  /* or .<your-class> :global(.svlt-grid-resizer:after) */
  :global(.svlt-grid-resizer:after) {
    bottom: 5px !important;
    right: 5px !important;
  }
</style>
vaheqelyan commented 2 years ago

yes this is not ideal, it would be nice if we could customize using the style props

j2l commented 2 years ago

Perfect! Thank you very much @vaheqelyan OK for me, closnig