-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
113 lines (96 loc) · 2.51 KB
/
styles.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/* Reset default margin and padding */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: #e0e0e0; /* Light background for contrast */
font-family: Arial, sans-serif;
}
.calculator {
width: 100%;
height: 100%;
background: #ffffff; /* White background for a clean look */
border-radius: 0px; /* Rounded corners for a modern feel */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
display: flex;
flex-direction: column;
overflow: hidden;
}
.display {
width: 100%;
height: 70px;
background: #333; /* Dark background for the display */
color: #fff;
text-align: right;
font-size: 2em;
border: none;
padding: 15px;
box-sizing: border-box;
border-radius: 0px 0px 0 0;
}
.buttons {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
padding: 15px;
}
button {
background: #f4f4f4; /* Light background for buttons */
border: 1px solid #ddd; /* Light border for button definition */
border-radius: 10px; /* Rounded corners for buttons */
color: #333; /* Dark text color for contrast */
font-size: 1.5em;
padding: 20px;
cursor: pointer;
transition: background 0.2s, box-shadow 0.2s;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}
button:hover {
background: #e0e0e0; /* Slightly darker background on hover */
}
button:active {
background: #ccc; /* Even darker background on click */
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Less shadow on click */
}
/* Distinguish special buttons (e.g., remove, clear) */
button.remove {
background: #ff6f61; /* A distinct color for remove and clear */
color: white;
border: none; /* Remove border for special buttons */
}
button.remove:hover {
background: #ff3d2e;
}
button.remove:active {
background: #e03a27;
}
button.equal {
background: #0000FF; /* A distinct color for remove and clear */
color: white;
border: none; /* Remove border for special buttons */
}
button.equal:hover {
background: #ff3d2e;
}
button.equal:active {
background: #e03a27;
}
@media (max-width: 600px) {
.calculator {
width: 100%;
box-shadow: none;
}
.buttons {
grid-template-columns: repeat(4, 1fr);
}
button {
font-size: 1.2em;
padding: 15px;
}
}