feat: show the name of an icon button on hover
This commit is contained in:
1 parent
8ba2dd1f1b
commit
a02fdc01b0
2 files changed
+16
-6
No files matched your search
@@ -63,6 +63,16 @@ button:hover, .btn:hover { background: var(--accent-hover); text-decoration: non
|
||||
.btn.small { padding: 6px 10px; font-size: 13px; }
|
||||
.btn.icon { width: 30px; height: 30px; padding: 0; display: inline-flex;
|
||||
align-items: center; justify-content: center; font-size: 14px; line-height: 1; text-decoration: none; }
|
||||
/* Name of an icon button, shown at once on hover or keyboard focus. */
|
||||
[data-tip] { position: relative; }
|
||||
[data-tip]::after {
|
||||
content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%;
|
||||
transform: translateX(-50%); padding: 4px 8px; border-radius: 6px; white-space: nowrap;
|
||||
background: #0c0f13; border: 1px solid var(--border); color: var(--text);
|
||||
font-size: 12px; font-weight: 400; line-height: 1.4;
|
||||
opacity: 0; visibility: hidden; pointer-events: none; z-index: 10;
|
||||
}
|
||||
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; visibility: visible; }
|
||||
.err { background: #3a1d1d; border: 1px solid #6b2b2b; color: #ffb3b3; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
|
||||
|
||||
Reference in new issue
Block a user