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

Responsive card using CSS Flex

Luiz Otávio•60
@luizotvio
A solution to the Interactive rating component 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?

Estou orgulhoso em começar aplicando o Mobile-first e reutilizar classes. I'm proud to start by applying Mobile-first and reusing classes.

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

Encontrei desafios em relação ao JavaScript e DOM, mas com a ajuda da documentação e vídeos no YouTube eu pude finalizar o que foi solicitado.

I encountered challenges regarding JavaScript and DOM, but with the help of documentation and videos on YouTube I was able to complete what was requested.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P. Ricardo•2,370
    @pRicard0
    Posted about 1 year ago

    Design ficou praticamente impecável, muito bom, contudo... tenho algumas sugestões e apontar alguns erros. É muita coisa, se prepare!

    Dicas HTML Toda essa parte de botões, com notas para avaliar e tudo... foi feito da maneira errada. Baseado no contexto, quando estamos falando de avaliar algo, dando notas e qualquer tipo de coisa, se enquadra no contexto de um formulário. Você vai ter que aprender a como criar formulários. Para resumir...

    • Você tem que criar a tag <form>
    • Dentro da tag <form> tem que ter uma <legend> para deixar claro para deficientes visuais o que o formulário se trata. Pode ser tipo "Dê uma nota"
    • Cada botão seria um <input type="radio"> e contendo uma <label> para tornar acessível. Esse tipo de botão do type radio é nesse contexto onde você pode selecionar apenas uma opção, não é uma checkbox.
    • No fim de tudo... para enviar o formulário, é necessário um <button type="submit">. Os botões por padrão vem "submit" sem você precisar especificar, mas é bom você especificar, ainda mais que está começando. Quando não está associado a um formulário, geralmente os botões são do type button.

    Na parte do Javascript eu falo mais coisa.

    Dicas CSS

    • É recomendado que você utilize rem ao invés de px para font-size. Rem é mais acessível, é uma medida relativa, mais responsiva enquanto px é algo fixo e não pode mudar, o que pode causar alguns problemas.

    Dicas JavaScript

    • Ao invés de adicionar um EventListener baseado no 'click', como é um formulário, é recomendado usar 'submit'

    Em "resumo" é só isso. Leve o tempo que precisar, é muita coisa, é difícil, aplique as mudanças no projeto, não deixe para depois. Você vai esquecer se deixar para depois. Vê videoaulas sobre formulários, vai na calma. Pesquisa para entender melhor cada coisa que eu disse aqui

    Marked as helpful

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
Frontend Mentor logo

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