Skip to content
Submitted over 1 year ago

Responsive, keyboard-accessible calculator app with theme switcher

accessibility, eleventy, cube-css
LVL 4
@joshjavier
A solution to the Calculator app challenge

Solution retrospective


What are you most proud of, and what would you do differently next time?
  • Draggable theme switcher
  • Keypad navigation via arrow keys
  • Pipeline for transpiling and minifying CSS and JS
What challenges did you encounter, and how did you overcome them?
  • Making the layout work on my iPhone SE. Support for container query units is still lacking for Safari in iOS 15.8 and below. I solved this by switching to viewport units like vi and then using cqi units as progressive enhancement for browsers that support it.

  • Building a 3-way theme switcher using the progressive enhancement approach. First radio buttons, then CSS animations, add minimal JS to apply the theme, and finally allow the handle to be dragged. Learned a lot about pointer events and dragging!

  • Applying CSS grid layout to the table element. I solved this by applying display: contents to the tbody, tr, and td elements so that the button keys can participate directly in the table's CSS grid layout.

What specific areas of your project would you like help with?

I haven't spent a lot of time on improving the screen reader accessibility, so if you spot any room for improvement, I'd love to hear it!

Code
Loading...

Please log in to post a comment

Log in

Community feedback

No feedback yet. Be the first to give feedback on Josh Javier’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