Skip to content

Commit 1822ae6

Browse files
committed
Tweak subtitle styling to be consistent with Next Steps widget
1 parent b12de7d commit 1822ae6

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

special-pages/pages/new-tab/app/privacy-stats/components/ActivityHeading.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,14 @@ export function ActivityHeading({ expansion, canExpand, itemCount, trackerCount,
6565
</span>
6666
)}
6767
{itemCount === 0 && (
68-
<p className={styles.subtitle}>
68+
<p className={cn(styles.subtitle, { [styles.indented]: !adBlocking })}>
6969
{adBlocking ? t('activity_noRecentAdsAndTrackers_subtitle') : t('activity_noRecent_subtitle')}
7070
</p>
7171
)}
7272
{itemCount > 0 && (
73-
<p className={cn(styles.subtitle, { [styles.uppercase]: !adBlocking })}>{t('stats_feedCountBlockedPeriod')}</p>
73+
<p className={cn(styles.subtitle, styles.indented, { [styles.uppercase]: !adBlocking })}>
74+
{t('stats_feedCountBlockedPeriod')}
75+
</p>
7476
)}
7577
</div>
7678
);

special-pages/pages/new-tab/app/privacy-stats/components/PrivacyStats.module.css

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
padding-left: 6px;
3636
grid-column-gap: 10px;
3737
}
38-
39-
&.adsAndTrackersVariant {
40-
grid-row-gap: 0;
41-
}
4238
}
4339

4440
.headingIcon {
@@ -109,17 +105,20 @@
109105
.subtitle {
110106
grid-area: label;
111107
color: var(--ntp-text-muted);
112-
padding-left: 2px;
113108

114109
&.uppercase {
115110
line-height: 1;
116111
text-transform: uppercase;
117112
}
118113

114+
&.indented {
115+
padding-left: 2px;
116+
}
117+
119118
.adsAndTrackersVariant & {
120119
font-size: var(--small-label-font-size);
121-
line-height: 1;
122-
text-transform: none;
120+
letter-spacing: 0.06px;
121+
line-height: var(--small-label-line-height);
123122
}
124123
}
125124

special-pages/pages/new-tab/app/privacy-stats/components/PrivacyStatsHeading.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,16 @@ export function PrivacyStatsHeading({ expansion, canExpand, recent, onToggle, bu
6060
/>
6161
</span>
6262
)}
63-
{recent === 0 && <p className={styles.subtitle}>{adBlocking ? t('stats_noActivityAdsAndTrackers') : t('stats_noActivity')}</p>}
64-
{recent > 0 && <p className={cn(styles.subtitle, styles.uppercase)}>{t('stats_feedCountBlockedPeriod')}</p>}
63+
{recent === 0 && (
64+
<p className={cn(styles.subtitle, { [styles.indented]: !adBlocking })}>
65+
{adBlocking ? t('stats_noActivityAdsAndTrackers') : t('stats_noActivity')}
66+
</p>
67+
)}
68+
{recent > 0 && (
69+
<p className={cn(styles.subtitle, styles.indented, { [styles.uppercase]: !adBlocking })}>
70+
{t('stats_feedCountBlockedPeriod')}
71+
</p>
72+
)}
6573
</div>
6674
);
6775
}

0 commit comments

Comments
 (0)