2017-12-04 13:39:15 +00:00
|
|
|
$dimensions: 16 24 32 48 64 96 128 !default
|
2016-02-13 18:59:09 +00:00
|
|
|
|
|
|
|
.image
|
|
|
|
display: block
|
|
|
|
position: relative
|
|
|
|
img
|
|
|
|
display: block
|
2016-05-29 12:23:10 +00:00
|
|
|
height: auto
|
|
|
|
width: 100%
|
2017-12-04 13:21:38 +00:00
|
|
|
&.is-rounded
|
2020-08-15 23:40:51 +00:00
|
|
|
border-radius: var(--radius-rounded, #{$radius-rounded})
|
2019-07-16 22:07:43 +00:00
|
|
|
&.is-fullwidth
|
|
|
|
width: 100%
|
2016-04-10 15:00:32 +00:00
|
|
|
// Ratio
|
2016-02-13 18:59:09 +00:00
|
|
|
&.is-square,
|
|
|
|
&.is-1by1,
|
2018-01-24 17:57:04 +00:00
|
|
|
&.is-5by4,
|
2016-02-13 18:59:09 +00:00
|
|
|
&.is-4by3,
|
|
|
|
&.is-3by2,
|
2018-01-24 17:57:04 +00:00
|
|
|
&.is-5by3,
|
2016-02-13 18:59:09 +00:00
|
|
|
&.is-16by9,
|
2018-01-24 17:57:04 +00:00
|
|
|
&.is-2by1,
|
|
|
|
&.is-3by1,
|
|
|
|
&.is-4by5,
|
|
|
|
&.is-3by4,
|
|
|
|
&.is-2by3,
|
|
|
|
&.is-3by5,
|
|
|
|
&.is-9by16,
|
|
|
|
&.is-1by2,
|
|
|
|
&.is-1by3
|
2018-10-31 13:50:49 +00:00
|
|
|
img,
|
|
|
|
.has-ratio
|
2018-09-04 13:24:50 +00:00
|
|
|
@extend %overlay
|
2016-02-13 18:59:09 +00:00
|
|
|
height: 100%
|
|
|
|
width: 100%
|
|
|
|
&.is-square,
|
|
|
|
&.is-1by1
|
|
|
|
padding-top: 100%
|
2018-01-24 17:57:04 +00:00
|
|
|
&.is-5by4
|
|
|
|
padding-top: 80%
|
2016-02-13 18:59:09 +00:00
|
|
|
&.is-4by3
|
|
|
|
padding-top: 75%
|
|
|
|
&.is-3by2
|
|
|
|
padding-top: 66.6666%
|
2018-01-24 17:57:04 +00:00
|
|
|
&.is-5by3
|
|
|
|
padding-top: 60%
|
2016-02-13 18:59:09 +00:00
|
|
|
&.is-16by9
|
|
|
|
padding-top: 56.25%
|
|
|
|
&.is-2by1
|
|
|
|
padding-top: 50%
|
2018-01-24 17:57:04 +00:00
|
|
|
&.is-3by1
|
|
|
|
padding-top: 33.3333%
|
|
|
|
&.is-4by5
|
|
|
|
padding-top: 125%
|
|
|
|
&.is-3by4
|
|
|
|
padding-top: 133.3333%
|
|
|
|
&.is-2by3
|
|
|
|
padding-top: 150%
|
|
|
|
&.is-3by5
|
|
|
|
padding-top: 166.6666%
|
|
|
|
&.is-9by16
|
|
|
|
padding-top: 177.7777%
|
|
|
|
&.is-1by2
|
|
|
|
padding-top: 200%
|
|
|
|
&.is-1by3
|
|
|
|
padding-top: 300%
|
2016-04-10 15:00:32 +00:00
|
|
|
// Sizes
|
2016-02-13 18:59:09 +00:00
|
|
|
@each $dimension in $dimensions
|
|
|
|
&.is-#{$dimension}x#{$dimension}
|
|
|
|
height: $dimension * 1px
|
|
|
|
width: $dimension * 1px
|