Design comparison
Solution retrospective
Nothing particular I'd like feedback on, but if you see anything wrong or that can be improved, let me know!
If you can help me out with this console error I'm seeing on the github pages site, that would be great! I updated everything to use Sass and for whatever reason I'm getting this error:
Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
I got tired of looking for a solution and just made a branch for the pre-sass version and I'm using it for the live site. Seems to work fine! Whenever I switch to my master branch, I get that error. After an hour or so of trying to figure out wtf is going on, I gave up and here we are.
Edit: Turns out the error was caused by not having a file type on my css file, which I goofed on when I added Sass.
Thanks for any help!
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, great work on this one. Layout in desktop seems fine, but the buttons are outside of the container in my screen. I am using 1366x768. Mobile layout seems fine, but
375
is too small for mobile breakpoint. The375
on the design is not the intended breakpoint, it is just design.Some suggestions would be:
- I suggest not styling the
html
element. Place thosebackground
properties on thebody
tag. Usually, thehtml
element will only contain:
html { box-sizing: # value stated; font-size: 100%; }
- Instead of using
height: 100vh
on thebody
tag, usemin-height: 100vh
on it. Usingheight: 100vh
will limit the elements size according to the viewport's height. So even if the element or the website have many element, if it usesheight: 100vh
it won't logically captures them.min-height: 100vh
is much better because it takes 100vh as minimum and it will expand if it needs to. - Adding
padding
to the top and bottom of thebody
tag so that it prevents the content from touching the sides. - In a website, you typically add
main
element. This makes the structure better and it guides screen reader users where they are when navigating on your website. On this one, the.main-container
selector could have been usingmain
element. - The
alt
text on theimg
should have been left empty likealt=""
. When you think an image is just being used as a decoration, you should left thealt
be empty. If you think the image adds to the context? Use a descriptivealt
. Since the image on this one is just a vector decoration, usingalt=""
is better. - The
img
as well of the music icon should have been usingalt=""
. - I would have wrap the
annual-plan
with a heading tag likeh2
. - Do not
position: absolute
thefooter
. Leave it on the flow.
Other than those, great work. But changing the breakpoint will be really good. Also, if you like, starting some projects using mobile first layout:>
Marked as helpful1@MoodyJWPosted about 3 years ago@pikamart thank you, this is great feedback!
I'm still pretty new to using actual html/css instead of just frameworks and these are exactly the kinds of things I need to learn.
Can you elaborate on the
background-image
being in thebody
element instead of thehtml
element? My understanding is that the html element will always match the height of the browser window and the body element doesn't. I've read this in a few places now, but I generally do see the background image set on thebody
. Is it just convention or is there something better about usingbody
?Again, thank you so much for all of the feedback! Tremendously helpful.
Edit: also I updated everything and it should be significantly improved, even got the GH pages site to work properly on my master branch. Although the screenshot doesn't seem to reflect what's on the actual live site.
0@pikapikamartPosted about 3 years ago@MoodyJW Hey, awesome that it helped you!
On that
background-image
. Well typically, like what I said, you don't really style thehtml
element and I don't know ifhtml
element takes the 100% of the height of the screen? Now, like what I said, put it on thebody
tag, but at default,body
tag does not takes 100% of the screen's height, that is why,min-height: 100vh
is typically added to thebody
tag, so that it will take 100% of the screen's height and it will expand if it needs to. It is different fromheight: 100vh
okay, always go withmin-height: 100vh
and notheight: 100vh
since the latter one will limit an element to only have 100% of the viewport's height.Also, there is this "generate new screenshot" which you can use on your solution's page. This will take the new updated version of your website as the screenshot in here.
Great work once again!!
Marked as helpful1 - I suggest not styling the
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord