SVGRect style optimization

This commit is contained in:
Jörn-Michael Miehe 2023-11-06 00:32:56 +00:00
parent 8b581a7b50
commit 2282de2528

View file

@ -60,33 +60,22 @@ export default class extends Vue {
<style lang="scss" scoped>
@import "@/bulma-scheme";
@mixin visible_rect($name, $color) {
&.#{$name} {
background-color: rgba($color, 0.3);
border-color: rgba($color, 0.9);
}
}
foreignObject > div {
:deep() > * {
&:not(.visible, :hover):deep() > * {
display: none;
}
&.visible,
&:hover {
:deep() > * {
display: initial;
}
border-width: 3px;
border-style: solid;
@include visible_rect("primary", $primary);
@include visible_rect("link", $link);
@include visible_rect("info", $info);
@include visible_rect("success", $success);
@include visible_rect("warning", $warning);
@include visible_rect("danger", $danger);
@each $name, $color in $advent22-colors {
&.#{$name} {
background-color: rgba($color, 0.3);
border-color: rgba($color, 0.9);
}
}
}
}
</style>