Skip to content

Commit 3e81eb6

Browse files
committed
tooltip
1 parent 4234881 commit 3e81eb6

File tree

1 file changed

+61
-18
lines changed

1 file changed

+61
-18
lines changed

site/static/compare.html

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868

6969
#filters-content {
7070
margin-top: 16px;
71-
7271
}
7372

7473
#filters {
@@ -98,6 +97,40 @@
9897
.cache-label {
9998
font-weight: bold;
10099
}
100+
101+
.tooltip {
102+
position: relative;
103+
border-radius: 50%;
104+
border: 1px solid #7d6969;
105+
width: 16px;
106+
text-align: center;
107+
font-weight: bold;
108+
background: #d6d3d3;
109+
cursor: pointer;
110+
display: inline-block;
111+
}
112+
113+
.tooltip .tooltiptext {
114+
width: 180px;
115+
visibility: hidden;
116+
color: white;
117+
background-color: #524d4d;
118+
text-align: center;
119+
padding: 5px;
120+
border-radius: 6px;
121+
122+
position: absolute;
123+
bottom: 125%;
124+
margin-left: -60px;
125+
126+
opacity: 0;
127+
transition: opacity 0.3s;
128+
}
129+
130+
.tooltip:hover .tooltiptext {
131+
visibility: visible;
132+
opacity: 1;
133+
}
101134
</style>
102135
<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
103136
</head>
@@ -132,7 +165,7 @@
132165
</form>
133166
<div id="filters">
134167
<div id="filters-toggle" class="section-heading">Filters<span id="filters-toggle-indicator"></span></div>
135-
<div id="filters-content">
168+
<div id="filters-content" style="display: none;">
136169
<div>
137170
<div class="section-heading">Filter by benchmark
138171
</div>
@@ -141,25 +174,35 @@
141174
<div>
142175
<div class="section-heading">Cache states</div>
143176
<p>Most benchmarks have at least 4 cache states for which we collect data:</p>
144-
<ul style="list-style:none;">
145-
<li><input type="checkbox" id="build-full" checked /><span class="cache-label">full</span>: a
146-
non-incremental full build starting with empty cache</li>
177+
<ul style="display: flex; justify-content: space-around; list-style:none;">
178+
<li><input type="checkbox" id="build-full" checked /><span class="cache-label">full</span>
179+
<div class="tooltip">?<span class="tooltiptext">A
180+
non-incremental full build starting with empty cache</span></div>
181+
</li>
147182
<li><input type="checkbox" id="build-incremental-full" checked /> <span
148-
class="cache-label">incr-full</span>: an incremental build
149-
starting
150-
with empty cache</li>
183+
class="cache-label">incr-full</span>
184+
<div class="tooltip">?<span class="tooltiptext">An incremental build
185+
starting
186+
with empty cache
187+
</span></div>
188+
</li>
151189
<li><input type="checkbox" id="build-incremental-unchanged" checked /> <span
152-
class="cache-label">incr-unchanged</span>: an
153-
incremental
154-
build
155-
starting with complete
156-
cache, and unchanged source directory -- the "perfect" scenario for incremental.</li>
190+
class="cache-label">incr-unchanged</span>
191+
<div class="tooltip">?<span class="tooltiptext">An
192+
incremental
193+
build
194+
starting with complete
195+
cache, and unchanged source directory -- the "perfect" scenario for incremental.</span>
196+
</div>
197+
</li>
157198
<li><input type="checkbox" id="build-incremental-patched" checked /><span
158-
class="cache-label">incr-patched</span> : an incremental
159-
build
160-
starting with complete cache, and an
161-
altered source directory. The typical variant of this is "println" which represents
162-
the addition of a `println!` macro somewhere in the source code.</li>
199+
class="cache-label">incr-patched</span>
200+
<div class="tooltip">?<span class="tooltiptext">An incremental
201+
build
202+
starting with complete cache, and an
203+
altered source directory. The typical variant of this is "println" which represents
204+
the addition of a `println!` macro somewhere in the source code.</span></div>
205+
</li>
163206
</ul>
164207
</div>
165208
</div>

0 commit comments

Comments
 (0)