Skip to content

Commit e1ed994

Browse files
committed
Fix vertical sponsor ad overflow
1 parent 58413bb commit e1ed994

1 file changed

Lines changed: 23 additions & 7 deletions

File tree

theme/pagetoc.css

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,10 @@
642642

643643
.ht-sponsor-copy {
644644
min-width: 0;
645+
min-height: 0;
645646
display: flex;
646647
flex-direction: column;
648+
overflow: hidden;
647649
}
648650

649651
.ht-sponsor-title {
@@ -663,10 +665,14 @@
663665
color: rgba(210, 222, 245, 0.68) !important;
664666
font-size: 15px;
665667
line-height: 1.45;
666-
max-height: none !important;
668+
flex: 1 1 auto;
669+
min-height: 0;
670+
max-height: 100% !important;
667671
opacity: 1 !important;
668672
visibility: visible !important;
669-
overflow: visible !important;
673+
overflow: auto !important;
674+
overscroll-behavior: contain;
675+
padding-right: 3px;
670676
transform: none !important;
671677
}
672678

@@ -700,6 +706,8 @@
700706
text-align: center;
701707
text-transform: uppercase;
702708
max-width: 100%;
709+
min-height: 36px;
710+
flex: 0 0 auto;
703711
opacity: 1 !important;
704712
overflow: visible !important;
705713
visibility: visible !important;
@@ -772,16 +780,16 @@
772780

773781
.sidesponsor {
774782
width: 100% !important;
775-
min-height: 360px;
776-
max-height: none !important;
777-
height: auto !important;
783+
min-height: min(360px, 52vh);
784+
max-height: 52% !important;
785+
height: 52% !important;
778786
grid-template-columns: minmax(0, 1fr);
779787
grid-template-areas:
780788
"kicker"
781789
"media"
782790
"copy"
783791
"cta";
784-
grid-template-rows: auto auto auto auto !important;
792+
grid-template-rows: auto auto minmax(0, 1fr) auto !important;
785793
align-items: stretch !important;
786794
align-content: start !important;
787795
gap: 9px !important;
@@ -819,12 +827,20 @@
819827
.sidesponsor .ht-sponsor-description {
820828
font-size: 15px;
821829
line-height: 1.4;
830+
flex: 1 1 auto;
831+
min-height: 0;
832+
max-height: 100% !important;
833+
opacity: 1 !important;
834+
visibility: visible !important;
835+
overflow: auto !important;
836+
overscroll-behavior: contain;
837+
transform: none !important;
822838
}
823839

824840
.sidesponsor .ht-sponsor-cta {
825841
padding: 8px 10px !important;
826842
font-size: 11px;
827-
min-height: 0;
843+
min-height: 36px;
828844
}
829845

830846
@media only screen and (max-width: 799px) {

0 commit comments

Comments
 (0)