Skip to content
  • Unlock Pro
  • Log in with GitHub
Profile
OverviewSolutions
6
Comments
3
achrustowski
@achrustowski

All comments

  • RuFa•170
    @RuFuRu
    Submitted almost 3 years ago

    Tip Calculator written in HTML, CSS and Typescript

    1
    achrustowski•150
    @achrustowski
    Posted almost 3 years ago

    Hi RuFa,

    Congrats on your solution! It looks great and it's a nice touch to have a prompt for Custom tip value :)

    As for improvements, you have some repetitions in you JS code, you could put gridButtons.forEach(btn => { btn.setAttribute('style', 'pointer-events: auto'); btn.classList.remove('btn-clicked'); }); and button.classList.add('btn-clicked'); button.setAttribute('style', 'pointer-events: none'); inside of a function and call it whenever you need to use it. This will clean up the code a little bit and make it more readable.

    Lastly, completely UI thing, looks like your 15% button is clicked by default, not sure if this is intended, just my observation.

    Hope this help! Adam

    Marked as helpful
  • Leo•440
    @Souicia
    Submitted almost 3 years ago

    Tip Calculator using JS and SCSS

    #sass/scss
    1
    achrustowski•150
    @achrustowski
    Posted almost 3 years ago

    Hi Leo!

    I really like your solution, logic works as expected and everything does it's job as it should, well done! :)

    As for reducing the amount of getElementById I don't think there is any other way if you're using vanilla JavaScript (I've done my solution similar way to yours). Only thing I'd change in order to make your life easier IF you had to edit your JS code, I'd put throwErrorMessage selectors into variables same as you did for buttons and inputs.

    Great job!

    Marked as helpful
  • achrustowski•150
    @achrustowski
    Submitted almost 3 years ago

    Testimonials responsive grid section

    3
    achrustowski•150
    @achrustowski
    Posted almost 3 years ago

    Hi @correlucas,

    Thanks very much for your feedback. I indeed have been using semantic elements in my previous solutions, but then what I would get is accessibility issues.. not sure why.

    Any idea why when I use semantic elements I'm getting accessibility issues?

    Cheers, Adam

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

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

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

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

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