Skip to content

Add scientific calculator with dark/light theme toggle - #27

Draft
haslam93 with Copilot wants to merge 2 commits into
mainfrom
copilot/update-calculator-design-and-features
Draft

Add scientific calculator with dark/light theme toggle#27
haslam93 with Copilot wants to merge 2 commits into
mainfrom
copilot/update-calculator-design-and-features

Conversation

Copilot AI commented Jan 20, 2026

Copy link
Copy Markdown
Contributor

Transforms basic 4-function calculator into full scientific calculator with persistent theme switching.

Changes

Scientific Functions (client-side)

  • Trigonometry: sin, cos, tan (degree mode)
  • Logarithms: log (base 10), ln (natural)
  • Powers/roots: , x^y, ,
  • Utilities: |x|, 1/x, %, ±
  • Constants: π, e

Theme System

  • Toggle button with localStorage persistence
  • Explicit .dark-theme class replaces media query approach
  • Icon switches between 🌙 (light mode) and ☀️ (dark mode)

Layout

  • Expanded from 4-column to 5-column grid
  • Increased size: 90vw × 95vh (from fixed 320px)
  • Maintained responsive breakpoints for mobile/tablet/desktop

Implementation Notes

  • Power operation (x^y) handled client-side via Math.pow()
  • Basic arithmetic (+, -, ×, ÷) still uses existing server API
  • Backward compatible with all existing tests

Screenshots

Before:
Before

After - Light Mode:
Light

After - Dark Mode:
Dark

Original prompt

This section details on the original issue you should resolve

<issue_title>Update the calcualtor</issue_title>
<issue_description>I want to update the calculator to include

  • Modern Design with dark/light mode
  • A full scneitific calculator
  • Ability to change theme.

Acceptance criteria:

  • Screenshot of before and after.
  • Test each use case
  • All buttons should work
  • Calcualtors cover the screen.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: haslam93 <36418598+haslam93@users.noreply.github.com>
Copilot AI changed the title [WIP] Update calculator to include modern design and functionality Add scientific calculator with dark/light theme toggle Jan 20, 2026
Copilot AI requested a review from haslam93 January 20, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update the calcualtor

2 participants