Skip to content

Commit 694d494

Browse files
authored
Don't have PrimeVue's CSS leak to the outside world.
2 parents 474c61e + 2f710b9 commit 694d494

File tree

6 files changed

+47
-27
lines changed

6 files changed

+47
-27
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"url": "git+https://github.com/opencor/webapp.git"
2424
},
2525
"type": "module",
26-
"version": "0.20251209.0",
26+
"version": "0.20251210.0",
2727
"scripts": {
2828
"archive:web": "bun src/renderer/scripts/archive.web.js",
2929
"build": "electron-vite build",

src/renderer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"./style.css": "./dist/opencor.css"
4141
},
42-
"version": "0.20251209.0",
42+
"version": "0.20251210.0",
4343
"scripts": {
4444
"build": "vite build",
4545
"build:lib": "vite build --config vite.lib.config.ts && cp index.d.ts dist/index.d.ts",

src/renderer/src/App.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,7 @@ const rawLorenzOmexFile = vue.ref<Uint8Array>(
146146
])
147147
);
148148
</script> -->
149+
150+
<style>
151+
@import "tailwindcss/preflight.css" layer(base);
152+
</style>

src/renderer/src/assets/app.css

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,47 @@
1-
@import "tailwindcss";
1+
@layer theme, base, components, utilities;
2+
3+
@import "tailwindcss/theme.css" layer(theme);
4+
@import "tailwindcss/utilities.css" layer(utilities);
25
@import "tailwindcss-primeui";
36
@import "primeicons/primeicons.css";
47

5-
:root {
6-
--border-color: var(--p-content-border-color);
7-
}
8-
98
body {
10-
background-color: var(--p-content-background);
11-
color: var(--p-content-color);
12-
margin: 0;
13-
font-family:
14-
Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
15-
"Helvetica Neue", sans-serif;
16-
text-rendering: optimizeLegibility;
17-
-webkit-font-smoothing: antialiased;
18-
-moz-osx-font-smoothing: grayscale;
19-
user-select: none;
20-
}
9+
*,
10+
::before,
11+
::after {
12+
box-sizing: initial;
13+
}
2114

22-
.p-component {
23-
transition: none !important;
24-
}
15+
.opencor {
16+
--border-color: var(--p-content-border-color);
2517

26-
a {
27-
color: var(--p-button-link-color);
28-
}
18+
*,
19+
::before,
20+
::after {
21+
box-sizing: border-box;
22+
}
23+
24+
background-color: var(--p-content-background);
25+
color: var(--p-content-color);
26+
margin: 0;
27+
font-family:
28+
Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans",
29+
"Helvetica Neue", sans-serif;
30+
text-rendering: optimizeLegibility;
31+
-webkit-font-smoothing: antialiased;
32+
-moz-osx-font-smoothing: grayscale;
33+
user-select: none;
34+
35+
.p-component {
36+
transition: none !important;
37+
}
38+
39+
a {
40+
color: var(--p-button-link-color);
41+
}
2942

30-
:focus {
31-
outline: none !important;
43+
:focus {
44+
outline: none !important;
45+
}
46+
}
3247
}

src/renderer/src/components/MainMenu.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ if (common.isDesktop()) {
251251
252252
.p-menubar-item-link {
253253
padding: 0.25rem 0.5rem !important;
254+
color: var(--p-menubar-item-color);
254255
}
255256
256257
:deep(.p-menubar-root-list) {

src/renderer/src/components/OpenCOR.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<BlockUI
33
ref="blockUi"
44
:blocked="compBlockUiEnabled"
5-
class="overflow-hidden h-full"
5+
class="opencor overflow-hidden h-full"
66
@click="activateInstance"
77
@focus="activateInstance"
88
@focusin="activateInstance"

0 commit comments

Comments
 (0)