When building an addon theme, it would be useful to know if Valo is the base theme so one could use valo variables. However there's no reasonable way to do this since the compiler does not support variable-exists, function-exists etc.
A workaround I did for Spreadsheet goes like this but is far from pretty:
$v-color-keywords: non-valo-theme !default;
@mixin spreadsheet {
// Very nice workaround for missing variable-exists function
@if $v-color-keywords == non-valo-theme {
@include spreadsheet-legacy;
} @else {
@include spreadsheet-valo;
}
}
Originally by @tepi
When building an addon theme, it would be useful to know if Valo is the base theme so one could use valo variables. However there's no reasonable way to do this since the compiler does not support variable-exists, function-exists etc.
A workaround I did for Spreadsheet goes like this but is far from pretty:
Imported from https://dev.vaadin.com/ issue #17193