Skip to content

Commit f0070fe

Browse files
committed
feat: tweak styling
1 parent a08574a commit f0070fe

16 files changed

+29
-16
lines changed

packages/client/internals/ClicksSlider.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function onMousedown() {
8787
v-model="current"
8888
class="range"
8989
type="range" :min="start" :max="total" :step="1"
90-
absolute inset-0 z-10 op0
90+
absolute inset-0 z-label op0
9191
:class="readonly ? 'pointer-events-none' : ''"
9292
:style="{ '--thumb-width': `${1 / (length + 1) * 100}%` }"
9393
@mousedown="onMousedown"

packages/client/internals/ContextMenu.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const top = computed(() => {
6161
v-if="currentContextMenu"
6262
ref="container"
6363
:style="`left:${left}px;top:${top}px`"
64-
class="fixed z-100 w-60 flex flex-wrap justify-items-start p-1 animate-fade-in animate-duration-100 backdrop-blur bg-main bg-opacity-75! border border-main rounded-md shadow overflow-hidden select-none"
64+
class="slidev-glass-effect fixed z-context-menu w-60 flex flex-wrap justify-items-start p-1 animate-fade-in animate-duration-100 rounded-md shadow overflow-hidden select-none"
6565
@contextmenu.prevent=""
6666
@click="closeContextMenu"
6767
>

packages/client/internals/DragControl.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ watchEffect(() => {
375375
@pointermove="onPointermove"
376376
@pointerup="onPointerup"
377377
>
378-
<div class="absolute inset-0 z-100 dark:b-gray-400" :class="isArrow ? '' : 'b b-dark'">
378+
<div class="absolute inset-0 z-nav dark:b-gray-400" :class="isArrow ? '' : 'b b-dark'">
379379
<template v-if="!autoHeight">
380380
<div v-bind="getCornerProps(true, true)" />
381381
<div v-bind="getCornerProps(false, false)" />

packages/client/internals/DrawingControls.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ function setBrushColor(color: typeof brush.color) {
4242
<template>
4343
<Draggable
4444
v-if="drawingEnabled || drawingPinned"
45-
class="flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-20 border border-main"
45+
class="flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-nav border border-main"
4646
:class="!drawingEnabled && drawingPinned ? 'opacity-40 hover:opacity-90' : ''"
4747
storage-key="slidev-drawing-pos"
4848
:initial-x="10"

packages/client/internals/FormCheckbox.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ const value = defineModel<boolean>('modelValue', {
1111
<template>
1212
<div border="~ main rounded" flex="~ gap-2 items-center" relative h-5 w-5 p0.5 hover:bg-active p1>
1313
<div i-ri-check-line :class="value ? '' : 'op0'" />
14-
<input v-model="value" type="checkbox" absolute inset-0 z-10 opacity-0.1 :disabled="disabled">
14+
<input v-model="value" type="checkbox" absolute inset-0 opacity-0.1 :disabled="disabled">
1515
</div>
1616
</template>

packages/client/internals/MenuButton.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ onClickOutside(el, () => {
3030
<KeepAlive>
3131
<div
3232
v-if="value"
33-
class="rounded-md bg-main text-main shadow absolute bottom-10 left-0 z-20"
33+
class="rounded-md bg-main text-main shadow-xl absolute bottom-10 left-0 z-menu"
3434
dark:border="~ main"
3535
>
3636
<slot name="menu" />

packages/client/internals/Modal.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function onClick() {
2020

2121
<template>
2222
<KeepAlive>
23-
<div v-if="value" class="fixed top-0 bottom-0 left-0 right-0 grid z-20">
23+
<div v-if="value" class="fixed top-0 bottom-0 left-0 right-0 grid z-modal">
2424
<div
2525
bg="black opacity-80"
2626
class="absolute top-0 bottom-0 left-0 right-0 -z-1"

packages/client/internals/NavControls.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function onMouseLeave() {
4848
4949
const barStyle = computed(() => props.persist
5050
? 'text-$slidev-controls-foreground bg-transparent'
51-
: 'rounded-md bg-main shadow dark:border dark:border-main')
51+
: 'rounded-md bg-main shadow-xl dark:border dark:border-main')
5252
5353
const RecordingControls = shallowRef<any>()
5454
if (__SLIDEV_FEATURE_RECORD__)

packages/client/internals/QuickOverview.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ watchEffect(() => {
109109
>
110110
<div
111111
v-if="showOverview"
112-
class="fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-20 bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none"
112+
class="fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-modal bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none"
113113
@click="close"
114114
>
115115
<div
@@ -157,7 +157,7 @@ watchEffect(() => {
157157
</div>
158158
</div>
159159
</Transition>
160-
<div v-if="showOverview" class="fixed top-4 right-4 z-20 text-gray-400 flex flex-col items-center gap-2">
160+
<div v-if="showOverview" class="fixed top-4 right-4 z-modal text-gray-400 flex flex-col items-center gap-2">
161161
<IconButton title="Close" class="text-2xl" @click="close">
162162
<div class="i-carbon:close" />
163163
</IconButton>

packages/client/internals/SideEditor.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ throttledWatch(
121121

122122
<template>
123123
<div
124-
v-if="resize" class="fixed bg-gray-400 select-none opacity-0 hover:opacity-10 z-100"
124+
v-if="resize" class="fixed bg-gray-400 select-none opacity-0 hover:opacity-10 z-dragging"
125125
:class="vertical ? 'left-0 right-0 w-full h-10px' : 'top-0 bottom-0 w-10px h-full'" :style="{
126126
opacity: handlerDown ? '0.3' : undefined,
127127
bottom: vertical ? `${editorHeight - 5}px` : undefined,

packages/client/internals/WebCamera.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ onMounted(fixPosition)
6363
<template>
6464
<div
6565
v-if="streamCamera && showAvatar && currentCamera !== 'none'"
66-
class="fixed z-10"
66+
class="fixed z-camera"
6767
:style="containerStyle"
6868
>
6969
<div
@@ -83,7 +83,7 @@ onMounted(fixPosition)
8383

8484
<div
8585
ref="handler"
86-
class="absolute bottom-0 right-0 rounded-full bg-main shadow opacity-0 shadow z-30 hover:opacity-100 dark:border dark:border-true-gray-700"
86+
class="absolute bottom-0 right-0 rounded-full bg-main shadow opacity-0 shadow z-dragging hover:opacity-100 dark:border dark:border-true-gray-700"
8787
:style="handleStyle"
8888
:class="handlerDown ? '!opacity-100' : ''"
8989
/>

packages/client/pages/export.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ if (import.meta.hot) {
281281
</div>
282282
</div>
283283
<div id="export-container" ref="export-container" relative>
284-
<div print:hidden fixed right-5 bottom-5 bg-main px2 py0 shadow z-1000 border="~ main rounded">
284+
<div print:hidden fixed right-5 bottom-5 px2 py0 z-label slidev-glass-effect>
285285
<span op75>Rendering as {{ capturedImages ? 'Captured Images' : 'DOM' }} </span>
286286
</div>
287287
<div v-show="!capturedImages" id="export-content" ref="export-content">

packages/client/pages/overview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ onMounted(() => {
135135
</button>
136136
<div
137137
v-if="route.meta?.slide?.title"
138-
class="pointer-events-none select-none absolute left-110% backdrop-blur-8 top-50% translate-y--50% ws-nowrap z-10 px2 shadow-xl rounded border border-main transition duration-400 op0 group-hover:op100"
138+
class="pointer-events-none select-none absolute left-110% top-50% translate-y--50% ws-nowrap z-label px2 slidev-glass-effect transition duration-400 op0 group-hover:op100"
139139
:class="activeBlocks.includes(idx) ? 'text-primary' : 'text-main important-text-op-50'"
140140
>
141141
{{ route.meta?.slide?.title }}

packages/client/styles/index.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ body,
1010
overflow: hidden;
1111
print-color-adjust: exact;
1212
-webkit-print-color-adjust: exact;
13-
@apply font-sans;
13+
--uno: font-sans bg-main;
1414
}
1515

1616
html {

packages/client/uno.config.ts

+11
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,17 @@ export default defineConfig({
3030
'abs-b': 'absolute bottom-0 left-0 right-0',
3131
'abs-bl': 'absolute bottom-0 left-0',
3232
'abs-br': 'absolute bottom-0 right-0',
33+
34+
'z-drawing': 'z-10',
35+
'z-camera': 'z-15',
36+
'z-dragging': 'z-18',
37+
'z-menu': 'z-20',
38+
'z-label': 'z-40',
39+
'z-nav': 'z-50',
40+
'z-context-menu': 'z-60',
41+
'z-modal': 'z-70',
42+
43+
'slidev-glass-effect': 'shadow-xl backdrop-blur-8 border border-main bg-main bg-opacity-75!',
3344
},
3445
// Slidev Specific Variants, probably extrat to a preset later
3546
variants: [

packages/slidev/node/cli.ts

+2
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ cli.command(
312312
restartServer()
313313
})
314314
watcher.on('change', (file) => {
315+
if (typeof file !== 'string')
316+
return
315317
if (FILES_CREATE_RESTART.includes(file))
316318
return
317319
console.log(yellow(`\n file ${file} changed, restarting...\n`))

0 commit comments

Comments
 (0)