Skip to content

Commit a13900f

Browse files
committed
minor #1718 [Site] Fix icons search mobile (smnandre)
This PR was merged into the 2.x branch. Discussion ---------- [Site] Fix icons search mobile Last fix for #1711 <img width="469" alt="Capture d’écran 2024-04-11 à 00 57 14" src="https://github.com/symfony/ux/assets/1359581/153ecb4f-26ac-4a7b-889f-699972a9144b"> Commits ------- 53977ae [Site] Fix icons search mobile
2 parents df23830 + 53977ae commit a13900f

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

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

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
// -----------------------------------------------------------------
44

55
.IconSearch {
6-
76
}
8-
97
.AppHeader.open + main .IconSearchBox {
108
position: unset;
119
}
@@ -25,10 +23,41 @@
2523

2624
.IconSearch__Input {
2725
border: var(--bs-border-width) solid var(--bs-border-color);
28-
26+
border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0 !important;
2927
&:focus {
3028
border-color: var(--bs-primary);
3129
box-shadow: none;
3230
outline: revert;
3331
}
3432
}
33+
34+
.IconSearch__Iconify {
35+
position: absolute;
36+
right: .75rem;
37+
font-size: .7rem;
38+
font-stretch: semi-condensed;
39+
opacity: .5;
40+
margin: 0;
41+
top: 50%;
42+
transform: translateY(-50%);
43+
}
44+
45+
@media screen and (max-width: 768px) {
46+
.IconSearchBox fieldset {
47+
display: flex;
48+
flex-wrap: wrap;
49+
}
50+
.IconSearchBox .input-group {
51+
max-width: none !important;
52+
}
53+
.IconSearch__Display {
54+
display: none !important;
55+
}
56+
.IconSearch__Query {
57+
order: 2;
58+
}
59+
.IconSearch__Iconify {
60+
top: 125%;
61+
font-size: xx-small;
62+
}
63+
}

ux.symfony.com/templates/components/Icon/IconSearch.html.twig

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,12 @@
3333
class="form-control IconSearch__Input"
3434
id="IconSearch-Query"
3535
>
36-
<p style="
37-
position: absolute;
38-
right: .75rem;
39-
font-size: .7rem;
40-
font-stretch: semi-condensed;
41-
opacity: .5;
42-
margin: 0;
43-
top: 50%;
44-
transform: translateY(-50%);
45-
">Powered by <a href="https://iconify.design/">iconify<span>.</span>design</a></p>
36+
<p class="IconSearch__Iconify">
37+
Powered by <a href="https://iconify.design/">iconify<span>.</span>design</a>
38+
</p>
4639
</div>
4740

48-
<div class="d-flex flex-shrink-0">
41+
<div class="d-flex flex-shrink-0 IconSearch__Display">
4942
<div class="btn-group" role="group" data-controller="icon-size">
5043
<button class="btn" data-action="icon-size#small">
5144
<twig:Icon name="grid-small"/>

0 commit comments

Comments
 (0)