mirror of
https://git.rdcenter.ru/RDCenter/skb-kit.git
synced 2026-12-05 02:59:45 +00:00
scss для 1 фото и видео
This commit is contained in:
1 parent
684e6617db
commit
449478cac9
1 file changed
+35
-1
@@ -31,6 +31,39 @@ $swiper-button-arrow-size: 20px;
|
||||
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 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@@ -41,6 +74,7 @@ $swiper-button-arrow-size: 20px;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
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 {
|
||||
flex-direction: column !important;
|
||||
align-items: stretch !important;
|
||||
|
||||
Reference in new issue
Block a user