Add CSS for tooltip

This commit is contained in:
ebolam
2022-09-21 20:18:52 -04:00
parent 998b9e7d4c
commit 8a6afb8079
2 changed files with 50 additions and 4 deletions

View File

@@ -1359,6 +1359,8 @@ body {
border-style:solid;
}
.inputrow.status_bar {
grid-template-rows: 0px 60px 40px;
}
@@ -2419,4 +2421,51 @@ input[type='range'] {
.action_image {
width: var(--flyout_menu_width);
}
}
/*Tooltip based on attribute*/
[tooltip] {
cursor: pointer;
display: inline-block;
line-height: 1;
position: relative;
}
[tooltip]::after {
background-color: rgba(51, 51, 51, 0.9);
border-radius: 0.3rem;
color: #fff;
content: attr(tooltip);
font-size: 1rem;
font-size: 85%;
font-weight: normal;
line-height: 1.15rem;
opacity: 0;
padding: 0.25rem 0.5rem;
position: absolute;
text-align: center;
text-transform: none;
transition: opacity 0.2s;
visibility: hidden;
white-space: nowrap;
z-index: 1;
}
@media (max-width: 767px) {
[tooltip].tooltip::before {
display: none;
}
[tooltip].tooltip:after {
font-size: 1rem;
max-width: 20rem;
position: fixed;
bottom: auto;
top: 50%;
left: 50%;
text-align: left;
transform: translate(-50%);
white-space: normal;
}
}
[tooltip]:hover::after, [tooltip][class*=tooltip]:hover::before {
visibility: visible;
opacity: 1;
}

View File

@@ -468,7 +468,6 @@ function var_changed(data) {
}
//Special Case for Actions
if ((data.classname == "story") && (data.name == "actions")) {
start_processing_time = Date.now();
do_story_text_updates(data);
create_options(data);
do_story_text_length_updates(data);
@@ -478,8 +477,6 @@ function var_changed(data) {
} else {
document.getElementById('Selected Text Chunk '+data.value.id).classList.remove("within_max_length");
}
var_processing_time += Date.now() - start_processing_time;
document.getElementById('var_time').textContent = var_processing_time;
//Special Case for Presets
} else if ((data.classname == 'model') && (data.name == 'presets')) {