Skip to content

Commit 72c7e5e

Browse files
authored
Merge pull request #21 from OpenHub-Store/style/mobile-polish
2 parents 3814c5e + b69d97b commit 72c7e5e

1 file changed

Lines changed: 113 additions & 15 deletions

File tree

assets/css/site.css

Lines changed: 113 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -265,17 +265,22 @@ body::before {
265265
align-items: center;
266266
justify-content: center;
267267
gap: 10px;
268-
border: none;
268+
height: 48px;
269+
padding: 0 24px;
270+
border: 1.5px solid transparent;
269271
cursor: pointer;
270272
font-family: inherit;
271273
font-weight: 600;
272274
font-size: 0.9375rem;
273275
letter-spacing: 0.01em;
276+
line-height: 1;
274277
text-decoration: none;
278+
white-space: nowrap;
275279
border-radius: var(--shape-full);
276280
position: relative;
277281
overflow: hidden;
278-
transition: all 300ms var(--motion-standard);
282+
transition: background-color 200ms var(--motion-standard), border-color 200ms var(--motion-standard), box-shadow 200ms var(--motion-standard), transform 200ms var(--motion-standard);
283+
box-sizing: border-box;
279284
}
280285

281286
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
@@ -287,38 +292,42 @@ body::before {
287292
border-radius: inherit;
288293
opacity: 0;
289294
transition: opacity 200ms;
295+
pointer-events: none;
290296
}
291297
.btn:hover::before { opacity: 1; }
292298

293-
.btn--filled {
299+
.btn--lg {
294300
height: 56px;
295-
padding: 0 36px;
301+
padding: 0 32px;
302+
font-size: 1rem;
303+
}
304+
305+
.btn--lg svg { width: 22px; height: 22px; }
306+
307+
.btn--filled {
296308
background: var(--md-primary);
297309
color: var(--md-on-primary);
310+
border-color: var(--md-primary);
298311
box-shadow: var(--elevation-2);
299312
}
300313

301314
.btn--filled:hover { box-shadow: var(--elevation-3); transform: translateY(-2px); }
302315
.btn--filled:active { transform: translateY(0); }
303316
.btn--filled::before { background: rgba(255,255,255,0.1); }
304-
.btn--filled svg { width: 22px; height: 22px; }
305317

306318
.btn--tonal {
307-
height: 48px;
308-
padding: 0 28px;
309319
background: var(--md-secondary-container);
310320
color: var(--md-on-secondary-container);
321+
border-color: var(--md-secondary-container);
311322
}
312323

313324
.btn--tonal:hover { box-shadow: var(--elevation-1); transform: translateY(-1px); }
314325
.btn--tonal::before { background: color-mix(in srgb, var(--md-on-secondary-container) 8%, transparent); }
315326

316327
.btn--outlined {
317-
height: 48px;
318-
padding: 0 28px;
319328
background: transparent;
320329
color: var(--md-primary);
321-
border: 1.5px solid var(--md-outline);
330+
border-color: var(--md-outline);
322331
}
323332

324333
.btn--outlined:hover {
@@ -2703,19 +2712,23 @@ body.has-announce {
27032712
gap: 10px;
27042713
margin-bottom: 12px;
27052714
flex-wrap: wrap;
2715+
align-items: stretch;
27062716
}
27072717

27082718
.newsletter__field input[type="email"] {
27092719
flex: 1 1 240px;
27102720
min-width: 0;
2711-
padding: 12px 16px;
2712-
font-size: 0.9375rem;
2721+
height: 48px;
2722+
padding: 0 18px;
2723+
font-size: 16px;
27132724
font-family: inherit;
2725+
line-height: 1;
27142726
color: var(--md-on-surface);
27152727
background: var(--md-surface-container-lowest);
2716-
border: 1px solid var(--md-outline);
2728+
border: 1.5px solid var(--md-outline);
27172729
border-radius: var(--shape-full);
27182730
outline: none;
2731+
box-sizing: border-box;
27192732
transition: border-color 200ms var(--motion-standard), box-shadow 200ms var(--motion-standard);
27202733
}
27212734

@@ -2730,15 +2743,19 @@ body.has-announce {
27302743
}
27312744

27322745
.newsletter__field button {
2733-
padding: 12px 24px;
2746+
height: 48px;
2747+
padding: 0 26px;
27342748
font-size: 0.9375rem;
27352749
font-weight: 600;
27362750
font-family: inherit;
2751+
line-height: 1;
2752+
white-space: nowrap;
27372753
color: var(--md-on-primary);
27382754
background: var(--md-primary);
2739-
border: 1px solid var(--md-primary);
2755+
border: 1.5px solid var(--md-primary);
27402756
border-radius: var(--shape-full);
27412757
cursor: pointer;
2758+
box-sizing: border-box;
27422759
transition: background-color 200ms var(--motion-standard), transform 100ms var(--motion-standard);
27432760
}
27442761

@@ -2776,5 +2793,86 @@ body.has-announce {
27762793
.newsletter { padding: 26px 22px; }
27772794
.newsletter-section { padding: 48px 16px; }
27782795
.newsletter__field { flex-direction: column; gap: 12px; }
2796+
.newsletter__field input[type="email"],
27792797
.newsletter__field button { width: 100%; }
27802798
}
2799+
2800+
/* ══════════════════════════════════════════════════════════════
2801+
GLOBAL MOBILE POLISH — overflow protection, tap targets
2802+
══════════════════════════════════════════════════════════════ */
2803+
2804+
/* Wrap long text safely; prevent horizontal overflow from URLs, hashes, etc. */
2805+
h1, h2, h3, h4, h5, h6, p, li, dt, dd, summary, figcaption, blockquote {
2806+
overflow-wrap: break-word;
2807+
word-wrap: break-word;
2808+
}
2809+
2810+
/* Inline code can be long (commit hashes, package names) — let them break */
2811+
:not(pre) > code {
2812+
overflow-wrap: anywhere;
2813+
}
2814+
2815+
/* Forms: block iOS zoom-on-focus, force base font-size 16px */
2816+
input[type="email"],
2817+
input[type="text"],
2818+
input[type="search"],
2819+
textarea,
2820+
select {
2821+
font-size: 16px;
2822+
}
2823+
2824+
/* Tap target floor (WCAG 2.5.5) */
2825+
.btn, .icon-btn, .newsletter__field input, .newsletter__field button {
2826+
min-height: 44px;
2827+
}
2828+
2829+
@media (max-width: 640px) {
2830+
/* Hero CTAs already stack on mobile via index.html-specific rules.
2831+
Make every page's page-hero actions stack the same way. */
2832+
.page-hero__actions {
2833+
flex-direction: column;
2834+
align-items: stretch;
2835+
width: 100%;
2836+
}
2837+
.page-hero__actions .btn {
2838+
width: 100%;
2839+
max-width: 360px;
2840+
justify-content: center;
2841+
}
2842+
2843+
/* CTA section on homepage — same stacking */
2844+
.cta__buttons {
2845+
flex-direction: column;
2846+
align-items: stretch;
2847+
width: 100%;
2848+
}
2849+
.cta__buttons .btn {
2850+
width: 100%;
2851+
max-width: 360px;
2852+
margin: 0 auto;
2853+
justify-content: center;
2854+
}
2855+
2856+
/* Sponsor rail buttons full width */
2857+
.sponsor-rail .btn { width: 100%; }
2858+
2859+
/* Press contact buttons full width */
2860+
.press-contact .btn { width: 100%; max-width: 360px; }
2861+
2862+
/* Page-hero subtitle wrapping safety */
2863+
.page-hero__subtitle { font-size: 1rem; line-height: 1.6; }
2864+
2865+
/* Footer: wrap link list cleanly */
2866+
.footer__links {
2867+
flex-wrap: wrap;
2868+
justify-content: center;
2869+
gap: 12px 18px;
2870+
}
2871+
2872+
/* News list time + title alignment */
2873+
.news-list__item time { display: block; margin-bottom: 4px; }
2874+
2875+
/* FAQ chev icon doesn't squish title */
2876+
.faq__item summary { gap: 12px; }
2877+
.faq__item summary h3 { flex: 1 1 auto; min-width: 0; }
2878+
}

0 commit comments

Comments
 (0)