Skip to content

Commit e1aa983

Browse files
committed
CSS changes to support max count
1 parent b2fd80b commit e1aa983

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,24 @@
6565

6666
.counterContainer {
6767
display: flex;
68-
gap: 24px;
68+
gap: 12px;
6969
}
7070

7171
.counter {
7272
display: flex;
7373
flex-direction: column;
7474
gap: 4px;
75-
padding-right: 38px;
75+
width: 196px;
76+
padding-right: 18px;
77+
box-sizing: content-box;
78+
79+
&:last-child {
80+
padding-right: 0;
81+
}
82+
}
83+
84+
.cookiePopUpsCounter {
85+
margin-left: 14px;
7686
}
7787

7888
.title {
@@ -89,6 +99,8 @@
8999
line-height: 20px;
90100
padding-bottom: 4px;
91101
padding-top: 12px;
102+
word-wrap: break-word;
103+
overflow-wrap: break-word;
92104
}
93105
}
94106

special-pages/pages/new-tab/app/protections/components/ProtectionsHeading.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export function ProtectionsHeading({
111111
enabled AND both `animatedTrackersBlocked` and
112112
`totalCookiePopUpsBlocked` are at least 1 */}
113113
{isCpmEnabled && animatedTrackersBlocked > 0 && totalCookiePopUpsBlocked > 0 && (
114-
<div class={styles.counter}>
114+
<div class={cn(styles.counter, styles.cookiePopUpsCounter)}>
115115
<h3 class={styles.title}>
116116
{formatter.format(animatedCookiePopUpsBlocked)} <span>{cookiePopUpsBlockedHeading}</span>
117117
</h3>

special-pages/pages/new-tab/app/protections/mocks/protections.mock-transport.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ export function protectionsMockTransport() {
103103
dataset.totalCookiePopUpsBlocked = AnimationConstants.MAX_DISPLAY_COUNT;
104104
}
105105

106+
if (url.searchParams.get('cpm') === 'max') {
107+
dataset.totalCount = AnimationConstants.MAX_DISPLAY_COUNT;
108+
dataset.totalCookiePopUpsBlocked = AnimationConstants.MAX_DISPLAY_COUNT;
109+
}
110+
106111
// CPM = 0 state
107112
if (url.searchParams.get('cpm') === 'none') {
108113
dataset.totalCookiePopUpsBlocked = 0;

0 commit comments

Comments
 (0)