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

Body Mass Index Calculation Application Developed with HTML, SASS, JS

sass/scss, accessibility
Bruno Feitoza•20
@feitozabruno
A solution to the Body Mass Index calculator challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Frontend Mentor - Body Mass Index Calculation Solution

This is a solution for the Body Mass Index Calculator challenge in Frontend Mentor. Frontend Mentor's challenges help you improve your skills in developing realistic projects.

Index

  • Overview
  • The challenge
  • Screenshot
  • Links
  • My process
  • Built with
  • What I've Learned
  • Continuous Development
  • Useful Resources
  • Author

Note: Please delete this note and update the table of contents based on the sections you maintain.

Overview

The challenge

Users must be able to:

  • select whether to use managerial or imperial units
  • Enter your height and weight
  • View your BMI result, with your weight rating and healthy weight range
  • See the optimal layout for the interface depending on the device screen size
  • View hover and focus states for all interactive elements on the page

Screenshot

Project preview

Links

  • Live website URL: BMI Calculator

My process

Built with

  • semantic HTML5
  • SASS/SCSS
  • Flexbox
  • CSS Grid
  • Mobile first workflow
  • Pure JavaScript

What Ive learned

Use this section to recap some of your key learnings as we look at this project. Writing them down and providing sample code of the areas you want to highlight is a great way to strengthen your own knowledge.

To see how you can add code snippets, see below:

SASS/SCSS/CSS

  1. Modularization of files and use of variables in SASS/SCSS.
  2. Flexbox and GRID
  3. Absolute and Relative Position.
  4. Styling radio type inputs.
  5. Visual accessibility and accessibility for screen readers.
  6. Pseudo-class (::after) and (::before).
  7. Property (:focus-within) to activate the focus of a child element on the parent element.
  8. Responsibility for all device sizes.

JS

  1. Manipulation of the DOM
  2. Create reusable functions.

Continuous Development

I'm building my JavaSript base to learn and work with ReactJS and then NextJS in the future. For styling I intend to work with TailwindCSS and styled-components.

Useful Resources

  • ChatGPT - This helped me understand the concepts and workings of all my doubts.
  • Frontend Mentor - This is an amazing platform that helped me find professional and responsive Figma projects to turn into code.

Author

  • Website - Bruno Feitoza
  • GitHub - @feitozabruno
  • Mentor Frontend - @feitozabruno
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Bruno Feitoza's solution.

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 1st-party linked stylesheets, and styles within <style> tags.

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.