help@rskworld.in +91 93305 39277
RSK World
  • Home
  • Development
    • Web Development
    • Mobile Apps
    • Software
    • Games
    • Project
  • Technologies
    • Data Science
    • AI Development
    • Cloud Development
    • Blockchain
    • Cyber Security
    • Dev Tools
    • Testing Tools
  • About
  • Contact

Theme Settings

Color Scheme
Display Options
Font Size
100%
Back to Project
RSK World
js-calculator
RSK World
js-calculator
JavaScript Calculator - HTML5 + CSS3 + JavaScript + Voice Control + Scientific Functions + Modern UI + Glassmorphism Design
js-calculator
  • LICENSE1.1 KB
  • README.md1.3 KB
  • RELEASE_NOTES.md587 B
  • index.html6.3 KB
  • script.js23.4 KB
  • style.css6.9 KB
style.cssREADME.md
style.css
Raw Download
Find: Go to:
/*
    Project: JavaScript Calculator
    Author: Molla Samser (RSK World)
    Designer & Tester: Rima Khatun
    Website: https://rskworld.in
    Contact: info@rskworld.com, support@rskworld.com
    Phone: +91 93305 39277
    Location: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India, 713147
    Year: 2026
    Copyright: © 2026 RSK World. All rights reserved.
*/

:root {
    --primary-color: #f39c12;
    --bg-gradient: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    --calculator-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --display-bg: rgba(0, 0, 0, 0.3);
    --btn-bg: rgba(255, 255, 255, 0.08);
    --btn-hover: rgba(255, 255, 255, 0.15);
    --text-color: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.6);
    --transition-speed: 0.3s;
}

[data-theme="light"] {
    --bg-gradient: linear-gradient(135deg, #e0eafc, #cfdef3);
    --calculator-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --display-bg: rgba(255, 255, 255, 0.5);
    --btn-bg: rgba(0, 0, 0, 0.05);
    --btn-hover: rgba(0, 0, 0, 0.1);
    --text-color: #2c3e50;
    --text-muted: rgba(44, 62, 80, 0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    transition: background var(--transition-speed), color var(--transition-speed), border var(--transition-speed), backdrop-filter var(--transition-speed);
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-gradient);
    color: var(--text-color);
    overflow-y: auto;
    padding: 20px;
}

.calculator-container {
    width: 100%;
    max-width: 400px;
    background: var(--calculator-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-right {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 5px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--text-color);
    background: none;
    transform: none;
}

.history-panel {
    background: var(--display-bg);
    border-radius: 12px;
    margin-bottom: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s;
    padding: 0 15px;
}

.history-panel.active {
    max-height: 150px;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--glass-border);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

#clear-history {
    background: none;
    border: none;
    color: #ff5e62;
    font-size: 0.75rem;
    padding: 0;
    cursor: pointer;
}

.history-list {
    font-size: 0.9rem;
    overflow-y: auto;
    max-height: 100px;
}

.history-item {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.history-item:hover {
    color: var(--primary-color);
}

.scientific-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.scientific-grid.hidden {
    display: none;
}

.btn-sci {
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    padding: 12px 0;
}

.btn-memory {
    color: var(--primary-color);
    font-weight: 600;
}

.text-warning {
    color: var(--primary-color);
}

.calculator-display {
    background: var(--display-bg);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: right;
    word-wrap: break-word;
    word-break: break-all;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.previous-operand {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 5px;
    min-height: 1.2rem;
}

.current-operand {
    color: var(--text-color);
    font-size: 2.2rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

button {
    cursor: pointer;
    font-size: 1.2rem;
    border: 1px solid var(--glass-border);
    outline: none;
    background-color: var(--btn-bg);
    color: var(--text-color);
    border-radius: 12px;
    padding: 18px 0;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.btn-operator {
    background-color: rgba(243, 156, 18, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.btn-operator:hover {
    background-color: rgba(243, 156, 18, 0.25);
}

.btn-equals {
    background-color: var(--primary-color);
    color: #000;
    font-weight: 700;
}

.btn-equals:hover {
    background-color: #e67e22;
    color: #000;
}

.btn-delete,
.btn-clear {
    color: #ff5e62;
    background-color: rgba(255, 94, 98, 0.1);
}

.btn-delete:hover,
.btn-clear:hover {
    background-color: rgba(255, 94, 98, 0.2);
}

.span-two {
    grid-column: span 2;
}

.calculator-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.calculator-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.calculator-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 400px) {
    .calculator-container {
        width: 90%;
        padding: 20px;
    }

    button {
        padding: 15px 0;
    }
}

/* Animations and States */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.6s linear;
    background-color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.voice-active {
    color: #e74c3c !important;
    animation: pulse 1.5s infinite;
}

.active-state {
    color: var(--primary-color) !important;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}
345 lines•6.9 KB
css
README.md
Raw Download

README.md

# JavaScript Calculator - RSK World

A modern, feature-rich calculator built with vanilla JavaScript, HTML, and CSS. It features a beautiful glassmorphism UI, scientific functions, voice control, and a relaxing Lo-Fi background music mode.

## Features

- **Standard & Scientific Logic**: Perform basic arithmetic and advanced scientific calculations (Trig, Log, Factorial, etc.).
- **Voice Control**: Control the calculator using voice commands (e.g., "5 plus 10 equals").
- **Lo-Fi Music Mode**: Includes a built-in procedural ambient music generator for a chill coding/calculating experience.
- **Theme Support**: Toggle between Dark and Light modes.
- **History Tape**: View and recall past calculations.
- **Programmer Mode**: Real-time conversion to Hex, Dec, Oct, and Bin.
- **Responsive Design**: Works on Desktop, Tablet, and Mobile.

## Tech Stack

- **HTML5**
- **CSS3** (Variables, Flexbox, Grid, Animations)
- **JavaScript** (ES6+, Web Audio API, Web Speech API)

## Installation

Simply open `index.html` in any modern web browser. No build steps or dependencies required.

## Author

**Molla Samser** (RSK World)
- Website: [rskworld.in](https://rskworld.in)
- Email: info@rskworld.com

## Copyright

© 2026 RSK World. All rights reserved.

About RSK World

Founded by Molla Samser, with Designer & Tester Rima Khatun, RSK World is your one-stop destination for free programming resources, source code, and development tools.

Founder: Molla Samser
Designer & Tester: Rima Khatun

Development

  • Game Development
  • Web Development
  • Mobile Development
  • AI Development
  • Development Tools

Legal

  • Terms & Conditions
  • Privacy Policy
  • Disclaimer

Contact Info

Nutanhat, Mongolkote
Purba Burdwan, West Bengal
India, 713147

+91 93305 39277

hello@rskworld.in
support@rskworld.in

© 2026 RSK World. All rights reserved.

Content used for educational purposes only. View Disclaimer