Skip to content

Commit d63af53

Browse files
committed
fix(og-image): resolve v6 takumi renderer CSS and font warnings
1 parent 7593a9d commit d63af53

6 files changed

Lines changed: 18 additions & 11 deletions

File tree

app/assets/css/main.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
@import 'https://cdn.jsdelivr.net/npm/@vue-flow/core@1.46.4/dist/style.css';
2-
@import 'https://cdn.jsdelivr.net/npm/@vue-flow/core@1.46.4/dist/theme-default.css';
3-
/* import the necessary styles for Vue Flow to work */
4-
@import '@vue-flow/core/dist/style.css';
5-
6-
/* import the default theme, this is optional but generally recommended */
7-
@import '@vue-flow/core/dist/theme-default.css';
81
@import 'tailwindcss';
92
@import '@nuxt/ui';
103

114
/* @import "@nuxt/ui-pro"; */
125

6+
/*
7+
* Tailwind v4 declares --tw-border-style via @property (initial-value: solid),
8+
* which nuxt-og-image's takumi renderer doesn't read — expose it at :root so
9+
* the OG card borders render instead of being skipped.
10+
*/
11+
:root {
12+
--tw-border-style: solid;
13+
}
14+
1315
@theme static {
1416
--font-sans: 'Public Sans', sans-serif;
1517

app/components/OgImage/OgImageBlog.takumi.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ withDefaults(
1212
</script>
1313

1414
<template>
15-
<div class="bg-gray-900 w-full h-full flex flex-col">
15+
<div class="bg-gray-900 w-full h-full flex flex-col" style="font-family: 'Inter'">
1616
<div class="absolute top-0 bottom-0 left-26 w-[2px] bg-gray-700" />
1717
<div class="absolute top-0 bottom-0 right-26 w-[2px] bg-gray-700" />
1818
<div class="absolute top-12 inset-x-0 h-[2px] bg-gray-700" />

app/components/OgImage/OgImageMain.takumi.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup lang="ts"></script>
22

33
<template>
4-
<div class="bg-gray-900 w-full h-full flex flex-col">
4+
<div class="bg-gray-900 w-full h-full flex flex-col" style="font-family: 'Inter'">
55
<div class="absolute top-0 bottom-0 left-26 w-[2px] bg-gray-700" />
66
<div class="absolute top-0 bottom-0 right-26 w-[2px] bg-gray-700" />
77
<div class="absolute top-12 inset-x-0 h-[2px] bg-gray-700" />

app/components/OgImage/OgImagePage.takumi.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const clampedDescription = computed(() =>
1414
</script>
1515

1616
<template>
17-
<div class="bg-gray-900 w-full h-full flex flex-col">
17+
<div class="bg-gray-900 w-full h-full flex flex-col" style="font-family: 'Inter'">
1818
<div class="absolute top-0 bottom-0 left-26 w-[2px] bg-gray-700" />
1919
<div class="absolute top-0 bottom-0 right-26 w-[2px] bg-gray-700" />
2020
<div class="absolute top-12 inset-x-0 h-[2px] bg-gray-700" />

app/components/OgImage/OgImagePlugin.takumi.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const clampedDescription = computed(() =>
3232
</script>
3333

3434
<template>
35-
<div class="bg-gray-900 w-full h-full flex flex-col">
35+
<div class="bg-gray-900 w-full h-full flex flex-col" style="font-family: 'Inter'">
3636
<div class="absolute top-0 bottom-0 left-26 w-[2px] bg-gray-700" />
3737
<div class="absolute top-0 bottom-0 right-26 w-[2px] bg-gray-700" />
3838
<div class="absolute top-12 inset-x-0 h-[2px] bg-gray-700" />

app/components/vueFlow/LitestarWorkflow.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ import type { Node, Edge } from '@vue-flow/core'
44
import { VueFlow, MarkerType, Position } from '@vue-flow/core'
55
import { Background } from '@vue-flow/background'
66
import { NodeToolbar } from '@vue-flow/node-toolbar'
7+
// Vue Flow's CSS is only needed where the diagram renders. Importing it here
8+
// (instead of globally in main.css) keeps its self-referential --vf-node-color
9+
// out of the global stylesheet that nuxt-og-image's renderer scans.
10+
import '@vue-flow/core/dist/style.css'
11+
import '@vue-flow/core/dist/theme-default.css'
712
import ContainerNode from './nodes/ContainerNode.vue'
813
import ToolbarNode from './nodes/ToolbarNode.vue'
914
import ConfigNode from './nodes/ConfigNode.vue'

0 commit comments

Comments
 (0)