Update app_enhanced.py
Browse files- app_enhanced.py +56 -60
app_enhanced.py
CHANGED
|
@@ -543,102 +543,98 @@ class EnhancedComicGenerator:
|
|
| 543 |
.speech-bubble.selected { outline: 2px dashed #4CAF50; }
|
| 544 |
.speech-bubble textarea { position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box; border: 1px solid #4CAF50; background: rgba(255,255,255,0.95); font: inherit; text-align: center; resize: none; padding: 8px; z-index: 102; }
|
| 545 |
|
| 546 |
-
/* <<< FIXED BUBBLE CSS
|
| 547 |
.speech-bubble.speech {
|
| 548 |
background: var(--bubble-fill-color, white);
|
| 549 |
color: var(--bubble-text-color, #333);
|
| 550 |
border: 2px solid var(--bubble-border-color, #333);
|
| 551 |
border-radius: 10px;
|
| 552 |
padding: 0;
|
| 553 |
-
--tail-pos: 50%; /* Default centered
|
| 554 |
}
|
| 555 |
|
| 556 |
.speech-bubble.speech:after, .speech-bubble.speech:before {
|
| 557 |
-
content: '';
|
| 558 |
-
position: absolute;
|
| 559 |
-
display: block;
|
| 560 |
-
width: 0;
|
| 561 |
pointer-events: none;
|
| 562 |
}
|
| 563 |
|
| 564 |
/* BOTTOM TAIL */
|
| 565 |
.speech-bubble.speech.tail-bottom:after {
|
| 566 |
-
|
| 567 |
-
border
|
| 568 |
-
border-color: var(--bubble-fill-color, white)
|
| 569 |
-
bottom:
|
| 570 |
-
left: var(--tail-pos);
|
| 571 |
transform: translateX(-50%);
|
| 572 |
-
z-index:
|
| 573 |
}
|
| 574 |
.speech-bubble.speech.tail-bottom:before {
|
| 575 |
-
|
| 576 |
-
border
|
| 577 |
-
border-color: var(--bubble-border-color, #333)
|
| 578 |
-
bottom:
|
| 579 |
-
left: var(--tail-pos);
|
| 580 |
transform: translateX(-50%);
|
| 581 |
-
z-index:
|
| 582 |
}
|
| 583 |
|
| 584 |
/* TOP TAIL */
|
| 585 |
.speech-bubble.speech.tail-top:after {
|
| 586 |
-
|
| 587 |
-
border
|
| 588 |
-
border-color:
|
| 589 |
-
top:
|
| 590 |
-
left: var(--tail-pos);
|
| 591 |
-
transform: translateX(-50%)
|
| 592 |
-
z-index:
|
| 593 |
}
|
| 594 |
.speech-bubble.speech.tail-top:before {
|
| 595 |
-
|
| 596 |
-
border
|
| 597 |
-
border-color:
|
| 598 |
-
top:
|
| 599 |
-
left: var(--tail-pos);
|
| 600 |
-
transform: translateX(-50%)
|
| 601 |
-
z-index:
|
| 602 |
}
|
| 603 |
|
| 604 |
/* RIGHT TAIL */
|
| 605 |
.speech-bubble.speech.tail-right:after {
|
| 606 |
-
|
| 607 |
-
border
|
| 608 |
-
border-color: var(--bubble-fill-color, white)
|
| 609 |
-
|
| 610 |
-
right: -15px;
|
| 611 |
-
transform: translateY(-50%)
|
| 612 |
-
z-index:
|
| 613 |
}
|
| 614 |
.speech-bubble.speech.tail-right:before {
|
| 615 |
-
|
| 616 |
-
border
|
| 617 |
-
border-color: var(--bubble-border-color, #333)
|
| 618 |
-
|
| 619 |
-
right: -19px;
|
| 620 |
-
transform: translateY(-50%)
|
| 621 |
-
z-index:
|
| 622 |
}
|
| 623 |
|
| 624 |
/* LEFT TAIL */
|
| 625 |
.speech-bubble.speech.tail-left:after {
|
| 626 |
-
|
| 627 |
-
border
|
| 628 |
-
border-color: var(--bubble-fill-color, white)
|
| 629 |
-
|
| 630 |
-
left: -15px;
|
| 631 |
-
transform: translateY(-50%)
|
| 632 |
-
z-index:
|
| 633 |
}
|
| 634 |
.speech-bubble.speech.tail-left:before {
|
| 635 |
-
|
| 636 |
-
border
|
| 637 |
-
border-color: var(--bubble-border-color, #333)
|
| 638 |
-
|
| 639 |
-
left: -19px;
|
| 640 |
-
transform: translateY(-50%)
|
| 641 |
-
z-index:
|
| 642 |
}
|
| 643 |
|
| 644 |
.speech-bubble.thought { background: white; border: 2px dashed #555; color: #333; border-radius: 50%; }
|
|
|
|
| 543 |
.speech-bubble.selected { outline: 2px dashed #4CAF50; }
|
| 544 |
.speech-bubble textarea { position: absolute; top: 0; left: 0; width: 100%; height: 100%; box-sizing: border-box; border: 1px solid #4CAF50; background: rgba(255,255,255,0.95); font: inherit; text-align: center; resize: none; padding: 8px; z-index: 102; }
|
| 545 |
|
| 546 |
+
/* <<< FIXED BUBBLE CSS: ROBUST DIRECTIONAL TAILS >>> */
|
| 547 |
.speech-bubble.speech {
|
| 548 |
background: var(--bubble-fill-color, white);
|
| 549 |
color: var(--bubble-text-color, #333);
|
| 550 |
border: 2px solid var(--bubble-border-color, #333);
|
| 551 |
border-radius: 10px;
|
| 552 |
padding: 0;
|
| 553 |
+
--tail-pos: 50%; /* Default centered */
|
| 554 |
}
|
| 555 |
|
| 556 |
.speech-bubble.speech:after, .speech-bubble.speech:before {
|
|
|
|
|
|
|
|
|
|
|
|
|
| 557 |
pointer-events: none;
|
| 558 |
}
|
| 559 |
|
| 560 |
/* BOTTOM TAIL */
|
| 561 |
.speech-bubble.speech.tail-bottom:after {
|
| 562 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 563 |
+
border: 15px solid transparent;
|
| 564 |
+
border-top-color: var(--bubble-fill-color, white);
|
| 565 |
+
border-bottom: 0;
|
| 566 |
+
bottom: -15px; left: var(--tail-pos);
|
| 567 |
transform: translateX(-50%);
|
| 568 |
+
z-index: 2;
|
| 569 |
}
|
| 570 |
.speech-bubble.speech.tail-bottom:before {
|
| 571 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 572 |
+
border: 17px solid transparent;
|
| 573 |
+
border-top-color: var(--bubble-border-color, #333);
|
| 574 |
+
border-bottom: 0;
|
| 575 |
+
bottom: -19px; left: var(--tail-pos);
|
| 576 |
transform: translateX(-50%);
|
| 577 |
+
z-index: 1;
|
| 578 |
}
|
| 579 |
|
| 580 |
/* TOP TAIL */
|
| 581 |
.speech-bubble.speech.tail-top:after {
|
| 582 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 583 |
+
border: 15px solid transparent;
|
| 584 |
+
border-bottom-color: var(--bubble-fill-color, white);
|
| 585 |
+
border-top: 0;
|
| 586 |
+
top: -15px; left: var(--tail-pos);
|
| 587 |
+
transform: translateX(-50%);
|
| 588 |
+
z-index: 2;
|
| 589 |
}
|
| 590 |
.speech-bubble.speech.tail-top:before {
|
| 591 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 592 |
+
border: 17px solid transparent;
|
| 593 |
+
border-bottom-color: var(--bubble-border-color, #333);
|
| 594 |
+
border-top: 0;
|
| 595 |
+
top: -19px; left: var(--tail-pos);
|
| 596 |
+
transform: translateX(-50%);
|
| 597 |
+
z-index: 1;
|
| 598 |
}
|
| 599 |
|
| 600 |
/* RIGHT TAIL */
|
| 601 |
.speech-bubble.speech.tail-right:after {
|
| 602 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 603 |
+
border: 15px solid transparent;
|
| 604 |
+
border-left-color: var(--bubble-fill-color, white);
|
| 605 |
+
border-right: 0;
|
| 606 |
+
right: -15px; top: var(--tail-pos);
|
| 607 |
+
transform: translateY(-50%);
|
| 608 |
+
z-index: 2;
|
| 609 |
}
|
| 610 |
.speech-bubble.speech.tail-right:before {
|
| 611 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 612 |
+
border: 17px solid transparent;
|
| 613 |
+
border-left-color: var(--bubble-border-color, #333);
|
| 614 |
+
border-right: 0;
|
| 615 |
+
right: -19px; top: var(--tail-pos);
|
| 616 |
+
transform: translateY(-50%);
|
| 617 |
+
z-index: 1;
|
| 618 |
}
|
| 619 |
|
| 620 |
/* LEFT TAIL */
|
| 621 |
.speech-bubble.speech.tail-left:after {
|
| 622 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 623 |
+
border: 15px solid transparent;
|
| 624 |
+
border-right-color: var(--bubble-fill-color, white);
|
| 625 |
+
border-left: 0;
|
| 626 |
+
left: -15px; top: var(--tail-pos);
|
| 627 |
+
transform: translateY(-50%);
|
| 628 |
+
z-index: 2;
|
| 629 |
}
|
| 630 |
.speech-bubble.speech.tail-left:before {
|
| 631 |
+
content: ''; position: absolute; width: 0; height: 0;
|
| 632 |
+
border: 17px solid transparent;
|
| 633 |
+
border-right-color: var(--bubble-border-color, #333);
|
| 634 |
+
border-left: 0;
|
| 635 |
+
left: -19px; top: var(--tail-pos);
|
| 636 |
+
transform: translateY(-50%);
|
| 637 |
+
z-index: 1;
|
| 638 |
}
|
| 639 |
|
| 640 |
.speech-bubble.thought { background: white; border: 2px dashed #555; color: #333; border-radius: 50%; }
|