Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

All comments

  • mardon1devโ€ข 60

    @mardon1dev

    Submitted

    What are you most proud of, and what would you do differently next time?

    This challenge takes time because of the hovering effect and responsive design.

    What challenges did you encounter, and how did you overcome them?

    Correct placing of contents

    What specific areas of your project would you like help with?

    Responsive design, I think

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @mardon1dev

    Congrats on finishing another project! Here is my feedback:

    • <main> is a block-level element so it takes up horizontal space by default. There is no need to set width: 100vh to it. It stretches 100% wide by default.
    • Use min-height: 100vh instead height on <main> element. By doing this your element will be at least 100% of the browser height but can be bigger if needed.
    • You shouldn't set height on .card component. Instead let your inner content decide how much space it need and how high your container will be.
    • Text should never be in span or div alone. Always use meaningful element. Change .card-learning and .card-publish to the appropriate elements.
    • Never use pixels for font-size's. Instead use rem which is relative to font-size of the root element (most browsers set it to 16px). Defining your elements font-size in pixels will not respect the user's font-size preferences and therefore your web page will not be user-friendly.
    • Usually line-height is written as a unitless value, like 1.5.

    Have fun!

    1
  • @TheWicha

    Submitted

    What are you most proud of, and what would you do differently next time?

    ill use tailwind for sure next time

    What challenges did you encounter, and how did you overcome them?

    none

    What specific areas of your project would you like help with?

    none in this case

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hi Daniel!

    You did great! Here are some tips from me:

    • By default all web browsers apply a certain amount of default styling to HTML documents eg. h1 are larger that h3, links are blue and underlined etc. These browser defaults don't go away when you add your custom stylesheet to a document. Reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on by using CSS Reset (e.g by Andy Bell)
    • Now that you added some CSS Reset your body element doesn't have default margin so your .card stick to screen edges on mobile screen size devices. Add padding: 1rem or so to your body.
    • Change body to take min-height: 100vh. 100vh means that the initial body height will take 100% of the viewport height, whereas the use of min-height instead of height will let the body element grow even more if necessary.
    • Your document lacks landmarks. Landmarks are a group of HTML tags and roles that define different subsections of a website and help navigate through a website. Your .card container should be <main> element.
    • Since .article-img is decorative and decorative images do not need to be announced by the screen reader, leave the alt attribute empty alt="" so it will not be announced to the user.
    • Text should never be in div or span elements alone. Always use a meaningful element. Change .label div and .user-info span to paragraph (<p>) element.
    • Your page is lacking <h1> element. h1 represent the main heading/subject for the whole app. Also, do not skip heading levels - start with <h1>, then use <h2>, and so on. Either switch your .card h2 to h1 or you can add h1 element for your app and hide it with .sr-only class since your app doesn't have title.

    Happy coding!

    Marked as helpful

    0
  • P
    Franci Melinkโ€ข 280

    @francimelink

    Submitted

    What are you most proud of, and what would you do differently next time?

    Basically, the project was mainly aimed at the basics of HTML structure and CSS itself. Mistakes are still possible as I am basically still a beginner.

    What challenges did you encounter, and how did you overcome them?

    As I mentioned above, the project served as a basis for me. I had no particular problems with the project itself

    What specific areas of your project would you like help with?

    I definitely want to progress in HTML structuring itself, because I still often find myself editing the HTML structure itself. I think this would be a good base when I go on to more difficult projects

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @francimelink!

    Good job on this challenge. Some things I'd change:

    • The <header> should not be included inside the <main> tag. When a <header> is nested in <main> , <article> , or <section> , it just identifies it as the header for that section and isn't a landmark. Adding loads of headers in sub sections or inside landmarks creates a load of unwanted noise for assistive tech users and means you then have to label every section and header.
    • You shouldn't define font-size in your body element and certainly not in pixels. Browsers set the HTML font size to 16px by default. Defining your body element font-size in pixels will not respect the user's font-size preferences and therefore your web page will not be user-friendly.
    • You shouldn't use <button> for "learning" label. Buttons are to be used for performing an in-page action, trigger some action. This is just some text with styles.
    • Author avatar should contain alt attribute since it isn't decorative image. You shouldn't hide it with aria-hidden attribute.
    • Change body to take min-height: 100vh. 100vh means that the initial body height will take 100% of the viewport height, whereas the use of min-height instead of height will let the body element grow even more if necessary.

    Happy coding!

    Marked as helpful

    1
  • P
    Roksanaโ€ข 310

    @tloxiu

    Submitted

    What specific areas of your project would you like help with?

    When I checked the preview of phones on my PC in web dev tools everything works fine, but when I am checking it on my phone, elements are broken, and out of their place, I will be looking into this, but if anyone have an idea, I will be happy to listen to that! :)

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hi @tloxiu!

    Congrats on finishing another project! Here is my feedback:

    • Your logo image conveys no important information necessary for the user to understand the page content so it should be decorative. Keep alt attribute empty or wrap your logo with a element so it point's to home page like your alt text is saying.
    • You should add text-align: right for your .input-bill and .input-people-number inputs instead of adding odd padding like you did (padding: 0.4rem 0 0.4rem 17rem;). If user input is long enough it will cut it since there is no space (i know it won't be case in this scenario but it is just bad practice).
    • I am using Firefox and in your inputs there are arrows. Find a way to remove them to match design.
    • I believe using buttons for selecting tip is just wrong. Instead you should use input with type="radio" and the custom tip should be a radio input that when selected reveals a input type="number".
    • It is hard to use your solution with keyboard. First of all you should add some :focus-visible styles for focused elements. Then it'd be nice to "calculate" when user click enter in last input field. Now it only calculates when i click on selected tip %.
    • There is a bug when i input numbers like: bill: 66, num of people: 3 and click on 15% tip, the output is: $3.3000000000003 and it should be fixed to two points after decimal point.
    • Using the !important rule in CSS is generally considered to be bad practice because it overrides all other styles. You probably did something wrong if you have to use it.

    Happy coding!

    Marked as helpful

    0
  • P
    Roksanaโ€ข 310

    @tloxiu

    Submitted

    What are you most proud of, and what would you do differently next time?

    I most proud of making bigger script in js, cause i want to learn it so badd, and I guess I would do differently the years, months and day calculation, maybe with some library the next time.

    What challenges did you encounter, and how did you overcome them?

    What specific areas of your project would you like help with?

    I would like to hear an opinion about the accessibility, exactly the ARIA attributes things, and I would like the help with positioning the button on desktop design properly.

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @tloxiu!

    I can't keep up with your pace! Good job on this challenge. Some things I'd change:

    • Donโ€™t combine landmarks like main with the role attribute. It is redundant. Semantic elements each have an implicit role. A landmark is an abstract role for a section of content that allow assistive technologies to navigate and to find content quickly.
    • Wrap your divs that contain inputs and labels with <fieldset> element, which is used to group several controls as well as labels within a form.
    • Instead of hiding your label with .sr-only class, remove your .input-title paragraph and show label instead. That's what they are for in cases like this where you have visible label in design.
    • Remove aria-labelledby in your inputs. This is what label is for. To represent a caption for an item in a user interface which in your case is input element. for attribute in label should always point to id of proper input.
    • Remove aria-labelledby from .result-section section. First of all it doesn't point to anything since you don't have Results-heading id on any of this headings. Adding labels to sections that already have headings creates a load of annoying unnecessary noise. Most screen reader users rely on headings for navigation.
    • h1 is reserved for title of the page only, you shouldn't have multiple h1's on page. I'd wrap these results with one <p> tag instead.
    • You can additionally add h1 element for your app and hide it with .sr-only since your app doesn't have title.
    • Move your styles from form to fieldset and remove max-width. Instead, add that max-width on your .wrapper element like width: 100%; max-width: 720px. Remember to hide default border on fieldset. Remember to remove min-width and max-width from .card since we set that to .wrapper container.
    • Add some class name for input and label div wrappers and style them with max-width: 160px; width: 100%; so they don't grow more than expected in design.
    • Instead of having section for divider and button, move that section within your form (outside of fieldset) and change tag to div. Replace <hr> element with div and add height: 2px; background: your-color.

    Have fun!

    Marked as helpful

    2
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @tloxiu!

    Great to see another challenge solution from you! A few suggestions from me:

    • Move header and footer out of main. The main content area consists of content that is directly related to or expands upon the central topic of a document or an application where header/footer excludes contant that is repeated across a set of documents such as site navigation links, logos, banners etc which means we can consider them as adjacent content.
    • Your .logo is decorative so keep your alt text empty and add aria-label attribute to your anchor instead so non-sighted users know where this link is pointing to. Something like aria-label="Ping - Home" would be nice.
    • You should add label for your input and hide it with some sr-only class. The <label> element represents a caption for your input.
    • .social-medias is clearly a navigation. Nav element represents a section of a page whose purpose is to provide navigation links, either within the current document or to other documents which is true in your case. Change div tag to <nav> and next you should wrap your links inside unordered-list <ul>. Add aria-label attributes to your links to announce where those links are pointing to non-sighted users.
    • You're using broad names for color variables within your css. Try to make them more descriptive so you can use them easier within your code. Each color have its own name so instead prefix them with --c- or --clr- like --c-blue, --c-blue-pale it will be easier for you to write code since if you start typing --c it will display you all colors and then if you have different variables for maybe fonts, background etc they'll be grouped like --c-, --bg-, --font- etc.
    • Let's take a look at input and button elements. You don't want to make width of your input using padding. Instead remove all paddings values from .email-input and set it to padding: 1rem for now (you can modify it later to fit design). Next, add max-width: 350px to allow your input to take 100% width and limit it at 350px so it wont grow bigger. Next, remove padding from button for now. You want your button to take 100% height of input, and space that is left within container. To do so, just add flex: 1 property to your button so it stretches full avaible width and height. As you can see now your button lacks of height on mobile resolution. You need to match height of input so this is where you add padding: 1rem just like you add to your input.

    Have fun!

    Marked as helpful

    1
  • Rory McPhersonโ€ข 70

    @rorymcpherson

    Submitted

    For this project I tried to use semantic HTML elements where possible. However, I still used <divs> for the elements containing the statistics and the image. I would appreciate any feedback on my use of semantic elements.

    I had a lot of difficulty figuring out how to replicate the image with colour. I eventually found some tutorials on ::before and ::after psuedo-elements and tried using an ::after selector to layer the image with a background color, but I wasn't able to get this working correctly. Later I came across some image-related tutorials using blend-modes and found that by blending a background-color and background-image I was able to get very close to the project example. I think this is a relatively easy way to get this to work, though I could not get the color to match exactly. Any suggestions here would be appreciated.

    On a previous project it was suggested that I try using Perfect Pixel to get closer to the example sizes and dimensions, rather than visually best-guessing. While I found this very helpful, I felt I ended up using a lot more pixel sizes instead of responsive sizes to get things to line up. Furthermore, some of the pixel dimensions I found matched the example were odd/random sizes. While I think this project is probably the closest I have gotten to replicating the dimensions of the example images, it felt unnatural to be using such obscure number values sometimes. Any feedback on how I can use responsive design more, how to make better use of Perfect Pixel, or any other advice or best practices when it comes to sizing of elements would be very helpful.

    As a final note, I was struggling to get this project to work on a mobile screen size with media queries. I was able to get my card-info section working more-or-less, but I could not get the image to display properly above the card along with some other issues. So I am going to come back to the media queries later.

    Thank you in advance.

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello!

    Congrats on finishing another project! Thanks for providing your thought process aswell as asking detailed questions! Here is my feedback:

    • To me, this image isn't decorative. Anywhere an image adds any kind of value for sighted users, then alternative text should be provided so you should use img element with alt text instead. If the image is in context, and is related to your content or adds something to it it's likely not decorative. read more
    • Answering your question why image-color isn't matching design. There should be some opacity on your image to make your blend color brighter. Normally you would put background-color on .card-img and opacity: 0.75 with mix-blend-mode on img but since you went other approach with background-image as you thought your image is decorative you can't put opacity on your .card-img since it will change opacity for both container with background-color and image within. Instead use ::before pseudo-element on .card-img and put your image there so you have both container and image in different elements. Don't forget to add position: relative to .card-img.
      position: absolute;
      content: '';
      background-image: url(images/image-header-desktop.jpg);
      inset: 0;
      mix-blend-mode: multiply;
      opacity: 0.75;
    
    • I wouldn't sweat about making your solution pixel perfect. Of course you want to match design but don't waste your time to move elements one pixel here and there. Later when you'll have access to figma and design files taking those measurements like spacings, sizing etc will be easier so you will match "pixel perfect" design.
    • As for why you struggle with responsivnes. Look at mobile-first approach which is designing a desktop site starting with the mobile version, which is then adapted to larger screens. But since you make the other way around here's why it doesn't work for you. You should change order of flex-items when you switch to mobile screen size so your image is first, and content is second. Add order: 1 to .card-info. Next, you need to get rid of those explicitly set width/height values. You never want to do that. You want your content to take as many space as it needs and it will make you container width/height. Add max-width: 1110px; width: 100%; flex-direction: column to your .container and remove width/height. Remove width from .card-info and padding. Then add something like padding: 1rem. Remove width and set some height on your .card-img like height: 400px; width: 100%; so it take space within your container. Add padding: 1rem to your body so your container doesn't stick to device edge of the screen. Remove padding-right from .stats--item. Now you have your mobile version. From there you can make it so it match desktop design.
    • You should definitely take a read how to make your solutions responsive. read more.

    Have fun!

    Marked as helpful

    0
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hi @tloxiu!

    Congrats on completing your next challenge! A little feedback from me:

    • .dice-icon div element should be replaced with button tag. Buttons trigger some action, such as drawing next advice in your case.
    • .dice-img image is purely decorative. You should remove alt text from that image since it doesn't add information to the content of a page. Instead add aria-label="generate next advice" to your button to inform users that use some form of assistive technology what kind of behaviour they can expect.
    • Instead of putting image within your button, try to use ::before pseudo-element to add this image to button element.
    • You shouldn't put two images into your HTML and remove one with display: none property. It will cause performance issues since both images need to load on each screen size. Instead use <picture> HTML element for responsive images. This element allow to display identical image content, just larger or smaller depending on the device. This helps to improve performance across different devices.
    • Don't set explicitly width on your .card container. Let your content decide how much space it need. It will make your container more responsive. Use max-width instead to say how big it can grow. Add this to your card: max-width: 33.8rem; width: 100%;
    • Now you have to add padding to your body since your container want to stretch full screen width. Add something like padding: 1rem.

    Good luck!

    Marked as helpful

    0
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @ArdaBozan! Good job on this challenge! Here's my few suggestions:

    • Don't separate your HTML class names with "|". Separate the class names with a space, e.g. <div class="class1 class2">.
    • I'd use only one paragraph for your .price and .opacity text. Wrap opacity text into span element and style it. This will also get rid of .price-block div.
    • Your <button> element should be <a> anchor. Links take the user to a new location, such as a new web page or new section of the current page, buttons trigger some action, such as showing content on the page that was previously hidden, playing a video, or submitting a form. To me "Sign up" will take user to new page.

    Have fun!

    Marked as helpful

    1
  • MonicaPoloniโ€ข 60

    @MonicaPoloni

    Submitted

    Hello, this was my first project. I'm starting with HTML and CSS and would be grateful for any suggestions for improvement. Thanks!

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Congrats on finishing your first challenge! ๐ŸŽ‰

    I don't know Grid yet so take my advice with a grain of salt but your .card container doesn't stretch to max-width: 375px because when you aligned your grid items in body element with place-content: center your browser implicitly created tracks (both columns and rows) to align your .card to the center of the screen. Since columns were created implicitly they're set to auto which means they take only that much space that your .card container needs. What you need to do is explicitly set grid-template-columns: 1fr in your body so it stretch across whole body width and then use justify-self: center on .card element to align itself to the center of body. Also add width: 100% to your .card container so it stretch to your max-width now.

    Your document lacks landmarks, lists and have multiple heading elements that are unnecessary. Landmarks are a group of HTML tags and roles that define different subsections of a website and help navigate through a website. Your .card container should be <main> element, .buttons container could be a <ul> list and <button> elements should be <a> anchors. Links take the user to a new location, such as a new web page or new section of the current page, bButtons trigger some action, such as showing content on the page that was previously hidden, playing a video, or submitting a form. Then keep your <h1> heading as it is your component title, but change <h2> element to <p>.

    Have fun!

    Marked as helpful

    0
  • P
    Maisha Mirโ€ข 130

    @maishamir

    Submitted

    Hey everyone! I'm currently working on making my designs more responsive (haven't touched media queries or mobile design yet, but working towards it!) Not entirely sure if the way I'm doing it currently with the specific percentages is the way to go, but any pointers would be wonderful :D

    Note: I designed this on a 13-inch MacBook pro and it looks significantly different to the screenshot. Any tips for making it more exact to the given screenshot would be great!

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hi @maishamir!

    • "Making a site responsive" does not mean that every site / component needs a media query. Social links profile is the perfect challenge to create responsive component without using media queries.
    • I think you need to go back and spent more time learning HTML. Your document lacks landmarks, lists, anchors and have multiple heading elements that are unnecessary. Landmarks are a group of HTML tags and roles that define different subsections of a website and help navigate through a website. Your .card container should be <main> element, .links container could be a <ul> list and <p class="socials"> elements should be <a> anchors. Then keep your <h1> heading as it is your component title, but change <h2> element to <p>.
    • For your image provide more descriptive alt attribute for the non-sighted users.
    • Block elements (like html , body , div , p ) have width 100% automatically so width is not required for body element, remove that property from your css rules.
    • Change body to take min-height: 100vh. 100vh means that the initial body height will take 100% of the viewport height, whereas the use of min-height instead of height will let the body element grow even more if necessary.
    • You shouldn't set height on your container. Your content should tell container how tall it can grow itself.
    • You shouldn't use percentages to set dimensions of your container. % is relative to its parental container, which in your solution is body element. That mean when your .card have width: 28% and I open your website on mobile (e.g 375px wide), your .card component will have width of 100px only, which is not readable nor responsive. Instead use max-width: 390px (or rems if you read about them) and width: 100% so it will respect your parent container width, but never grow more than 390px. It will instantly make your container responsive without media-queries. The same applies for your margins/paddings. Use px or rem values.
    • For your image use explicit width and height values like 100px. Have fun!

    Marked as helpful

    1
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @davidsonaguiar,

    Congrats on finishing another project! There is a few thing that you can change:

    • Your image isn't decorative. Provide alt attribute with description for the non-sighted users.
    • Why do you select both body and html elements in your CSS? There is no need to apply style rules to both of them, so stick only with body {} selector.
    • Block elements (like html , body , div , p ) have width 100% automatically so width is not required for body element, remove that property from your css rules.
    • Since you used justify-content and align-items properties in your body to align your flex items both horizontally and vertically there is no need to add margin: auto to your main element which is now your flex item. Don't Repeat Yourself.
    • Headings are signposts that guide readers through component. Therefore, they should indicate what a section or a paragraph is about. Keep your <h1> heading which is title of your component but change <h2> to <p> element.
    • You forgot to wrap your list items content within anchor tags <a> so they can point to external website.

    Good luck!

    Marked as helpful

    0
  • Arda Bozanโ€ข 160

    @ArdaBozan

    Submitted

    What difficulties did you encounter while creating the project?

    I didn't encounter any difficulties while creating the project; however, I paid attention to ensuring that my code snippets were organized. I made efforts to make my code understandable and easy to follow. I tried to arrange each code block logically and reduce code repetition to prevent unnecessary redundancies. Thus, I aimed to establish a better foundation for the project's future maintenance and expansion.

    Which sections of your code are you unsure about?

    The code was quite simple. However, I'd like to do some more work to better organize the HTML and CSS files and reduce code repetition.

    Do you have any questions about best practices for the project?

    I don't have any specific questions about considering best practices for the project. However, I'm looking for some tips or suggestions to improve the appearance of the buttons for better user interaction.

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @ArdaBozan!

    Nice work on this challenge! There is some things you can fix:

    • Use alt attribute for your img element. It provides alternate text for an image if the image cannot be displayed or is displayed by assistive technologies such as screen readers. It is required.
    • You shouldn't define font-size in your body element and certainly not in pixels. Browsers set the HTML font size to 16px by default. Defining your body element font-size in pixels will not respect the user's font-size preferences and therefore your web page will not be user-friendly.
    • Use a elements instead of buttons. Buttons are for performing an in-page action and anchors/links are for navigating to a new page.
    0
  • @zacc-anyona

    Submitted

    What are you most proud of, and what would you do differently next time?

    What I am proud of in this project

    • I am proud that I managed to build a fully responsive web page using flex-box. I love flexing my muscles in this area.
    • Proud of the fact I managed to overcome some of the challenges I encountered and went to ahead to complete the challenge.

    What I would do different next time

    • I reduce the number of media queries I have in my CSS by employing mobile-first workflow.

    What challenges did you encounter, and how did you overcome them?

    Challenges I encountered in this challenge

    • Making the site responsive by the use of media queries.

    What specific areas of your project would you like help with?

    I need help in the following areas;

    • Responsiveness
    • How to come up with descriptive class names.

    Blog Preview Card

    #accessibility#lighthouse

    2

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello @zacc-anyona!

    Good job on this challenge! There is a few things that you can improve in your code and learn a thing or two alongside!

    • You shouldn't define font-size in your body element in pixels. You don't have to do it at all. By default, browsers set the HTML font size to 16px. A lot of people change their base text size in browser to make it more accessible for them. Defining your body element font-size in pixels will not respect the user's font-size preferences. Remove font-size from body to use default browser size.
    • Learn about landmarks because you're using them wrong. Landmarks are semantic elements that can be used to define different parts of a web page to make your website accessible to users using assistive technologies. Landmakrs help screen reader users navigate your website. The <main> element represents the dominant content of a document. That's why you need to wrap your .content div with <main> element. If you want your .content element can be an <article> but it isn't necessary. Change your main element within .content to div. <header> is element that represents a container for introductory content or a set of navigational links. In your example either of these conditions are met so change <header> to normal <div> element.
    • Read about figure element since you misuse it within your header element. The <figure> element represents self-contained content, and <figure-caption> provides the accessible description to that element. Replace it with div element. As for using this figure for the avatar, I think it is a more reasonable choice, but still don't know if I'd use it for that.
    • Instead of setting width: 30% on your .content component, you could use max-width property to set the maximum width of an element.
    0
  • P
    Chamuโ€ข 12,970

    @ChamuMutezva

    Submitted

    Another exciting challenge, let me know what you think i can improve. I used react for the challenge. I wanted the card to be a component on it's own getting its data through props from the the main parent. The data comes from an api and saved it using the state hook - the value of the state is the one that was received by the card component. But for some reasons that i still need to investigate the received data in the card was always undefined. I guess it is more to do with promises but if anyone can assist me to get around the issue .

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Chamu! ๐Ÿ‘‹

    Congrats on finishing another challenge! ๐ŸŽ‰ Your solution looks very good and also responds well. Here's some feedback:

    1. You left a lot of console.log methods in your code. Get rid of this as it makes the code harder to read.
    2. A common convention which is widely followed is that component should follow PascalCase naming convention. The name of the folder/filename will always reflect what is present in that file that's why it is good to also use PascalCase for them, not only function within that file. e.g. (Header/Header.js)
    3. You should avoid using document.querySelector with React. There is only few cases (sometimes there is still a need for manipulating elements directly) where it can be useful but in most cases there is better way to approach that. Instead you can use useRef() hook. Refs are more reliable for getting the specific DOM node you care about. document.querySelector can give unexpected results if there are multiple elements that match the query and if you're writing a component that will show up multiple times in many places this problem will occur, that's why refs become more of a clear-cut winner.
    4. Take a look at themeControl function in header.js component. You used document.querySelector for three elements which is completely unnecessary. As you know React provides a way to inject javascript right into our HTML using something called JSX interpolation. So instead of taking element from DOM with querySelector and then inject some data with .innerHTML or .src methods you should simply create a expression inside your HTML elemetns like so:
    /* If theme is true return "Dark" if not return "Light". */
    <span className="mode__state">{theme ? "Dark" : "Light"}</span>
    
    /* If theme is true return Moon element if not return Sun element. */
    <img className="mode__img" src={theme ? Moon : Sun} alt="" />
    
    • To completely get rid of querySelector from this function we can use document.body property. It represents the <body> node of the current document. Along with this, I used conditional (ternary) operator to either add or remove theme-dark class. Now themeControl() look like this:
     const themeControl = () => {
        theme
          ? document.body.classList.add("theme-dark")
          : document.body.classList.remove("theme-dark");
      };
    
    • Now you can remove themeControl() call from handleClick since you want this to perform everytime your theme change. For this purpose in useEffect with themeControl function, add theme to dependency array. The dependency array in useEffect lets you specify the conditions to trigger it. So in our case we'll watch for every theme change and trigger useEffect only when that value change, like so:
    useEffect(() => {
        themeControl();
    }, [theme]);
    
    1. I made a small refactor of your localStorage save option in header.js. In functional programming it is good to break up your code into small reusable functions. For this, we will create two functions, one to save data to localStorage and one for retrieving that data.
    • Let's start with postThemeToLocalStorage function where we will set our newTheme value to globalTheme key. Note we don't need to include the window property. You can access built-in properties of the window object without having to type window. prefix. The window object is the top-level object of the object hierarchy. As such, whenever an object method or property is referenced in a script without the object name and dot prefix it is assumed by JavaScript to be a member of the window object. So our function will look like this:
    const postThemeToLocalStorage = (newTheme) => {
    	localStorage.setItem("globalTheme", newTheme);
    };
    
    • Then let's create getThemeFromLocalStorage function where we want to return our globalTheme key value from localStorage. You don't need to use JSON.parse() method since our value from localStorage is a string, not an object. As the localStorage value cannot be saved as boolean we want to simply convert it. For this, we make a simple comparison, to return either true or false but as boolean values, like so:
    const getThemeFromLocalStorage = () => {
        return localStorage.getItem("globalTheme") === "true";
    };
    
    • Now, we have to clean up the code a little since we have a few unnecessary things here. Remove localStorage and savedTheme variables. Then, in handleClick function, instead of manually save our data to localStorage, use postThemeToLocalStorage(!theme). Then, add useEffect hook, that will only trigger on render (by providing empty dependency array) and save our theme from localStorage to theme state, like so:
    useEffect(() => {
        setTheme(getThemeFromLocalStorage());
    }, []);
    
    • Finally, we have to assign a starting value for our theme state. Since you don't use anything like prefers-color-scheme to detect if the user has requested a light or dark color theme, we assign theme to be false (light theme) - const [theme, setTheme] = useState(false). Previously, when your localStorage was empty you got null value from storage. null is a falsy value so it still works, but we want to avoid such cases.

    I'll send you my copy of header.js on slack just if I forgot to include here something. Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    1
  • Gutkaโ€ข 65

    @karbowskam

    Submitted

    I think I did it right :) I did two break points: 375px and 1440px (previously I did one more in the middle).

    However, I think I did something wrong with the background. Could someone check it out? :)

    Thanks and hugs! :)

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Gutka! ๐Ÿ‘‹

    Congrats on finishing another challenge! ๐ŸŽ‰ Your solution looks good. Here's my few tips:

    • Less breakpoints doesn't necessary means better. Now, your solution isn't fully responsible. It does look good on mobile and on larger desktops but everything inbetween does look like mobile and it isn't good. Here is my old solution to this challenge just to illustrate you how it can behave across screen sizes.
    • You repeat your HTML code with star images which is unnecessary. Find the way to use only one star image. You can do it easily by using background-repeat approach in your css. To do this you'll have to create empty div and remove all img's.

    Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    2
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Maja! ๐Ÿ‘‹

    Congrats on finishing another challenge! ๐ŸŽ‰ Your solution looks good. Here's my few tips:

    • Use unordered list <ul> for .stats. HTML lists are used to present list of information in well formed and semantic way.
    • To get closer to design use mix-blend-mode: multiply with opacity: 0.75 on your .overlay container. The mix-blend-mode sets how an element's content should blend with the content of the element's parent and the element's background.
    • Use Responsive Design Mode to see how your website behaves on different devices. To toggle it press CTRL+SHIFT+M on Firefox, and CTRL+SHIFT+C on Chrome. On mobile resolution (375px) it doesn't seems good. Change padding-left and padding-right to 20px on mobile.
    • Your .attribution overflow content on mobile resolutions.
    • Also on mobile change height of .image to 240px to make it a bit smaller.

    Good luck with that, have fun coding! ๐Ÿ’ช

    0
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, E_X_E! ๐Ÿ‘‹

    Good effort on this challenge! ๐ŸŽ‰ Everything works good and responds well. Take a look at:

    • Add :focus pseudo class to interactive elements like anchors, buttons etc. Use outline property to make your website more accessible to keyboard users. Focusable elements like anchor, buttons or inputs they have applied default :focus pseudo class with outline property. These default styles are subtle and hardly visible tho. Furthermore every browser has a slightly different default style for the outline, so you probably want to change the default style. Read more about why we should change focus styles.
    • Change the alt attribute for the .card__img, as it doesn't add any extra context for screen reader users. Since your image is decorative your alt text should be provided empty (alt="") so that they can be ignored by assistive technologies.
    • I'd also change the alt attribute for header__link logo. "logo" is not descriptive, and since you wrap your image with anchor tag and it direct to home page maybe change alternative text to "Loopstudios - home page".

    Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    0
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Caique Carvalho da Silva! ๐Ÿ‘‹

    Good job on this one! ๐ŸŽ‰ Your solution responds well and overall looks good. Here's my suggestions:

    • The div element has no special meaning at all. Use of more appropriate elements instead of the div element leads to better accessibility for readers and easier maintainability for authors. For .header-title use heading <h1> - <h6> element. For .header-subtitle you can use paragraph <p> element. This also applies to text in other sections.
    • On mobile resolution add width: 100% to .main-container and remove max-width: 400px so your container will stretch across different screen sizes. Keep max-width: 660px on 660px media query to prevent it for stretching too much.
    • Use unordered list <ul> for .reasons-list. HTML lists are used to present list of information in well formed and semantic way.

    Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    1
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Chevalier Antoine! ๐Ÿ‘‹

    Congrats on finishing another challenge! ๐ŸŽ‰ Your solution looks very good and also responds well. Here's my few tips:

    • Add some margin on mobile media query to your .container to make some room between edges of page and your container. (e.g. margin: 0 12px)
    • Remove arrows/spinners from inputs to match design. Read how
    • Use the toFixed() method to format your total_some, tip_total values so it doesn't return values like: 13.3335534. You have to convert them to number first, with parseFloat for example.
    total.innerHTML = "$" + parseFloat(total_some).toFixed(2);
    tip.innerHTML = "$" + parseFloat(tip_total).toFixed(2);
    
    • I can't reset calculator with reset button. Console throws an error - reset is not a function.
    • Remove setInterval with function that wraps all your logic. What it does is rerun this function every one seccond which is really bad. You did it because you want your calculate() function to fire on each user change. Instead add addEventListener to your input and watch for change event. Then call calculate() function.

    Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    1
  • Jayโ€ข 695

    @Junjiequan

    Submitted

    No specific questions.

    I will deal with HTML validation issues later. I am open to all feedbacks & criticisms, thanks.

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Jay! ๐Ÿ‘‹

    Congrats on finishing GURU challenge! ๐ŸŽ‰ Forgive me for speaking so late, but I had a few days off. Your solution is flawless! I really like the animations you added. They look very smooth and the whole UI is great.

    • I don't think you need aria-labels in your header navigation links. It seems to me that they're self-descriptive.
    • It is different with the cart button tho. I'd add aria-label to button and keep my image alt text empty. Also change this text to something more descriptive - 'cart icon image' doesn't speak much.

    Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    2
  • Diu Gachโ€ข 145

    @DiuGach

    Submitted

    Hi gorgeous friends , Diu Gach here, hope you are enjoying the coding process. just wanna let you see my third project with scss and BEM, this time I have seen some few improvements in handling the markup and alignments with flexbox, so it's exciting ๐Ÿ˜‡, kindly have a look on my code (Html,sass and live site) and give me some feedbacks about:

    1 - Code design 2 - BEM 3 - Html markup 4 - and about everything that you can advice me with, I will be happy to hear ๐Ÿ™‰ your feedback folks, thanks.

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Diu Gach! ๐Ÿ‘‹

    Good job on this one! ๐ŸŽ‰ Your solution responds well and overall looks good. Here's my suggestions:

    • Add :focus pseudo class to interactive elements like anchors, buttons etc. Use outline property to make your website more accessible to keyboard users. Focusable elements like anchor, buttons or inputs they have applied default :focus pseudo class with outline property. These default styles are subtle and hardly visible tho. Furthermore every browser has a slightly different default style for the outline, so you probably want to change the default style. Read more about why we should change focus styles.
    • Change the alt attributes for the .header__logo, .intro__img, .features__icon, as they don't add any extra context for screen reader users. Since your images are decorative your alt text should be provided empty (alt="") so that they can be ignored by assistive technologies.
    • Read about Sass 7-1 pattern to keep your file management orginazed.

    Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    1
  • P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Benjo Quilario! ๐Ÿ‘‹

    Congrats on finishing another challenge! ๐ŸŽ‰ Your solution looks very good and also responds well. I really like the initial animation you added. Here's my few tips:

    • Change the alt attributes for the .hero__img, as it doesn't add any extra context for screen reader users. Since your image is decorative your alt text should be provided empty (alt="") so that they can be ignored by assistive technologies.
    • Add :focus pseudo class to interactive elements like anchors, buttons etc. Use outline property to make your website more accessible to keyboard users. Focusable elements like anchor, buttons or inputs they have applied default :focus pseudo class with outline property. These default styles are subtle and hardly visible tho. Furthermore every browser has a slightly different default style for the outline, so you probably want to change the default style. Read more about why we should change focus styles.
    • I noticed that you are using a static / picture for a menu. Maybe you could try to create an animated element instead? If you want to give it a shot I've published an article link on how to create a basic animated hamburger menu button for beginners.

    Good luck with that, have fun coding! ๐Ÿ’ช

    2
  • P
    Daveโ€ข 5,245

    @dwhenson

    Submitted

    BTW - The homepage is blank as this wasn't really included in the design. You'll have to click through to a page to see the content.

    This was a big step up for me in terms of the tech used to build the site. Any comments or feedback would be most welcome. I put some details and questions in the readme, but I would really like to know:

    1. Is it OK to use inline styles to set custom properties? I did this using nunjunks and it worked really nicely, but I wasn't sure if this is really best practice.

    2. How to make individual HTML pages from a JSON object! I can see that 11ty's pagination should do this but I couldn't make it work!

    Thanks for any other comments and feedback!

    P
    tedikoโ€ข 6,530

    @tediko

    Posted

    Hello, Dave! ๐Ÿ‘‹

    Congrats on finishing another challenge! ๐ŸŽ‰ Your solution looks good and also responds well. I have also finished this project recently if you'd like to see. Here's my few tips:

    • I can scroll page when mobile menu is open. You should prevent scrolling by using helper class with overflow: hidden on the <body> element. (btw. now I've noticed that I've also forgotten about it! ๐Ÿ˜…)
    • Your anchor in tabs doesnt cover whole li element so when I use my keyboard to navigate my page the focus isn't covering whole element but just an anchor.
    • A small detail is to stick more to design when it comes to font-sizes etc. It seems big now :D

    Good luck with that, have fun coding! ๐Ÿ’ช

    Marked as helpful

    1