Skip to content
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

The Met #2046

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

The Met #2046

wants to merge 2 commits into from

Conversation

sansamiste
Copy link

[DEMO LINK] [https://sansamiste.github.io/layout_landing-page/]

Copy link

@alexander-ignatow alexander-ignatow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job overal

However, you somewhat misuse BEM and need to add some fixes to your project structure

The intent of BLOCK in BEM that blocks are reusable. If you have the block with 2-3 lines of styles - that should not be a block. If you have two blocks that are only used together - please combine them into one

Also please use nesting - it is the wonderful scss feature, that makes the code way more readable

You need to reorganise your project structure and reduce the number of blocks (for instance you don't need body_nav-menu and nav-menu separately)

And one minor visual issue:
Probably you should add transform on hover on each picture separately, not on the whole section
image

Comment on lines +46 to +59
.container {
max-width: 1020px;
margin: 0 auto;
padding: 0 20px;
}

.section-wrapper {
margin: 100px auto;

&:last-child {
margin-bottom: 0;
padding-bottom: 100px;
}
}
Copy link

@alexander-ignatow alexander-ignatow Feb 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not the best idea to use these classes like this
They should be either real BEM blocks (separate files, no margins (!), etc) or elements (then you need to put them inside their parent blocks files)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are multiple issues with all this file - you have multiple classes/blocks here, that are poorly organised and thus are nearly unsupportable

Please make an effort to clean up this file. Here are the possible options, what to do with the classes:

  • Some should go to other blocks as the block elements
  • Some should be converted to independent blocks
  • You may also convert some classes to mixins, and reuse them where you need

}
}

.main-btn {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be converted to a block - and go to a separate file

Comment on lines +1 to +8
html {
scroll-behavior: smooth;
}

body {
font-family: Cinzel, sans-serif;
margin: 0;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and all styles on the tags bellow are totally ok to keep here

Comment on lines +1 to +11
.about-us {
display: flex;
flex-direction: column;
gap: 32px;
}

.about-us__subtitle {
font-size: 12px;
line-height: 16.8px;
text-align: left;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and in other similar places - please use nesting

Suggested change
.about-us {
display: flex;
flex-direction: column;
gap: 32px;
}
.about-us__subtitle {
font-size: 12px;
line-height: 16.8px;
text-align: left;
}
.about-us {
display: flex;
flex-direction: column;
gap: 32px;
&__subtitle {
font-size: 12px;
line-height: 16.8px;
text-align: left;
}
...

Comment on lines +18 to +23
.collection {
display: flex;
flex-direction: column;
align-items: center;
gap: 48px;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

collection is a separate block and should go to a separate file

Comment on lines +36 to +39
.nav {
display: flex;
gap: 24px;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if these are all styles - why you need .nav as a separate block at all?
Just include these styling to header__nav

Comment on lines +1 to +24
.nav-menu {
width: 100%;
height: 100vh;
background-color: $nav-menu-bg-color;

transition: 0.3s;
opacity: 0;
z-index: 2;
pointer-events: none;
transform: translateX(100%);

&:target {
opacity: 1;
transform: translateX(0);
pointer-events: all;
}
}

.body__nav-menu {
position: fixed;
top: 0;
left: 0;
right: 0;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you need separate nav-menu and body__nav-menu?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants