Skip to content

Commit

Permalink
New tooltip CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Acamaeda committed Jun 17, 2021
1 parent 92f5312 commit 68521fb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- The game now autosaves before closing, if autosave is on. (Thank you to thepaperpilot for this!)
- More Anti-NaN safety.
- Fixed challenges glowing from countsAs.
- Improved tooltip centering (thanks to Scarlettt!)
- canReset now works properly for non-custom layers.
- Fixed baseAmount being set to 0 even when a layer resets nothing.
- Fixed centering on tooltips.
Expand Down
73 changes: 36 additions & 37 deletions css/misc.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,46 @@
}

.tooltip {
pointer-events: none;
text-align: center;
width: 150px;
font-size: 16px;
line-height: 1.2;
bottom: 100%;
left: 50%;
margin-bottom: 5px;
padding: 7px;
font-family: "Lucida Console", "Courier New", monospace;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
opacity: 0;
transition: opacity 0.5s;
transform: translateX(-50%);
min-width: max-content;

position: absolute;
z-index: 20000 ;
pointer-events: none;
text-align: center;
width: 150px;
font-size: 16px;
line-height: 1.2;
bottom: 100%;
left: 50%;
margin-bottom: 5px;
transform: translateX(-50%);
padding: 7px;
font-family: "Lucida Console", "Courier New", monospace;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
opacity: 0;
transition: opacity 0.5s;

background-color: var(--background_tooltip);
color: var(--points);
content: attr(tooltip);
font-size:14px;
position: absolute;
z-index: 20000;

background-color: var(--background_tooltip);
color: var(--points);
content: attr(tooltip);
font-size:14px;

}
}

.tooltip::after {
content: " ";
position: absolute;
bottom: 100%;
left: 50%;
.tooltip::after {
content: " ";
position: absolute;
bottom: 100%;
left: 50%;

top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: var(--background_tooltip) transparent transparent transparent;
}
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: var(--background_tooltip) transparent transparent transparent;
}

/* Horizontal/vertical lines */
.vl {
Expand Down

0 comments on commit 68521fb

Please sign in to comment.