Calculator built with XState and React

Solution retrospective
This was my first time using XState for a full project, and I found it very useful for setting up the logic of this app.
I loved the theming of this. It was the first time I didn't have to tweak the contrast for accessibility either. CSS Custom Properties made this very straightforward.
Any feedback welcome
Please log in to post a comment
Log in with GitHubCommunity feedback
- @pikapikamart
Hey, really nice work on this one. Layout in general looks really great.
This challenge makes it hard for me suggest some things out but for just little ones, here are some:
- Theme toggles should be wrapped inside a
fieldset
along with alegend
tag. Thelegend
tag text-content should be thetheme
word, this way users will know what are the purpose of the set of radio-buttons. - Adding a visual-indicator on those toggles. You could use
focus-within
and target the small-circle to have anoutline
. That way, when the focus is on the radio-buttons, the selector will put an outline on the circle. - Adding
cursor: pointer
for those interactive elements on desktop layout so that they appear more natural since they are interactive. - You could have added a screen-reader only
h2
inside themain
that describes what is the main content is all about. button
does not needtype="button"
since they are not inside aform
that turns them totype="submit"
.- Also, you could achieve those shadow at each button's bottom by using a
box-shadow
withinset
like:
box-shadow: inset 100px 1px 1px 1px red;
on the
button
.Aside from those, really great job on this one.
Marked as helpful - Theme toggles should be wrapped inside a
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