File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
js/src/components/paid-ads/campaign-preview Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -94,14 +94,15 @@ $gla-campaign-preview-height: 270px;
94
94
95
95
// Display smaller font sizes than browsers' limitations.
96
96
& __scaled-text {
97
+ height : 1em ;
97
98
transform : scale (0.5 );
98
99
transform-origin : top left ;
99
100
margin-right : -100% ; // Inner shrinkage for offsetting the outer horizontal gap caused by 0.5 times scaling.
100
101
margin-bottom : -0.5em ; // Inner shrinkage for offsetting the outer vertical gap caused by 0.5 times scaling.
101
102
white-space : nowrap ;
102
103
overflow : hidden ;
103
104
text-overflow : ellipsis ;
104
- line-height : 1 ;
105
+ line-height : 0.9 ; // With 1em height, it prevents the font descender from getting cropped out.
105
106
font-size : 20px ;
106
107
107
108
& --smaller {
@@ -125,6 +126,10 @@ $gla-campaign-preview-height: 270px;
125
126
}
126
127
127
128
& --ad-badge {
129
+ // Reset height and line-height because ad badge holds enough height for font descender.
130
+ height : auto ;
131
+ line-height : 1 ;
132
+
128
133
// The same vertical inner shrinkage as above.
129
134
// A: Height of badge = &--ad-badge font-size + vertical padding
130
135
// B: Height of text after badge = &--smaller font-size
You can’t perform that action at this time.
0 commit comments