scss для 1 фото и видео

This commit is contained in:
xomimishka committed 2025-07-11 11:40:10 +03:00
1 parent 684e6617db
commit 449478cac9
1 file changed
+35 -1
+35 -1
View File
@@ -31,6 +31,39 @@ $swiper-button-arrow-size: 20px;
margin-bottom: 2em; margin-bottom: 2em;
} }
.wp-block-video,
.wp-block-embed {
width: 100%;
max-width: 100%;
margin: 1em 0;
video,
iframe {
width: 100%;
height: auto;
aspect-ratio: 16 / 9; // Стандартное соотношение сторон для видео
border-radius: $border-raduis;
background: $background-tape;
}
}
// Для случаев, когда нужно фиксированное соотношение сторон
.fixed-aspect-video {
position: relative;
padding-bottom: 56.25%; /* 16:9 соотношение */
height: 0;
overflow: hidden;
iframe,
video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
.is-layout-flex { .is-layout-flex {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@@ -41,6 +74,7 @@ $swiper-button-arrow-size: 20px;
max-width: 100%; max-width: 100%;
height: auto; height: auto;
object-fit: contain !important; // Wordpress накидывает styles к элементу, приходится перебивать object-fit: contain !important; // Wordpress накидывает styles к элементу, приходится перебивать
pointer-events: none;
} }
} }
@@ -207,7 +241,7 @@ $swiper-button-arrow-size: 20px;
} }
} }
@media (max-width: 768px) { @media (max-width: 1200px) {
.project .is-layout-flex { .project .is-layout-flex {
flex-direction: column !important; flex-direction: column !important;
align-items: stretch !important; align-items: stretch !important;