bulmaswatch icon indicating copy to clipboard operation
bulmaswatch copied to clipboard

Using px in darkly theme should be discouraged

Open jondoe1337 opened this issue 3 years ago • 4 comments

Size is set to 15px. But this collides for example if you use bulma-switch where the variable is used with rem, which leads to:

Incompatible units: 'rem' and 'px'.

jondoe1337 avatar Jul 27 '20 11:07 jondoe1337

I think you might want to handle this with custom CSS since bulma-switch is anyways a plugin right?

jenil avatar Jul 27 '20 13:07 jenil

This sounds more like a workaround to me. The thing is that the themes sometimes use rem and darkly px. And some do not even define any size.

jondoe1337 avatar Jul 27 '20 14:07 jondoe1337

I'm not sure if I understand this correctly then, can you make a codepen or point me to something? Darkly just updates the base variables and a few overrides to achieve the look

jenil avatar Jul 27 '20 14:07 jenil

Sure: https://github.com/jenil/bulmaswatch/blob/gh-pages/darkly/_variables.scss#L28 Uses px. If the size is used somewhere else with a relative setting using rem the sass compiler will crash.

Of course bulma-switch is a plugin, but I'd say that rem is more commonly used in the template context.

jondoe1337 avatar Jul 27 '20 14:07 jondoe1337