Skip to content

Commit b4a661f

Browse files
Merge pull request #1023 from plausible/calc-fix
mobile view fix
2 parents 61c7757 + 20a9a17 commit b4a661f

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

_articles/cookie-banner-traffic-loss-calculator.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,16 @@ Google Analytics cannot track what it has no permission to touch. The result is
1414

1515
Enter your reported monthly visitors and adjust the consent acceptance rate to match your audience:
1616

17+
<style>
18+
@media (max-width: 540px) {
19+
#cb-inputs-grid { grid-template-columns: 1fr !important; }
20+
#cb-results-grid { grid-template-columns: 1fr 1fr !important; }
21+
#cb-data-gap-card { grid-column: 1 / -1; }
22+
}
23+
</style>
24+
1725
<div style="margin: 1.5rem 0; padding: 1.5rem; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 0.5rem; font-size: 0.875rem; font-family: inherit;">
18-
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem;">
26+
<div id="cb-inputs-grid" style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem;">
1927
<div>
2028
<label for="cb-visitors" style="display: block; font-weight: 600; color: #374151; margin-bottom: 0.25rem;">Monthly visitors (as reported by GA)</label>
2129
<input type="text" id="cb-visitors" value="28,400" style="width: 100%; padding: 0.5rem 0.75rem; border: 1px solid #d1d5db; border-radius: 0.375rem; font-size: 0.875rem; font-family: inherit; box-sizing: border-box; outline: none;" />
@@ -43,7 +51,7 @@ Enter your reported monthly visitors and adjust the consent acceptance rate to m
4351
</div>
4452
</div>
4553

46-
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem;">
54+
<div id="cb-results-grid" style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; margin-bottom: 1rem;">
4755
<div style="padding: 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.375rem; text-align: center;">
4856
<div style="font-size: 0.75rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem;">True visitors/month</div>
4957
<div id="cb-true-visitors" style="font-size: 1.75rem; font-weight: 800; color: #111827; line-height: 1;"></div>
@@ -52,7 +60,7 @@ Enter your reported monthly visitors and adjust the consent acceptance rate to m
5260
<div style="font-size: 0.75rem; font-weight: 700; color: #dc2626; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem;">Invisible per month</div>
5361
<div id="cb-hidden-visitors" style="font-size: 1.75rem; font-weight: 800; color: #111827; line-height: 1;"></div>
5462
</div>
55-
<div style="padding: 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.375rem; text-align: center;">
63+
<div id="cb-data-gap-card" style="padding: 1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.375rem; text-align: center;">
5664
<div style="font-size: 0.75rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem;">Data gap</div>
5765
<div id="cb-hidden-percent" style="font-size: 1.75rem; font-weight: 800; color: #dc2626; line-height: 1;"></div>
5866
<div style="font-size: 0.75rem; color: #6b7280; margin-top: 0.25rem;">of traffic hidden</div>

0 commit comments

Comments
 (0)