Skip to content

Commit 88c37a5

Browse files
lukicenturikelsos
authored andcommitted
style: blur backdrop for dialog overlay
1 parent 9de307e commit 88c37a5

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

example/src/views/NavigationDrawerView.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const navigationDrawers = ref<NavigationDrawerData[]>([
1212
{ modelValue: false, label: 'Left', temporary: true },
1313
{ modelValue: false, label: 'Right', position: 'right', temporary: true },
1414
{ modelValue: false, label: 'Persistent', temporary: false },
15+
{ modelValue: false, label: 'With Overlay', temporary: true, overlay: true },
1516
]);
1617
</script>
1718

src/components/overlays/dialog/RuiDialog.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function onClickOutside() {
195195
}
196196
197197
.overlay {
198-
@apply absolute top-0 left-0 w-full h-full bg-black/[0.5];
198+
@apply absolute top-0 left-0 w-full h-full backdrop-blur bg-rui-grey-500/[0.5];
199199
}
200200
201201
.content {
@@ -205,4 +205,10 @@ function onClickOutside() {
205205
@apply top-1/2 -translate-y-1/2 bottom-auto;
206206
}
207207
}
208+
209+
:global(.dark) {
210+
.overlay {
211+
@apply bg-black/[0.5];
212+
}
213+
}
208214
</style>

src/components/overlays/navigation-drawer/RuiNavigationDrawer.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ const activatorAttrs = computed(() => ({
132132

133133
<style lang="scss" module>
134134
.overlay {
135-
@apply absolute top-0 left-0 w-full h-full bg-black/[0.5] z-[10000];
135+
@apply absolute top-0 left-0 w-full h-full backdrop-blur bg-rui-grey-500/[0.5] z-[10000];
136136
}
137137
138138
.content {
@@ -170,6 +170,10 @@ const activatorAttrs = computed(() => ({
170170
}
171171
172172
:global(.dark) {
173+
.overlay {
174+
@apply bg-black/[0.5];
175+
}
176+
173177
.content {
174178
@apply bg-[#363636];
175179
}

0 commit comments

Comments
 (0)