Skip to content

Commit 1b8ef55

Browse files
authored
Merge pull request #24 from VapiAI/arvind/fix-css-injection
VAP-0000 Fix CSS injection
2 parents 70397e2 + a383b11 commit 1b8ef55

File tree

2 files changed

+36
-6
lines changed

2 files changed

+36
-6
lines changed

src/styles/globals.css

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,40 @@
1-
@tailwind base;
21
@tailwind components;
32
@tailwind utilities;
43

5-
/* Custom base styles for the library */
6-
@layer base {
7-
* {
8-
box-sizing: border-box;
9-
}
4+
/* Scoped base styles only for the widget */
5+
.vapi-widget-wrapper {
6+
box-sizing: border-box;
7+
}
8+
9+
.vapi-widget-wrapper *,
10+
.vapi-widget-wrapper *::before,
11+
.vapi-widget-wrapper *::after {
12+
box-sizing: border-box;
13+
}
14+
15+
/* Reset only within widget to prevent inheritance from host page */
16+
.vapi-widget-wrapper {
17+
line-height: 1.5;
18+
-webkit-text-size-adjust: 100%;
19+
-moz-tab-size: 4;
20+
tab-size: 4;
21+
font-family:
22+
ui-sans-serif,
23+
system-ui,
24+
-apple-system,
25+
BlinkMacSystemFont,
26+
'Segoe UI',
27+
Roboto,
28+
'Helvetica Neue',
29+
Arial,
30+
'Noto Sans',
31+
sans-serif,
32+
'Apple Color Emoji',
33+
'Segoe UI Emoji',
34+
'Segoe UI Symbol',
35+
'Noto Color Emoji';
36+
font-feature-settings: normal;
37+
font-variation-settings: normal;
1038
}
1139

1240
/* Hide scrollbar completely */

tailwind.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/** @type {import('tailwindcss').Config} */
22
export default {
3+
important: '.vapi-widget-wrapper',
4+
35
content: [
46
'./index.html',
57
'./src/**/*.{js,ts,jsx,tsx}',

0 commit comments

Comments
 (0)