-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
96 lines (85 loc) · 1.82 KB
/
Copy pathstyle.css
File metadata and controls
96 lines (85 loc) · 1.82 KB
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
/* Base Reset */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #121212;
color: #ffffff;
padding: 20px;
}
header {
text-align: center;
margin-bottom: 30px;
}
.controls {
margin-top: 15px;
display: flex;
justify-content: center;
gap: 10px;
}
input, select {
padding: 10px;
font-size: 1rem;
border-radius: 5px;
border: none;
}
/* --- THE GRID --- */
.periodic-table {
display: grid;
grid-template-columns: repeat(18, 1fr);
gap: 5px;
max-width: 1400px;
margin: 0 auto;
}
/* Element Styling */
.element {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 10px 5px;
border: 2px solid transparent;
border-radius: 4px;
background-color: #2a2a2a;
color: #fff;
cursor: pointer;
transition: transform 0.2s, opacity 0.3s;
}
.element:hover, .element:focus {
transform: scale(1.1);
z-index: 10;
border-color: #fff;
outline: none; /* Replaced by custom border on focus */
}
/* Color Coding */
.nonmetal { background-color: #2c4c3b; }
.noble-gas { background-color: #4b2b4c; }
.alkali { background-color: #633215; }
/* Tooltip implementation */
.tooltip {
visibility: hidden;
position: absolute;
bottom: 110%; /* Positions it right above the element */
background-color: #fff;
color: #000;
padding: 5px;
border-radius: 4px;
font-size: 0.8rem;
white-space: nowrap;
opacity: 0;
transition: opacity 0.3s;
}
.element:hover .tooltip,
.element:focus .tooltip {
visibility: visible;
opacity: 1;
}
/* Dimmer class for when elements are filtered out */
.element.faded {
opacity: 0.2;
pointer-events: none;
}