svelecte icon indicating copy to clipboard operation
svelecte copied to clipboard

Refactor css to allow to pass inline CSS variables

Open mskocik opened this issue 1 year ago • 4 comments

    Hi is it still expected to use `global` for basic styling? Passing a CSS variable to the component (`<Svelecte --sv-min-height="35px" />`) does not work since it is wrapped in extra markup . It also get overriden for any element that isn't the root `.svelecte-control` since the CSS variables are reapplied for each sub-element, example with 
<style>
	:global(.svelecte-control) {
		--sv-min-height: 32px ;
	}
</style>

CSS variable is applied for top-level element:

image

But default comes back for any nested element:

image

Originally posted by @gterras in https://github.com/mskocik/svelecte/issues/98#issuecomment-1326331763

mskocik avatar Nov 25 '22 15:11 mskocik