BEM naming

This commit is contained in:
2025-12-11 20:41:43 +10:00
parent 7a83c54165
commit 05b624120d
3 changed files with 38 additions and 50 deletions

View File

@@ -1,5 +1,4 @@
// БЭМ блок: Меню навигации
.menu
.navbar
border-top double thick silver
border-bottom double thick silver
font-size 0
@@ -8,7 +7,7 @@
grid-template-rows 1fr
justify-items start
&__link
&__link__wrapper
color black
text-decoration none
@@ -31,14 +30,13 @@
border-left double thin silver
border-right double thin silver
// БЭМ блок: Hero изображения
.hero-images
.gallery
display flex
flex-direction row
width 90%
margin auto
&__item
&__image
margin auto
width 100%
border thin solid black
@@ -46,16 +44,12 @@
&:nth-child(2n+1)
margin-top 10px
// БЭМ блок: Основной контейнер
.main
.main-container
display grid
grid-template-columns 3fr 1fr
grid-template-rows 1fr
&__content
// Стили для основного контента
// БЭМ блок: Информационный блок
.info-block
border solid thin black
padding 2vw
@@ -67,12 +61,12 @@
text-align center
&__container
&_layout_a
&_layout-a
display grid
grid-template-columns 3fr 3fr 2fr
grid-template-rows 1fr
&_layout_b
&_layout-b
display grid
grid-template-columns 4fr 7fr 4fr
grid-template-rows 1fr
@@ -88,18 +82,15 @@
width 100%
&__link
// Стили для ссылок
color inherit
&__details
// Стили для деталей
// БЭМ блок: Боковая панель
.sidebar
border-left thin solid black
margin 30px 0 0 50px
// БЭМ блок: Маленькая карточка
.small-card
margin 20px 10px 0
display grid
@@ -114,9 +105,6 @@
font-weight bold
text-align right
&__text
// Базовые стили для текста
&__link
display block
text-align right
@@ -127,14 +115,17 @@
width 100%
margin-left:10px
// Медиа-запросы
@media screen and (max-width: 1000px)
.small-card
display flex
flex-direction column
.sidebar
margin 0
width:100%
@media screen and (max-width: 800px)
.menu
.navbar
grid-template-columns 1fr 1fr
grid-template-rows 1fr 1fr 1fr
justify-items center
@@ -145,19 +136,19 @@
border-left none
border-right none
.hero-images
.gallery
display inline-flex
flex-direction column
width 100%
&__item
&__image
width 100%
height 100%
&:nth-child(2n+1)
margin-top 0px
.main
.main-container
display flex
flex-direction column