I use BEM and Tailwindcss together. In some complex CSS situations, it is more convenient to use traditional CSS. However, sometimes when adding CSS attributes, I hesitate whether to put this attribute in tailwind or in CSS.
Annalisa
@Annalisa11All comments
- @mofadaSubmitted 2 months agoWhat are you most proud of, and what would you do differently next time?@Annalisa11Posted about 2 months ago
Hi Mofada, I really like your solution! I expecially like the fact that it is simple and it doesn't have too much code, but it does its job really well. I also like the tablet view very much :)
One thing I would say is that you used many px values for paddings and margins in tailwind. Since tailwind has very well thought through design system, I would try to personalize it as little as possible.
It's also recommanded to avoid px values since they don't scale very well, but that's a minor thing.All in all very nice! Good structure, readable and good names for everything and a good responsive website.
0 - @svo15Submitted 5 months ago@Annalisa11Posted 5 months ago
You definitely are on the right path!
some things I noticed:
- no blank lines in your stylesheet. I think it would be good to have a blank line between css selectors so that it is easier to read and understand where a selector begins and where it ends.
- you use px for many things.
It is best practice to avoid using px as much as possible, since px aren't scalable or dynamic. Especially when it comes to font sizes, spacings or widths. I would recommand that you try using measures like
%
orrem
.
That would also really help with the responsiveness! - query selector instead of id. you use the query selector in your js file instead of getting the elements by their ids. It works just fine and it's not really that big of a deal in this project, but I would keep in mind that selecting by query can be dangerous since you can have multiple elements with the same query name. I would always use ids if possible so you can be sure that your code will always grab the element that you want even after you might change or add some new code years later :)
- The layout and responsiveness is still a little shaky here and there, but that's probably a matter of practice...
Good job at structuring your html and your project. It's very clean. I especially liked the hover effects and the transitioning hamburger menu... I wish I had something like that, it's really pretty cool :)
Marked as helpful1 - @DanielfwwSubmitted 5 months agoWhat are you most proud of, and what would you do differently next time?
I'm proud that its been 5 months and I'm still coding.
I need to take less time to do projects, I did feel a little burned out but that's no excuse, I just got a little bit lazy.
What challenges did you encounter, and how did you overcome them?This project took me a bit of time, I struggled with order of things - when I had desktop version done, I didn't really add the div container and had to redo the whole structure. When I added the div, there is extra space on the bottom of the page that I don't know how to remove - any help would be much appreciated.
What specific areas of your project would you like help with?Div removal, white space on the bottom of the page. Any other suggestions are much appreaciated.
@Annalisa11Posted 5 months agoHi Dan, about the whitespace on the bottom of the page... I think it is because the background image on the body takes up only as much space as it needs in terms of height. The image height is not big enough to cover all of the background. To get rid of the white space that comes underneath you could give the body the property
background-size: cover;
which means, that the image should cover the whole space/div it is in and not only the space which it actually needs. Hope it helps (I'm not 100% sure though) :)Marked as helpful1 - @Maryam1982Submitted 5 months agoWhat are you most proud of, and what would you do differently next time?
Apart from the final hover effect (hover on the image) it was done fast. It took just an hour to put everuthing together of course in hover effect (on the image) I was stuck and 45 mins added to my record.
What challenges did you encounter, and how did you overcome them?I tried to get the image to fill the container (which itself was inside a flex container). I tried to use object-fit for the image but it was not working until I found out I had to set the height of the image container (flex-basis:3.5 rem) so never forget height 100% is not going to work.
What specific areas of your project would you like help with?It was just an easy project the challenge and how I managed to solve is mentioned above.
@Annalisa11Posted 5 months agoYour solution is well done :) The html is well structured with the right use of semantic html tags and the overall look and feel is perfect. I especially like the transition you added on the hover of the image, nice touch!
The css classes are understandable and named well.
The only thing I could say something about is the fact that you are using unnecessary css properties sometimes. For example: when using flexbox you always write out the
flex-direction: row;
even if it is already per default row and doesn't need to be explicitly written out. Same goes for things likejustify-content: flex-start;
Other than that nitpick, nice work!
Marked as helpful1