@ericsalvi
Posted
Hey @yui,
Great job on your 4th solution completed. Everyone does these solutions differently and Lucas did offer some great feedback to be a bit more semantic. I actually just completed this one too and I had no Divs, no Spans, or no Class Names. It was actually a fun challenge and made me really think about the structure before I started with the design.
There is one thing I did notice that I am not a fan of and not sure if there was a different approach. Positioning the entire content by using an absolute position with a top and left of 50% and then translating it with a -50% to me is not the best and could cause unexpected results.
Instead, what a great thing to do is instead on the main container, and in this case, the body set the min-height to 100vh and then display it as a grid. This way you can then use the easy place-content to center. Of course, you need to also make sure you set a max-width container to your grid items, which is the main.
What I do like is that you are using grid templates which is really nice and you also did a mobile-first approach. Much nicer to only have to change a few lines for desktop if you do mobile-first rather than if you do desktop first you have to add way more lines of CSS in order to shrink things down.
Again, great job and keep up the momentum!!!
Marked as helpful
@yterai
Posted
@ericsalvi Thanks for your feedback, Eric! I was actually aware of the thing that you pointed out and I don't really like it either but I wasn't able to find a better solution🥲 (I didn't even think to set the body displaying it as a grid!) It will be one more new thing to keep in mind for my future challenges!