Skip to content

Commit 63e2a19

Browse files
committed
fix: prefix all classes to avoid style conflicting, close #271
1 parent 29aeb27 commit 63e2a19

File tree

1 file changed

+19
-19
lines changed
  • packages/devtools/src/runtime/plugins/view

1 file changed

+19
-19
lines changed

packages/devtools/src/runtime/plugins/view/Main.vue

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,11 @@ const time = computed(() => {
219219
id="nuxt-devtools-anchor"
220220
ref="anchorEl"
221221
:style="[anchorStyle, vars]"
222-
:class="{ vertical: isVertical, active: state.open }"
222+
:class="{ 'nuxt-devtools-vertical': isVertical }"
223223
>
224-
<div class="glowing" :style="isDragging ? 'opacity: 0.6 !important' : ''" />
225-
<div ref="panelEl" class="panel" @pointerdown="onPointerDown">
226-
<button class="icon-button nuxt-button" title="Toggle Nuxt DevTools" @click="togglePanel">
224+
<div class="nuxt-devtools-glowing" :style="isDragging ? 'opacity: 0.6 !important' : ''" />
225+
<div ref="panelEl" class="nuxt-devtools-panel" @pointerdown="onPointerDown">
226+
<button class="nuxt-devtools-icon-button nuxt-devtools-nuxt-button" title="Toggle Nuxt DevTools" @click="togglePanel">
227227
<svg
228228
viewBox="0 0 324 324" fill="none" xmlns="http://www.w3.org/2000/svg"
229229
style="margin-top:-1px; height: 1.2em; width: 1.2em;"
@@ -232,17 +232,17 @@ const time = computed(() => {
232232
</svg>
233233
</button>
234234
<div style="border-left: 1px solid #8883;width:1px;height:10px;" />
235-
<div class="label" :title="`${time[0]} load time`">
236-
<div class="label-main">
235+
<div class="nuxt-devtools-label" :title="`${time[0]} load time`">
236+
<div class="nuxt-devtools-label-main">
237237
{{ time[1] }}
238238
</div>
239-
<span class="label-secondary">
239+
<span class="nuxt-devtools-label-secondary">
240240
{{ time[2] }}
241241
</span>
242242
</div>
243243
<template v-if="client.inspector">
244244
<div style="border-left: 1px solid #8883;width:1px;height:10px;" />
245-
<button class="icon-button" title="Toggle Component Inspector" @click="client.inspector.toggle">
245+
<button class="nuxt-devtools-icon-button" title="Toggle Component Inspector" @click="client.inspector.toggle">
246246
<svg
247247
xmlns="http://www.w3.org/2000/svg"
248248
style="height: 1.2em; width: 1.2em; opacity:0.5;"
@@ -267,7 +267,7 @@ const time = computed(() => {
267267
transform: translate(-50%, -50%) rotate(0);
268268
}
269269
270-
#nuxt-devtools-anchor .label {
270+
#nuxt-devtools-anchor .nuxt-devtools-label {
271271
padding: 0 7px 0 8px;
272272
font-size: 0.8em;
273273
line-height: 1em;
@@ -277,28 +277,28 @@ const time = computed(() => {
277277
align-items: center;
278278
}
279279
280-
#nuxt-devtools-anchor .label .label-main {
280+
#nuxt-devtools-anchor .nuxt-devtools-label .nuxt-devtools-label-main {
281281
opacity: 0.8;
282282
}
283283
284-
#nuxt-devtools-anchor .label .label-secondary {
284+
#nuxt-devtools-anchor .nuxt-devtools-label .nuxt-devtools-label-secondary {
285285
font-size: 0.8em;
286286
line-height: 0.6em;
287287
opacity: 0.5;
288288
}
289289
290-
#nuxt-devtools-anchor.vertical .nuxt-button {
290+
#nuxt-devtools-anchor.nuxt-devtools-vertical .nuxt-devtools-nuxt-button {
291291
transform: rotate(-90deg);
292292
}
293293
294-
#nuxt-devtools-anchor.vertical .label {
294+
#nuxt-devtools-anchor.nuxt-devtools-vertical .nuxt-devtools-label {
295295
transform: rotate(-90deg);
296296
flex-direction: column;
297297
gap: 2px;
298298
padding: 0 10px;
299299
}
300300
301-
#nuxt-devtools-anchor .panel {
301+
#nuxt-devtools-anchor .nuxt-devtools-panel {
302302
position: absolute;
303303
left: 0;
304304
top: 0;
@@ -319,12 +319,12 @@ const time = computed(() => {
319319
user-select: none;
320320
}
321321
322-
#nuxt-devtools-anchor.vertical .panel {
322+
#nuxt-devtools-anchor.nuxt-devtools-vertical .nuxt-devtools-panel {
323323
transform: translate(-50%, -50%) rotate(90deg);
324324
box-shadow: 2px -2px 8px var(--nuxt-devtools-widget-shadow);
325325
}
326326
327-
#nuxt-devtools-anchor .icon-button {
327+
#nuxt-devtools-anchor .nuxt-devtools-icon-button {
328328
border-radius: 100%;
329329
width: 30px;
330330
height: 30px;
@@ -334,15 +334,15 @@ const time = computed(() => {
334334
opacity: 0.8;
335335
transition: opacity 0.2s ease-in-out;
336336
}
337-
#nuxt-devtools-anchor .icon-button:hover {
337+
#nuxt-devtools-anchor .nuxt-devtools-icon-button:hover {
338338
opacity: 1;
339339
}
340340
341-
#nuxt-devtools-anchor:hover .glowing {
341+
#nuxt-devtools-anchor:hover .nuxt-devtools-glowing {
342342
opacity: 0.6;
343343
}
344344
345-
#nuxt-devtools-anchor .glowing {
345+
#nuxt-devtools-anchor .nuxt-devtools-glowing {
346346
position: absolute;
347347
left: 0;
348348
top: 0;

0 commit comments

Comments
 (0)