2021-01-03 12:36:12 +01:00
|
|
|
RV-ContentCrop--bottom()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
.RV-Image *
|
|
|
|
object-position bottom
|
2021-01-03 12:36:12 +01:00
|
|
|
|
|
|
|
RV-ContentCrop--top()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
.RV-Image *
|
|
|
|
object-position top
|
2021-01-03 12:36:12 +01:00
|
|
|
|
|
|
|
RV-ContentCrop--right()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
.RV-Image *
|
|
|
|
object-position right
|
2021-01-03 12:36:12 +01:00
|
|
|
|
|
|
|
RV-ContentCrop--left()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
.RV-Image *
|
|
|
|
object-position left
|
|
|
|
|
2021-01-03 12:36:12 +01:00
|
|
|
RV-ContentCrop--center()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
.RV-Image *
|
|
|
|
object-position center
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop--square()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-03 12:36:12 +01:00
|
|
|
width 100%
|
2021-01-17 19:31:19 +01:00
|
|
|
padding-top 100%
|
2021-01-03 12:36:12 +01:00
|
|
|
position relative
|
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
.RV-Image *,
|
|
|
|
div
|
|
|
|
position absolute
|
|
|
|
top 0
|
|
|
|
left 0
|
|
|
|
bottom 0
|
|
|
|
right 0
|
2021-01-03 15:33:36 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop--circle()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
border-radius 50%
|
2021-01-19 23:38:14 +01:00
|
|
|
width 100%
|
|
|
|
padding-top 100%
|
|
|
|
position relative
|
|
|
|
|
|
|
|
.RV-Image *,
|
|
|
|
div
|
|
|
|
position absolute
|
|
|
|
top 0
|
|
|
|
left 0
|
|
|
|
bottom 0
|
|
|
|
right 0
|
2021-01-17 19:31:19 +01:00
|
|
|
|
|
|
|
RV-ContentCrop--XtoY(x=1, y=1)
|
|
|
|
RV-CSSParameter({
|
|
|
|
x: x,
|
|
|
|
y: y
|
|
|
|
})
|
|
|
|
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
width 100%
|
2021-03-03 00:49:21 +01:00
|
|
|
padding-top 100% * (--y / --x)
|
2021-01-17 19:31:19 +01:00
|
|
|
position relative
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
.RV-Image *
|
|
|
|
object-fit cover
|
|
|
|
position absolute
|
|
|
|
top 0
|
|
|
|
left 0
|
|
|
|
bottom 0
|
|
|
|
right 0
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop--1to2()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop__XtoY(1, 2)
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop--2to1()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop__XtoY(2, 1)
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop--4to3()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop__XtoY(4, 3)
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop--16to9()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop__XtoY(16, 9)
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop--3to2()
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Block--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop__XtoY(3, 2)
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop__Text--fade(background-color=white)
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Element--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
&:after
|
|
|
|
background-image linear-gradient(180deg, rgba(255, 255, 255, 0), background-color)
|
|
|
|
display block
|
2021-03-03 00:49:21 +01:00
|
|
|
content '###'
|
|
|
|
color transparent
|
|
|
|
opacity 1
|
2021-01-17 19:31:19 +01:00
|
|
|
position relative
|
2021-03-03 00:49:21 +01:00
|
|
|
top -30px
|
2021-01-17 19:31:19 +01:00
|
|
|
width 100%
|
2021-03-03 00:49:21 +01:00
|
|
|
height 30px
|
2021-01-17 19:31:19 +01:00
|
|
|
z-index 10
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
RV-ContentCrop__Text--ellipsis(background-color=white)
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Element--modifier()
|
2021-01-17 19:31:19 +01:00
|
|
|
&:after
|
|
|
|
position relative
|
|
|
|
display block
|
|
|
|
bottom 1.2em
|
|
|
|
left calc(100% - 3ch)
|
|
|
|
content '...'
|
|
|
|
font-size 1.2em
|
|
|
|
min-width 2em
|
|
|
|
background-color background-color
|
|
|
|
padding 0 2px
|
2021-01-03 12:36:12 +01:00
|
|
|
|
|
|
|
|
2021-01-19 23:38:14 +01:00
|
|
|
RV-ContentCrop(line-height=1.1, height=350px)
|
2021-01-17 19:31:19 +01:00
|
|
|
background-color = white
|
|
|
|
display block
|
|
|
|
overflow hidden
|
2021-01-03 12:36:12 +01:00
|
|
|
|
2021-03-06 21:20:18 +01:00
|
|
|
height 100%
|
|
|
|
width 100%
|
|
|
|
box-sizing border-box
|
2021-01-19 23:38:14 +01:00
|
|
|
|
|
|
|
|
|
|
|
.RV-Image
|
|
|
|
width 100%
|
|
|
|
height 100%
|
|
|
|
object-fit cover
|
|
|
|
display block
|
|
|
|
|
|
|
|
.RV-Text
|
|
|
|
overflow hidden
|
|
|
|
display block
|
|
|
|
position relative
|
|
|
|
text-overflow ellipsis
|
|
|
|
background-color background-color
|
|
|
|
|
|
|
|
line-height line-height
|
|
|
|
max-height floor(height / (line-height * 16)) * (line-height * 16)
|
|
|
|
|
|
|
|
padding 0
|
|
|
|
margin 0
|
|
|
|
|
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
+RV-Block('RV-ContentCrop')
|
2021-01-19 23:38:14 +01:00
|
|
|
RV-CSSParameter({
|
|
|
|
|
|
|
|
})
|
|
|
|
|
2021-01-17 19:31:19 +01:00
|
|
|
line-height = 1.1
|
2021-01-19 23:38:14 +01:00
|
|
|
height = 350px
|
|
|
|
|
|
|
|
RV-ContentCrop(line-height, height)
|
2021-01-17 19:31:19 +01:00
|
|
|
|
2021-03-07 18:47:44 +01:00
|
|
|
RV-ContentCrop__Image()
|
2021-01-17 19:31:19 +01:00
|
|
|
|
2021-03-07 18:47:44 +01:00
|
|
|
+RV-Element('Text')
|
|
|
|
RV-ContentCrop__Text--ellipsis()
|
|
|
|
RV-ContentCrop__Text--fade()
|
2021-01-17 19:31:19 +01:00
|
|
|
|
2021-03-07 18:47:44 +01:00
|
|
|
RV-ContentCrop--bottom()
|
|
|
|
RV-ContentCrop--top()
|
|
|
|
RV-ContentCrop--right()
|
|
|
|
RV-ContentCrop--left()
|
|
|
|
RV-ContentCrop--center()
|
|
|
|
RV-ContentCrop--square()
|
|
|
|
RV-ContentCrop--circle()
|
|
|
|
RV-ContentCrop--1to2()
|
|
|
|
RV-ContentCrop--2to1()
|
|
|
|
RV-ContentCrop--4to3()
|
|
|
|
RV-ContentCrop--16to9()
|
|
|
|
RV-ContentCrop--3to2()
|