-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhexes.css
106 lines (85 loc) · 2.04 KB
/
hexes.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
:root {
--hexSize: max(min(calc(90vw/((var(--colCount)*3)+1)), calc(90vh/(((var(--rowCount)*2)+1)*1.732))), 6px);
--hexHeight: calc(2*1.732*var(--hexSize));
--fontSize: calc(var(--hexHeight)/4);
--BGColor: powderblue;
--hexNumColor: powderblue;
--hexContentColor: #757575;
}
body {
}
.hex-grid__list {
width: calc(((var(--colCount)*3)+1)*var(--hexSize));
height: calc(((var(--rowCount)*2)+1)*1.732*var(--hexSize));
display: grid;
list-style-type: none;
margin: 0;
padding: 5px;
grid-template-columns: repeat(var(--colCount), 1fr 2fr) 1fr;
background-color: var(--BGColor, black);
}
.hex-grid__item {
padding: calc(var(--padSize)*1px);
}
.hex-grid__background {
font-size: var(--fontSize);
overflow: hidden;
position:relative;
padding: 0 0%;
height: 100%;/**/
background-color: white;
clip-path: polygon(75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%, 25% 0);
}
.hex-grid__content {
height: 100%;
width: 100%;
position:absolute;
left: 0;
top: 0;
overflow: hidden;
background: rgba(0, 0, 0, 0);
clip-path: polygon(75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%, 25% 0);
font-size: var(--hexSize);
display:grid;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
}
.hex-grid__hexNums {
grid-column: 1 / 1;
grid-row: 1 / 1;
padding: 0 25%;
font-size: calc(var(--fontSize)/2.5);
color: var(--hexNumColor, var(--BGColor, #000000));
}
div.hexlink {
grid-column: 1 / 1;
grid-row: 1 / 1;
top: 0;
display: flex;
height: 100%;
width: 100%;
align-items:flex-end;
justify-content:center;
}
div.hexlink:hover {
cursor: hand;
cursor: pointer;
opacity: .9;
}
a.hexLink {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
text-decoration: none;
/* Makes sure the link doesn't get underlined */
z-index: 10;
/* raises anchor tag above everything else in div */
background-color: white;
/*workaround to make clickable in IE */
opacity: 0;
/*workaround to make clickable in IE */
filter: alpha(opacity=0);
/*workaround to make clickable in IE */
}