Skip to content

Commit 1dd9a0b

Browse files
Polish share button alignment
1 parent 9ee20d3 commit 1dd9a0b

2 files changed

Lines changed: 19 additions & 2 deletions

File tree

assets/share-page.css

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ h1 {
630630
padding: 0 16px;
631631
overflow: hidden;
632632
border: 1.25px solid var(--line-strong);
633-
border-radius: 10px;
633+
border-radius: 999px;
634634
display: inline-flex;
635635
align-items: center;
636636
justify-content: center;
@@ -669,13 +669,18 @@ h1 {
669669
}
670670

671671
.button.primary {
672-
justify-content: space-between;
672+
justify-content: center;
673673
border-color: var(--black);
674674
background: var(--black);
675675
color: var(--white);
676676
box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
677677
}
678678

679+
.button.primary > [aria-hidden="true"] {
680+
position: absolute;
681+
right: 18px;
682+
}
683+
679684
.button.secondary {
680685
background: rgba(255, 255, 255, 0.86);
681686
color: var(--ink);
@@ -892,6 +897,14 @@ h1 {
892897
gap: 8px;
893898
}
894899

900+
.modal-actions .button {
901+
width: 100%;
902+
min-width: 0;
903+
padding-right: 14px;
904+
padding-left: 14px;
905+
text-align: center;
906+
}
907+
895908
.toast {
896909
position: fixed;
897910
left: 50%;

tests/share-page.test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ test('mobile share layout keeps one compact content flow with the primary action
111111
assert.match(css, /\.site-footer\s*\{\s*display:\s*none;/);
112112
assert.match(css, /\.language-toggle::before/);
113113
assert.match(css, /background-size:\s*64px 64px/);
114+
assert.match(css, /\.button\s*\{[\s\S]*?border-radius:\s*999px/);
115+
assert.match(css, /\.button\.primary\s*\{[\s\S]*?justify-content:\s*center/);
116+
assert.doesNotMatch(css, /\.button\.primary\s*\{[\s\S]*?justify-content:\s*space-between/);
117+
assert.match(css, /\.modal-actions \.button\s*\{[\s\S]*?text-align:\s*center/);
114118
});
115119

116120
test('404 fallback and controller cooperate to restore a clean path', () => {

0 commit comments

Comments
 (0)