Design comparison
Solution retrospective
It was harder than I thought, I designed the math logic gates for several days, and then it turned out that the built-in calculation could be used with two lines and I could cut out my multi-line code. :D No problem, at least I learned from that. Any feedback welcome.
Community feedback
- @FluffyKasPosted over 2 years ago
Hiyo,
Visually it's great and apart from some smaller issues it works very well! The little calculator icon you added to the page tab is very cute. The only thing you could perhaps add to the functionality is to prevent users from adding more than one operator. Right now I could just add two + operators and then it - obviously - threw an error. Other issues are html and css related:
-
Your buttons should be buttons, not divs.
-
Your theme switch has a few accessibility issues: instead of a div, your switch should be wrapped in a form and a fieldset. For the "theme" title you could try using legend element.
-
Adding
display: none
on your input will entirely remove them from the html and users won't be able to interact with them. You'd want to useopacity: 0
here, so screen readers can still note that they're there. -
Your switch is missing aria-label so there are really only visual indicators as to what options there are. In React it's quite easy to conditionally change what's displayed as an aria-label. I'd also suggest using more descriptive theme names, rather than first, second, third (=>light, dark, neon perhaps?).
-
Don't set a fixed height on your buttons (or on anything else, really). Add padding.
-
Don't lock the height of your website to a 100vh, use
min-height
instead. -
You could add an align-items: center as well, to center the calculator vertically.
All in all, it looks great though, you only have some work to do the on the accessibility side of things. Good luck ^^
Marked as helpful2@unexunderscorePosted over 2 years ago@FluffyKas Hi there, thank you for your time and feedback.
0 -
Please log in to post a comment
Log in with GitHubJoin 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