Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Responsive social-links page

P
Kaila Marcano•50
@kmarcano3
A solution to the Social links profile challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


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

Using mobile-first workflow changed the time it took to complete this project

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

I want to continue focusing on responsive design and how to correctly apply it into my designs. Also, overall CSS readability is something I want to continue to improve in.

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

-How to simplify my CSS -Need help with media query application

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • ricardoychino•190
    @ricardoychino
    Posted about 1 year ago

    Hi,

    First of all, visually speaking it is very close to the design provided. Good job on that. But semantically speaking, I recommend you to never shrink the size of the body. It should always be at least the size of the viewport, because it is the body of the document, the template, the "paper where you'll draw", not a part of it. Wouldn't you find it strange if you receive a test exam or contract on a smaller, borderless piece of paper rather than on A4 paper? That's kind of how it is currently.

    Semantically, it makes more sense for who is reading you document (search engine bots, other developers) a div with class="card" with all the content of the...card. What you see must as possible be reflected in the structure (HTML) of the code, and not forcibly adapted. What you could do:

    <body> <-- The 'paper'
      <main> <-- You're saying this is the main content on paper
        <div class="card">
          < -- the content -- >
        </div>
      </main>
    </body>
    

    It is nice to try to use semantics as possible, but it should make sense. Don't refrain from using classes and divs. If it makes sense, do it!

    About CSS

    Besides these semantic stuff that I pointed out (html being used as the real role of body - please avoid styling html; always use body or :root as the "main hub" of your styles), let's focus on how you could simplify your stylesheet.

    There are bunch of stuff that I'd like to point out, but I think the overuse of em metric is the thing you should avoid. As you probably now, em converts the size to px based on proportion to the current or parent's font-size. There are several 'drilling' on your style that makes it difficult to know what's the actual font-size of the elements at the lowest children level. For example, body is 0.8em; then h4 has more .8em (0.8 * 0.8 * 16 (Chrome's default) = 10.24px); and the same h4 has bottom: 0.95em, what means 0.95 * 0.8 * 0.8 * 16 = 9.728px, which at this point it is pretty much just a random number, not an actual design choice for sizes. Another example is the h2 title: the browser's user agent has 1.5em as its defaults, that overridden your 0.8em. What is the actual size in px? You see how the answer takes more time than necessary? That's my point here. Keep it simple and use px if it don't really depends on the parent's font-size. It improves the readability since we don't need to make calculations and it is less abstract for who is reading and analyzing your code. Making it dynamic by changing half a pixel is not worth the complexity.

    Another related topic that I should point out is, remember what I said about the body being the "main hub"? That means, declaring all the defaults of your document, such as font, font-size, color of the text, etc., so that every other elements in your HTML inherit these properties. The "supreme" parent in a HTML document is the body element, and in your style it has a .8em font-size. You should use the body to define the default size (in px) of the document (usually browsers like Chrome has its default as 16px - if you declare, you'll overwrite it... so it is a good practice to declare since each browser could have its defaults).

    I apologize if it sounded harsh, it was not my intention. My intention here is to be convincing rather than just spout theories. These are mistakes I've made myself in my early days, but I've learned the hard way that it's not a good practice. Anyway, keep it up, you're doing great! I hope my feedback helps you somehow.

  • LarsAdams•30
    @LarsAdams
    Posted about 1 year ago

    Very nice

Join 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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub