This is a solution to the Calculator app challenge on Frontend Mentor. with dark mode feature.
Users should be able to:
- See the size of the elements adjust based on their device's screen size
- Perform mathmatical operations like addition, subtraction, multiplication, and division
- Adjust the color theme based on their preference
- Solution URL: solution URL
- Live Site URL: live site URL
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
<h1>HTML layout of a calculator</h1>
<button type="button" class="operator" value="-">-</button>
<button type="button" class="operator" value="*">×</button>
<button type="button" class="operator" value="/">÷</button>
<button type="button" value="7">7</button>
<button type="button" value="8">8</button>
<button type="button" value="9">9</button>
.calculator-keys {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
grid-gap: 20px;
padding: 20px;
}
const calculator = {
displayValue: '0',
firstOperand: null,
waitingForSecondOperand: false,
operator: null,
};
console.log('๐')
- sin, cos, tan functionality
- CSS grid - This helped me with CSS grid. I really liked this pattern and it's explanatory.
- Js calculator resources - This is an amazing article which helped me finally understand javascript calculator. I'd recommend it to anyone still learning this concept.
- Website - Faozziyyah
- Frontend Mentor - @faozziyyah
- Twitter - @muslimahdev