Skip to content

Commit 6955710

Browse files
committed
chore: revert to non-nested css
1 parent da6f15a commit 6955710

File tree

1 file changed

+51
-51
lines changed

1 file changed

+51
-51
lines changed

app/components/Code/Viewer.vue

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -135,57 +135,57 @@ watch(
135135
flex: 1;
136136
min-width: 0;
137137
max-width: calc(100% - var(--line-numbers-width));
138+
}
139+
140+
.code-content:deep(pre) {
141+
margin: 0;
142+
padding: 0;
143+
background: transparent !important;
144+
overflow: visible;
145+
max-width: 100%;
146+
}
147+
148+
.code-content:deep(code) {
149+
display: block;
150+
padding: 0 1rem;
151+
background: transparent !important;
152+
max-width: 100%;
153+
}
154+
155+
.code-content:deep(.line) {
156+
display: flex;
157+
flex-wrap: wrap;
158+
/* Ensure consistent height matching line numbers */
159+
line-height: 24px;
160+
min-height: 24px;
161+
white-space: pre-wrap;
162+
overflow: hidden;
163+
transition: background-color 0.1s;
164+
max-width: 100%;
165+
}
166+
167+
/* Highlighted lines in code content - extend full width with negative margin */
168+
.code-content:deep(.line.highlighted) {
169+
@apply bg-yellow-500/20;
170+
margin: 0 -1rem;
171+
padding: 0 1rem;
172+
}
173+
174+
/* Clickable import links */
175+
.code-content:deep(.import-link) {
176+
color: inherit;
177+
text-decoration: underline;
178+
text-decoration-style: dotted;
179+
text-decoration-color: rgba(158, 203, 255, 0.5); /* syntax.str with transparency */
180+
text-underline-offset: 2px;
181+
transition:
182+
text-decoration-color 0.15s,
183+
text-decoration-style 0.15s;
184+
cursor: pointer;
185+
}
138186
139-
&:deep(pre) {
140-
margin: 0;
141-
padding: 0;
142-
background: transparent !important;
143-
overflow: visible;
144-
max-width: 100%;
145-
}
146-
147-
&:deep(code) {
148-
display: block;
149-
padding: 0 1rem;
150-
background: transparent !important;
151-
max-width: 100%;
152-
}
153-
154-
&:deep(.line) {
155-
display: flex;
156-
flex-wrap: wrap;
157-
/* Ensure consistent height matching line numbers */
158-
line-height: 24px;
159-
min-height: 24px;
160-
white-space: pre-wrap;
161-
overflow: hidden;
162-
transition: background-color 0.1s;
163-
max-width: 100%;
164-
}
165-
166-
/* Highlighted lines in code content - extend full width with negative margin */
167-
&:deep(.line.highlighted) {
168-
@apply bg-yellow-500/20;
169-
margin: 0 -1rem;
170-
padding: 0 1rem;
171-
}
172-
173-
/* Clickable import links */
174-
&:deep(.import-link) {
175-
color: inherit;
176-
text-decoration: underline;
177-
text-decoration-style: dotted;
178-
text-decoration-color: rgba(158, 203, 255, 0.5); /* syntax.str with transparency */
179-
text-underline-offset: 2px;
180-
transition:
181-
text-decoration-color 0.15s,
182-
text-decoration-style 0.15s;
183-
cursor: pointer;
184-
}
185-
186-
&:deep(.import-link:hover) {
187-
text-decoration-style: solid;
188-
text-decoration-color: #9ecbff; /* syntax.str - light blue */
189-
}
187+
.code-content:deep(.import-link:hover) {
188+
text-decoration-style: solid;
189+
text-decoration-color: #9ecbff; /* syntax.str - light blue */
190190
}
191191
</style>

0 commit comments

Comments
 (0)