Skip to content

Commit 4bfe8f3

Browse files
committed
clean-up
1 parent 131d8e9 commit 4bfe8f3

2 files changed

Lines changed: 8 additions & 13 deletions

File tree

‎src/ansys/visor/visor-client/index.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<body>
1010
<div
1111
id="VisorContainer"
12+
class="visor-embed-style"
1213
style="position: absolute; inset: 0; overflow: hidden; z-index: 2"
1314
></div>
1415
<script type="module" src="/src/main.tsx"></script>

‎src/ansys/visor/visor-client/src/styles/index.css‎

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
/* Scope the global reset to `.visor-embed-style` / `.visor-root` so it does not
1+
/* Scope the global reset to `.visor-embed-style` so it does not
22
affect the host application when Visor is embedded. Wrap Visor content
3-
in a container with class `visor-embed-style` (preferred) or `visor-root`. */
3+
in a container with class `visor-embed-style`. */
44
.visor-embed-style,
5-
.visor-root,
65
.visor-embed-style *,
7-
.visor-root *,
86
.visor-embed-style *::before,
9-
.visor-root *::before,
10-
.visor-embed-style *::after,
11-
.visor-root *::after {
7+
.visor-embed-style *::after {
128
margin: 0;
139
padding: 0;
1410
line-height: 1;
@@ -34,10 +30,9 @@ html {
3430
font-display: swap;
3531
}
3632

37-
/* Scoped styles: set height and the AWC font only within the Visor root
33+
/* Scoped styles: set height and the AWC font only within the Visor embed root
3834
so these font and sizing rules do not leak into host applications. */
39-
.visor-embed-style,
40-
.visor-root {
35+
.visor-embed-style {
4136
height: 100%;
4237
font-family:
4338
'Source Sans 3',
@@ -57,11 +52,10 @@ html {
5752
}
5853

5954
/* Ensure Visor typography matches standalone appearance while keeping
60-
styles scoped to the root container so they don't leak into host apps. */
55+
styles scoped to the embed root container so they don't leak into host apps. */
6156
.visor-embed-style,
62-
.visor-root,
6357
.visor-embed-style *,
64-
.visor-root * {
58+
.visor-embed-style * {
6559
-webkit-font-smoothing: antialiased;
6660
-moz-osx-font-smoothing: grayscale;
6761
}

0 commit comments

Comments
 (0)