Skip to content

Commit c2ee6bd

Browse files
committed
Merge branch '4.0.0-dev' of https://github.com/themeum/tutor into shewa-v4
2 parents b52af7d + 5c1b021 commit c2ee6bd

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

assets/core/scss/utilities/_layout.scss

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,49 @@ $overflow-types: auto, hidden, visible, scroll;
308308
flex-shrink: 0;
309309
}
310310

311+
// ------------------------
312+
// Aspect ratio utility
313+
// ------------------------
314+
.tutor-ratio {
315+
content: ' ';
316+
position: relative;
317+
width: 100%;
318+
display: block;
319+
320+
&-16x9 {
321+
padding-top: 56.25%;
322+
}
323+
324+
&-4x3 {
325+
padding-top: 75%;
326+
}
327+
328+
&-3x2 {
329+
padding-top: 66.66%;
330+
}
331+
332+
&-3x1 {
333+
padding-top: 33.33%;
334+
}
335+
336+
&-1x1 {
337+
padding-top: 100%;
338+
}
339+
340+
> * {
341+
position: absolute !important;
342+
top: 0 !important;
343+
left: 0 !important;
344+
width: 100% !important;
345+
height: 100% !important;
346+
}
347+
348+
> img {
349+
object-fit: cover;
350+
object-position: center;
351+
}
352+
}
353+
311354
// ------------------------
312355
// Responsive Utilities
313356
// ------------------------

0 commit comments

Comments
 (0)