@imadbg01
Submitted
As always, I welcome any comments and suggestions you may have.
Looking to hire developers?
@elidrissidev
@imadbg01
Submitted
As always, I welcome any comments and suggestions you may have.
@elidrissidev
Posted
Hey Imad 👋
Hope you're doing well. You did a great job on your solution! I usually see some common mistakes in most solutions, but not this one!
Here are my notes:
type="submit"
is meant to be used with buttons inside a <form>
, in this case there is no form so I'd suggest you set it to type="button"
.
The "Why Us" section is meant to be a list of features of this fictional website, therefore I think a <ul>
will be more semantically correct instead of a <p>
.
Some page elements are styled with their class names whereas others are styled by their tag name, this makes the CSS difficult to read as you'll need the HTML as a reference. Consider leaning more towards classes to style your elements, as they are re-usable and they make your code easier to understand.
The ch
unit has some specific use cases, but generally I'd stay away from if not needed and just use other units like rem
s or em
s.
Hope this helps you, if you have some questions feel free to reply. Good luck!
Marked as helpful
@Naveen39O
Submitted
This is the first time I have used an API request in the challenge. I have used React to build the app and I used useState hook to store the data. Is this ok? or Should I call the API request from useEffect hook?
@elidrissidev
Posted
Hey Naveen 👋,
Great work on your solution, keep on going!
I have some feedback for you, first is an accessibility one:
alt
text, in this case, you can make it empty so that it's not announced.This one is coding-style related:
This one is related to React:
Advice
component, but it only contains an h1
and the rest including the button is in the App
component. What I would do in this case is extract the whole card to the Advice
component.useAdvice
and inside of it you would put the state and the fetching function, you would then return those to be consumed by the component. e.g:function useAdvice() {
const [advice, setAdvice] = useState(null);
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState(null);
const fetchAdvice = () => {
setIsLoading(true);
axios.get("https://api.adviceslip.com/advice")
.then((res) =>
{
setAdvice(res.data.slip);
setIsLoading(false);
setError(null);
})
.catch((error) =>
{
console.log(error);
setError(error);
setIsLoading(false);
});
}
return { advice, isLoading, error, fetchAdvice }
}
useEffect
with an empty dependency array that will fire when the component mounts and fetch the initial advice from the API.Phew, that was a lot 😅. Hope it helps, Good luck!
Marked as helpful
@skuenzi
Submitted
When using :active :hover and :focus states, what's your method for maintaining accessibility while keeping the design clean? Whenever :focus is activated, it remains until you click outside the element. How do you prevent that?
What is your method for file organization? I'm used to having a src folder, but the index has to be in the root for most hosting sites.
@elidrissidev
Posted
Hey Sara 👋,
Congrats on finishing your first challenge!
To address your questions:
:focus-visible
pseudo-class, quote from MDN docs:
The :focus-visible pseudo-class applies while an element matches the :focus pseudo-class and the UA (User Agent) determines via heuristics that the focus should be made evident on the element. (Many browsers show a "focus ring" by default in this case.)But keep in mind that this is not supported in Safari, so you'd want to have a fallback style using the regular :focus
as mentioned in the link.
src
folder and also get to use modern javascript features. When ready to deploy, Parcel compiles everything together under a dist
folder by default which you can configure to be the root folder used when deploying to a service (I know vercel and netlify have it, not very sure about github pages).I hope this answers your questions, feel free to ask if you have more and good luck!
@Mahmoud-Elshaer-10
Submitted
Your opinion matters to me. Please provide your feedback so I can improve. Many Thanks.
@elidrissidev
Posted
Hello Mahmoud 👋 You've done a great job with your solution, It looks good on all screen sizes and design comparison shows only very little differences!
Here are some things to improve:
h1
). It is very important for SEO and even accessibility reasons to have one in every page of any site. In cases where the heading in not part of the design (like here), you can include it but make it visually hidden. Additionally, because you're using article
tag for the reviews, this element requires a heading inside, so you can make all the review titles an h2
. Remember to always follow heading levels on your page from 1 to 6, don't skip them!blockquote
element is more correct semantically.This is all the feedback I have, I hope it was helpful. Good luck!
Marked as helpful
@PresidentTree
Submitted
I do not think anything is wrong with the code, but any feedback is still appreciated!
@elidrissidev
Posted
Hey there! Great job with this one, you've made it look very close to the design. I noticed some points that you can improve in your solution:
h1
, you have used 3. Consider replacing them by h2
. If you wanna take it one step further, you can include an h1
but make it visually hidden since it's not in the design to make it only readable by screen readers.text-transform: uppercase
to the headings.border-radius
on the first and last card by setting it on their parent. After doing this you'll see the corners still sharp so to fix it you need to add overflow: hidden
to clip the edges of the cards sticking out.This is all I have, I hope it was helpful. Good luck to you!
Marked as helpful
@frances-m
Submitted
I'm curious about how web developers handle development for different devices - in my case, when using dev tools to view this site on an iPhone X screen everything looks good. But on my own iPhone X, the social media buttons are warped. I can troubleshoot that issue because I own the device, but are there other tools to help a developer be confident that their layouts will render properly on each specific device?
Thanks for taking the time to check out my project!
@elidrissidev
Posted
Hey Frances! Hope you're doing great. First, I just wanna say congrats because you did an amazing job at making this as pixel-perfect as it can be! Unfortunately, regarding your question I cannot provide much help, personally I don't remember I had an issue like that but I could be wrong. Though I have some suggestions regarding your solution:
a
and button
elements have text inside them that describes where that link takes to or what that button does. In your solution for example, the social share buttons should probably be links btw because they will redirect somewhere, but should also have text inside them rather than just images. In this case the design does not show the text, so you can use the "visually hidden technique" which hides the text visually while still making it readable by screen readers.filter
to change the color of the img
. It looked a bit confusing at first, so one way I'd do it is to inline the svg
in your HTML. That way you can set fill="currentColor"
and they'll inherit the parent element's color
value so you can change it with ease.That was all I have, I hope it was not overwhelming. Good luck!
@flp-pcll
Submitted
Hello, everyone!
This is my solution to the FAQ accordion card challenge. What do you think?
Thanks!
@elidrissidev
Posted
Hey Felipe, great work on this solution!
Here are my suggestions:
<\details\>
and \<summary\>
elements.Good luck, and keep it up!
Marked as helpful
@aig0041
Submitted
Hey everyone! I just completed this project and I know my code is really sloppy and I'm sure it could have been written in a more organized way, I just believe that the best way for me to learn is to dive in and apply anything that I know, so that's what I did.
This is the first time that I use flexbox in a project and I'm still not really sure I understand it fully, so I'd really appreciate if you point out any mistakes I have with it specifically.
Again, I'm only a beginner and I know there is so much I don't know yet, so any suggestions or tips to improve the code overall would be really appreciated. Thanks!
@elidrissidev
Posted
Amazing work Aliaa! Not bad for a first challenge. Keep it up!
For the images problem, it's because of the URL you're using:
http://127.0.0.1:5500
is a URL only accessible on your machine when you were running the http server (Using Live Server Vscode extension?).file:///Users/...
is a URL used to access files on your local filesystem (Mac in this case) and is again specific to your system and won't work elsewhere.So the fix for this is to use a relative URL, in your case it's gonna be ./images/<image name>
.
As for the rest I only have 3 suggestions:
h1
that describes the main content of the page.div
s where appropriate, for example the "Cancel" text can be inside a a
or a button
element because it conveys that it can interacted with.Good luck to you!
Marked as helpful
Just starting out on frontendmentor and this is my first challenge. Can anyone rate my project from 1 -10 and send me any feedback on any errors you find or any improvements I can make. Whether it is on my naming conventions, How clean my code is, or just improvements to help me become a better developer. Thank you for your time!!
@elidrissidev
Posted
Great start Jaonary! Definitely not bad for a first challenge. Keep it up! Here are some suggestions for you:
font-size
, margin
, padding
, width
, height
etc. Reason being is that they don't scale with your browser's font size setting. To verify this, try increasing your browser's font size from 16px to something like 20px and do a comparison between your solution and this site. See how in your solution nothing changes, while in frontendmentor the page sort of zooms in a bit? There will be special occasions where this won't matter, but as a general advice I will suggest that you look into rem
s and em
s.alt
text as per the W3C Web Accessibility Initiative:cursor: pointer
to the "Proceed to payment" button to give the feedback that it's clickable.That's all I have. Good luck to you!
@nomatter-py
Submitted
I'm only learning, need your suggestion and pieces of advice
@elidrissidev
Posted
Great work overall, like @hardy mentioned just try to use less intensive shadows by increasing alpha value in shadow color and increasing the blur. Additionally I have a couple of suggestions:
ul
. It looks ugly by default but you can always style it according to the design.rem
) and absolute unit (px
) which is something you'd want to avoid because absolute units do not scale with the browser's font size setting, you can learn more about responsive units in this article.Good luck, and keep up the good work!
Marked as helpful
@brkcln
Submitted
thanks for the feedback ^!
@elidrissidev
Posted
Hey Burak! Great work on this challenge, keep going! Here are some advises on things to improve:
inset
: box-shadow: inset 0 -0.25em 0 rgba(0, 0, 0, 0.1)
text-transform: uppercase
to make it uppercase visually.I hope this didn't overwhelm you. Good luck!
Marked as helpful
@Frontend-Wizard
Submitted
If you can change 2 things, which they will be?
@elidrissidev
Posted
Hey! Great job with this one! I actually have 5 things 😅:
h1
to h4
. You should always go from 1 to 6. You can always style them differently if they don't match your design.<div class="attribution">
inside a footer
element since it's more meaningful.alt
empty to make it clear for assistive technology that it's a decorative image so they won't read the alt text.I hope this didn't overwhelm you. Good luck!
Marked as helpful
@alegrimminck
Submitted
Hello guys! Any recommendation will be fully aprecciated, just trying to get the hang of it :)
@elidrissidev
Posted
Looks very close to the design, great job!
I do have some suggestions for you:
div
s. E.g: You could wrap .attribution
with a footer
element, and you could also make .card
a main
element or wrap it in one. These are called landmark elements and they help create a hierarchy of the page for things like screen readers.h1
for "Order Summary" but you skipped h2
and used an h3
for "Annual plan". Heading levels help define a content hierarchy for your page, always go from 1 to 6.Good luck!
@FloPereira75
Submitted
Hi
Feel free to take a look at my solution and give me feedback if you see any problems there, or whatever!
Good challenge to all!
@elidrissidev
Posted
Great job overall Florian! I have only one note regarding the units, I see you're often using %
and px
which works but isn't very responsive. Try increasing the font size of your browser and see if the page will adapt to the new size, most elements won't. Consider using rem
s and em
s instead for the future, and if you need examples feel free to check some solutions of mine that demos this.
Good luck!
Marked as helpful
@sorengrey
Submitted
Didn't have much trouble with this one, but I do feel like my hero image is slightly off.
If you have any suggestions on how to improve, I'd love to hear them. Thanks!
@elidrissidev
Posted
As mentioned already by fellow members there are some issues with the semantics. You also should always consider having one h1
on every page that describes its content. For example this page can have the "Order summary" text be inside an h1
as it perfectly describes the main purpose of this page, you can then style it differently to match the design. I'll also advice to check the report of your solutions as it helps you find issues like these.
Good luck!
Marked as helpful
@dusanlukic404
Submitted
Any feedback or suggestion will be very helpful :)
@elidrissidev
Posted
Good job Dusan! I have a few suggestions for you:
h1
to using an h3
, skipping h2
. Heading levels help set a content hierarchy for your page, so it is better that you follow them from 1 to 6.ul
element, instead of just a paragraph with line breaks, then you can style it to match the design.height: 80%
from .container
to make the card's height adjust to fit the content.Good luck!
Marked as helpful