-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Landing_page #2049
base: main
Are you sure you want to change the base?
Landing_page #2049
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good and well-structured project, but some minor improvements are needed
Please add the deploy link to your PR
Please make sure to follow BEM rule: one block = one file
Please remove external styling from BEM blocks (width, height, margins). Some exceptions are ok, but you have too many of these.
If you need a margin on your block, please add an extra element to the parent block and move this styling there.
The intent of blocks is reusability, and it is killed with such styling.
src/styles/blocks/buttons.scss
Outdated
text-align: center; | ||
border-width: 0; | ||
|
||
width: 280px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid explicit width on BEM blocks
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6, | ||
p, | ||
ul, | ||
li { | ||
margin: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go to a separate file - it is not related to page
block
Alternatively - break this file by removing all blocks to their own files, and keeping this styling here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
якщо ми користуємось контейнером, стандартними відступами, заголовками і тд, що є спільним на усіх сторінках сайту, то для класів, що їх визначають, потрібно окремі файли? не дуже розумію як їх організцивати у проекті
src/styles/blocks/common.scss
Outdated
} | ||
} | ||
|
||
.container { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
separate block - separate file
src/styles/blocks/common.scss
Outdated
|
||
.container { | ||
padding-inline: 20px; | ||
width: 280px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again - no explicit width on BEM blocks
src/styles/blocks/common.scss
Outdated
} | ||
} | ||
|
||
.main { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a separate block as well
BEM is one block - one file
src/styles/blocks/header.scss
Outdated
flex-direction: column; | ||
justify-content: flex-end; | ||
|
||
margin-top: -72px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't set explicit margins on blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
потрібно створити обгортку, додатковий блок, вірно ж? а де потрібно надавати для них властивості і значенння цим властивостям, наприклад, у файлі common?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можна додати ці відступи у батьківский блок, або створити елемент у батьківському блоці
Типу такого
.parent {
&--margins {
margin-top: 10px;
}
}
. child {
...
}
usage:
<div class="parent">
<div class="child parent--margins">
content
</div>
</div>
} | ||
} | ||
|
||
.menu { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this block to a separate file
src/styles/blocks/menu.scss
Outdated
box-sizing: border-box; | ||
|
||
height: 100vh; | ||
background-color: #f9f9f9; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have such variable
src/styles/blocks/recommended.scss
Outdated
@@ -0,0 +1,65 @@ | |||
.recommended { | |||
margin-bottom: 96px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no margins in blocks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job! 👍
&--limited { | ||
width: 280px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
DEMO LINK
B&O