Skip to content

Commit 550a683

Browse files
committed
bug #2893 [Site] Improve Package header on mobile (maxperei)
This PR was merged into the 2.x branch. Discussion ---------- [Site] Improve Package header on mobile | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | no | Issues | Fix #2848 | License | MIT as mentionned in issue above "buttons should not be kept on the same line on mobile", so this is an arbitrary proposal to display them properly, hope this will match with expectations _e.g._ ![image](https://github.com/user-attachments/assets/81ac237f-81fb-430e-a309-63bcf752a3e0) Commits ------- 483db99 [Site] Improve Package header on mobile
2 parents 1236188 + 483db99 commit 550a683

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

ux.symfony.com/assets/styles/components/_DocsLink.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
opacity: 1;
2222
padding: var(--space-small, .75rem) var(--space-large, 1.5rem);
2323
transform: translateY(50%);
24+
transition-property: transform;
25+
transition-duration: 0ms;
2426

2527
p {
2628
margin-bottom: 0;
@@ -33,6 +35,14 @@
3335
&:hover {
3436
transform: translateY(50%);
3537
}
38+
39+
@media screen and (max-width: 768px) {
40+
transform: translateY(0);
41+
42+
&:hover {
43+
transform: translateY(0);
44+
}
45+
}
3646
}
3747
}
3848
.DocsLink_content {

ux.symfony.com/assets/styles/components/_TerminalCommand.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
font-size: .9rem;
4242
padding: 0 .5rem;
4343
width: inherit;
44-
overflow: clip;
44+
overflow: scroll;
4545
margin: 0;
4646
}
4747

@@ -57,5 +57,3 @@
5757
opacity: 1;
5858
}
5959
}
60-
61-

ux.symfony.com/templates/components/Package/PackageHeader.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</p>
1313
</div>
1414

15-
<div class="d-flex justify-content-center">
15+
<div class="d-flex justify-content-center flex-column-reverse flex-md-row">
1616
{% if command is not defined or command %}
1717
<twig:TerminalCommand
1818
aria-label="Composer command to install {{ package.humanName }}"
@@ -22,7 +22,7 @@
2222
{% endif %}
2323

2424
<twig:DocsLink
25-
class="ms-3"
25+
class="ms-md-3 align-self-center"
2626
size="sm"
2727
title="Read the docs"
2828
url="{{ package.officialDocsUrl }}"

0 commit comments

Comments
 (0)