Skip to content

Commit 01d5410

Browse files
committed
fix(ui): make v-tippy theme switch proof
We create our own tippy theme using bootstrap css variables.
1 parent a1b2037 commit 01d5410

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

src/assets/css/tippy-bootstrap.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/* tippy-bootstrap.css */
2+
3+
.tippy-box[data-theme~='bootstrap'] {
4+
background-color: var(--bs-body-bg);
5+
color: var(--bs-body-color);
6+
border: 1px solid var(--bs-border-color);
7+
box-shadow: var(--bs-box-shadow);
8+
}
9+
10+
.tippy-box[data-theme~='bootstrap'] > .tippy-arrow::before {
11+
color: var(--bs-body-bg);
12+
}

src/components/Plan.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,13 @@ import { json_, pgsql_ } from "@/filters"
3333
import { setDefaultProps } from "vue-tippy"
3434
import { store } from "@/store.ts"
3535
36-
setDefaultProps({ theme: "light" })
36+
setDefaultProps({
37+
theme: "bootstrap",
38+
})
3739
3840
import "tippy.js/dist/tippy.css"
39-
import "tippy.js/themes/light.css"
41+
import "tippy.js/dist/border.css"
42+
import "@/assets/css/tippy-bootstrap.css"
4043
import * as d3 from "d3"
4144
import {
4245
flextree,

0 commit comments

Comments
 (0)