Skip to content

Commit 54530f1

Browse files
committed
tooltipの最適化
- box-shadowを削除し、代わりにborderで視覚効果を維持 - 複雑なtransitionを簡略化(opacity以外のz-index transitionを削除)
1 parent 5d32465 commit 54530f1

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

css/kunai/site/tooltip.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
width: max-content; max-width: 40em;
55
border: 1px solid black; padding: 0.2rem 0.4rem; margin: 0;
66
background-color: white; color: black; text-decoration: none; font-size: 0.9rem;
7-
position: fixed; box-shadow: 2px 2px 2px 0 rgba(128, 128, 128, 0.6);
7+
position: fixed; /* box-shadow: 2px 2px 2px 0 rgba(128, 128, 128, 0.6); GPUメモリ削減のため無効化 */
8+
border: 1px solid #ccc; /* box-shadowの代替として境界線を強化 */
89
cursor: default;
910
opacity: 0; z-index: -1;
10-
transition: opacity .3s linear .5s, z-index 0s linear .8s;
11+
/* transition: opacity .3s linear .5s, z-index 0s linear .8s; GPUメモリ削減のため簡略化 */
12+
transition: opacity .2s ease-out .3s;
1113
}
1214
#kunai-ui-tooltip:before {
1315
content: attr(data-desc);
1416
}
1517
#kunai-ui-tooltip.kunai-ui-tooltip-revealed {
1618
opacity: 1; z-index: 1000000;
17-
transition: opacity .3s linear 0s, z-index 0s linear 0s;
19+
/* transition: opacity .3s linear 0s, z-index 0s linear 0s; GPUメモリ削減のため簡略化 */
20+
transition: opacity .2s ease-out;
1821
}

0 commit comments

Comments
 (0)