-
Notifications
You must be signed in to change notification settings - Fork 4.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
create HTML page using blocks previous created #4164
base: master
Are you sure you want to change the base?
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.
Your code is good overall and very organized!! You are improving a lot Matheus, and I hope you forgive me for being a little harsh sometimes but I'm only that way because you are a great student and I trust that you can make mind-blowing solutions!!
</header> | ||
|
||
<main | ||
class="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.
In general a container is not counted as a block, just some block of html code, so in this case it's fine
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.
Yeah, I just made like that because it's a requirement "- use <main>
tag for cards container". Some requirements are awful..
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.
Also, don't worry about the extensive feedbacks, I really want to improve my skills and every detail it's very important to me. Thank you so much!
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.
Some minor issues that prevent the expected behavior accordingly to figma design. I believe you can fix them all quite easily ;)
> | ||
Apple | ||
</a> | ||
</li> |
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.
Matheus, you could add an empty line here and between other sibling elements in this file, check Code Styles Rules
Buy | ||
</a> | ||
</div> | ||
</div> |
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.
An empty line here would be good also, for the same reason of my previous comment, these 2 cards are siblings
src/styles/stars.scss
Outdated
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.
I believe you finished this task before we review the others Stars and Product Card.
The approach you've used there is a better implementation for the stars styling for 2 main reasons:
- Here you have more code repetition, you could declare all stars with same styling using a different synthax (stars--0, stars--1...)
- Your declaration here is applying a fixed style for all stars reviews, you see, combining your BEM naming on the stars declaration in HTML with this styling here, all Product Cards will have 4 active stars, even if we change the class in HTML. Ideally, if we changed HTML class to, let's say stars__star--2, only 2 stars would be active, not 4, but because you are declaring only the last-child to be not-active, you always get 4 stars on the card, no matter the actual review count.
**Not sure if my explanation was clear, but you can ask me on chat if you want
src/styles/mixins.scss
Outdated
@@ -0,0 +1,17 @@ | |||
@mixin two-columns { |
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.
I like your use of mixins, but I'd like to suggest a rename for them to allow them to be used more often, which is the purpose of a mixin (imagining this is part of a bigger project).
So, the way I see it, two-columns is used for small-screens or mobile, three-columns is used for medium-screens* or tablets and four-columns is used for large-screens or desktop.
Giving them a name as mentioned makes it possible to re-use them in the future for other purposes other than only the column count, imagine that you wanted to change the background color of your page based on screen size too, in this way, the name would remain meaningful for all usage.
src/styles/card.scss
Outdated
justify-content: center; | ||
|
||
@include two-columns { | ||
grid-template-columns: repeat(auto-fit, 200px); |
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.
And here we have a problem, actually 2:
- You are using auto-fit which auto calculates the column count based on element width. In this case, as the element is the whole page itself, and you are applying it for screens of max 488px, it ends up returning 2 columns (488 / 200 = 2,...). However, if let's say, you wanted 2 columns on a bigger screen, this would not be the case. And if a screen is 630px wide, it would result in 3 columns instead of 2, which is also not a desired behavior here.
- Second point is that you are using the same declaration for all mixins that represent screen size, so either there is no need to use the mixins, or the style declaration should be different for all mixins. Can you guess which option is the correct one? :)
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.
I just checked. It says I'm 1 commit behind, but just commited an update and now it's working great!
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.
Great effort, @MatheusStefan! You're almost there, just a few touch-ups and your solution should be perfect! 👏
Also, your deployment seems to be outdated, please make sure to deploy the latest version for review
@include on-mobile { | ||
grid-template-columns: repeat(2, 200px); | ||
} | ||
|
||
@include on-tablet { | ||
grid-template-columns: repeat(3, 200px); | ||
} | ||
|
||
@include on-desktop { | ||
grid-template-columns: repeat(4, 200px); | ||
} |
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.
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.
Gonna check this, thank's!
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.
Great job, @MatheusStefan! Sorry, I overlooked some issues in my last review, and I'll have to ask you to fix them 😬. If you have any questions, please let me know
</nav> | ||
</header> | ||
|
||
<aside |
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.
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.
I used an aside tag to do a menu when on mobile. I know it's not a requeriment, but I wanted to be completely responsive, if that's okay(?). If not I'll remove it.
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.
Also, I talked with Pedro about the deploy and he said it's working fine. Maybe your cache was deleted when testing it?
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.
Awesome! Great implementation and everything works as expected.
I really liked your approach for the menu, if I could, I'd give some extra-points for that.
Only comment is: your declarations from line 17~21 at stars.css
could have been done using a @for. But all great!
I had some troubles with the previous task, so I made a new one:
:hover
are smooth