mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Add CSS for tooltip
This commit is contained in:
@@ -1359,6 +1359,8 @@ body {
|
|||||||
border-style:solid;
|
border-style:solid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.inputrow.status_bar {
|
.inputrow.status_bar {
|
||||||
grid-template-rows: 0px 60px 40px;
|
grid-template-rows: 0px 60px 40px;
|
||||||
}
|
}
|
||||||
@@ -2420,3 +2422,50 @@ input[type='range'] {
|
|||||||
.action_image {
|
.action_image {
|
||||||
width: var(--flyout_menu_width);
|
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;
|
||||||
|
}
|
||||||
|
@@ -468,7 +468,6 @@ function var_changed(data) {
|
|||||||
}
|
}
|
||||||
//Special Case for Actions
|
//Special Case for Actions
|
||||||
if ((data.classname == "story") && (data.name == "actions")) {
|
if ((data.classname == "story") && (data.name == "actions")) {
|
||||||
start_processing_time = Date.now();
|
|
||||||
do_story_text_updates(data);
|
do_story_text_updates(data);
|
||||||
create_options(data);
|
create_options(data);
|
||||||
do_story_text_length_updates(data);
|
do_story_text_length_updates(data);
|
||||||
@@ -478,8 +477,6 @@ function var_changed(data) {
|
|||||||
} else {
|
} else {
|
||||||
document.getElementById('Selected Text Chunk '+data.value.id).classList.remove("within_max_length");
|
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
|
//Special Case for Presets
|
||||||
} else if ((data.classname == 'model') && (data.name == 'presets')) {
|
} else if ((data.classname == 'model') && (data.name == 'presets')) {
|
||||||
|
Reference in New Issue
Block a user