Skip to content

Ani1967/calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Calculator

A sleek, glassmorphism-styled calculator built with pure HTML and inline CSS — no frameworks, no dependencies.

Calculator Preview License

Features

  • Glassmorphism UI — dark gradient background with frosted-glass card
  • Full arithmetic — addition, subtraction, multiplication, division
  • Extra operations — percentage (%) and sign toggle (+/-)
  • Expression history — shows the running expression above the result
  • Smart display — font scales down automatically for long numbers
  • Keyboard support — use number keys, operators, Enter, Backspace, and Escape
  • Zero dependencies — single index.html file, works offline

Keyboard Shortcuts

Key Action
0–9 Input digit
+ - * / Set operator
. Decimal point
Enter or = Calculate
Backspace Delete last digit
Escape Clear all (AC)

Getting Started

Run locally

# Clone the repo
git clone https://github.com/Ani1967/calculator.git
cd calculator

# Serve with Python (any port)
python3 -m http.server 56789

Then open http://localhost:56789 in your browser.

Or just open the file

open index.html

Project Structure

calculator/
└── index.html    # Everything — markup, styles, and logic in one file

Live Demo

Deploy via GitHub Pages: go to Settings → Pages → Branch: main → / (root) and the calculator will be live at https://ani1967.github.io/calculator/

License

MIT — free to use, modify, and distribute.

About

A beautiful HTML/CSS calculator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages