Skip to content

Commit f842cd9

Browse files
committed
feat(VImg): add absolute prop
1 parent 14a2e8c commit f842cd9

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

packages/vuetify/src/components/VImg/VImg.sass

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
--v-theme-overlay-multiplier: 3
77
z-index: 0
88

9+
&.v-img--absolute
10+
height: 100%
11+
left: 0
12+
overflow: hidden
13+
position: absolute
14+
top: 0
15+
width: 100%
16+
z-index: -1
17+
918
&--booting .v-responsive__sizer
1019
transition: none
1120

packages/vuetify/src/components/VImg/VImg.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export type VImgSlots = {
5454
}
5555

5656
export const makeVImgProps = propsFactory({
57+
absolute: Boolean,
5758
alt: String,
5859
cover: Boolean,
5960
color: String,
@@ -351,7 +352,10 @@ export const VImg = genericComponent<VImgSlots>()({
351352
<VResponsive
352353
class={[
353354
'v-img',
354-
{ 'v-img--booting': !isBooted.value },
355+
{
356+
'v-img--absolute': props.absolute,
357+
'v-img--booting': !isBooted.value,
358+
},
355359
backgroundColorClasses.value,
356360
roundedClasses.value,
357361
props.class,

0 commit comments

Comments
 (0)