Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Results summary component using SCSS

sass/scss, bem
P
Nikitossik•370
@Nikitossik
A solution to the Results summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hey, community! This is the 3rd project done with SCSS. It could be done much easier with pure css, because I feel like there would be less lines of code, it would be more maintainable and not that messed up :) But I learned about property lists, some SCSS funstions and @each loop. I'll be glad to know how to improve my code, if you have something to say about it)

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Mirjax2000•720
    @Mirjax2000
    Posted over 2 years ago

    I like your solution for that button animation, normaly we cant use transition for background gradient. So this opacity trick is briliant.

    are you using Sass extension for vs code? dont!! https://www.youtube.com/watch?v=o4cECvhrBo8&ab_channel=KevinPowell which leads to dont use @import, instead you have to use @use or @forward. https://www.youtube.com/watch?v=CR-a8upNjJ0&ab_channel=KevinPowell

    i like your scss styling, but i dont see there any placeholders or mixins.

    it is good that you are using mediaqueries directly with class, but i like my MQ bottom on one place and i know exactly where to look for . Your MQ for bttn isnt working, you disabled for lower resolution, is it intendent? it doesnt need to be there, just write

    .button{ &:hover::after { opacity:1 } without MQ.

    And that thing with MQ in .classes, few days ago, there is new function call it @media container, you format your element not all page. so i cant imagine how it will be readible with MQ and MQ containers. But we have to tryed first. for me its very good performance what you did with this challenge. you can check my solution, but i dont have bttn animation, i solved it after i reviewed your solution.

    https://www.frontendmentor.io/solutions/it-is-responzive-and-it-calculates-rng-data-to-percentage-FxQbpaRaMv

    keep up good work.

    Marked as helpful
  • P
    Nikitossik•370
    @Nikitossik
    Posted over 2 years ago

    Hey, thanks a lot for your comment! I've just watched the videos you sent, it's pretty cool using npm for compiling SCSS, in my project I used Gulp instead, just to try) but the thing in the video seems to be easier, I'll definitely give it a shot)

    Yeah, I added ::hover only for desktops on purpose, because on smaller screens ::hover behavior is different because of touchscreens and stuff. Maybe I could add ::focus or ::active for these cases.

    I heard about @container queries, that's really cool thing to try. I do think that my code is pretty messy because of @media. I had to change paddings and margins inside them. Firstly I thought about writing a @mixin for clamp function, so not only typography would be adaptive to the viewport, but spacing too. I'm new to SCSS, I haven't tried @mixins yet

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