Skip to content

Commit eff2552

Browse files
pxamikedmh
authored andcommitted
[BUGFIX] - search-button in main-navigation is hidden under search-box when language-menu-box is enabled. (#508)
- search-box in header-middle doesn't fit when social-icons are enabled.
1 parent 29a26e5 commit eff2552

File tree

4 files changed

+57
-44
lines changed

4 files changed

+57
-44
lines changed

Resources/Public/css/main.css

Lines changed: 15 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Resources/Public/less/main.less

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,7 @@
26542654
@media (min-width: @screen-sm-min) {
26552655
.header-middle__logo {
26562656
float: left;
2657-
width: 40%;
2657+
width: auto;
26582658
text-align: left;
26592659
}
26602660

@@ -3204,6 +3204,21 @@
32043204
// =================================
32053205
// Search
32063206

3207+
// .tx-solr-searchbox contains .main-navigation__search-btn and .main-navigation__search-box
3208+
// by setting it to relative position, the search-field can now float (responsive)
3209+
.header-top-wrp .tx-solr-searchbox,
3210+
.main-navigation .tx-solr-searchbox {
3211+
position: relative;
3212+
float: right;
3213+
}
3214+
3215+
@media (max-width: @screen-sm-max) {
3216+
// removes relative position to make header-top searchbox full width
3217+
.header-top-wrp .tx-solr-searchbox {
3218+
position: initial;
3219+
}
3220+
}
3221+
32073222
.main-navigation__search-btn-wrp {
32083223
display: none;
32093224
float: right;
@@ -3404,22 +3419,17 @@
34043419
.main-navigation__search-box {
34053420
position: relative;
34063421
height: @nav-height;
3407-
width: 100%;
3408-
top: 0;
3422+
width: 100vw;
3423+
bottom: 0;
34093424
left: auto;
34103425
right: 0;
34113426
z-index: 3000;
34123427
}
34133428

3414-
@media (min-width: @screen-sm-min) {
3415-
.main-navigation__search-box {
3416-
// width: 50%;
3417-
}
3418-
}
3419-
34203429
@media (min-width: @screen-md-min) {
3430+
// search-box in both header-top and main-navigation
34213431
.main-navigation__search-box {
3422-
width: 46%;
3432+
width: 450px;
34233433
position: absolute;
34243434
right: 60px;
34253435
opacity: 0;
@@ -3428,12 +3438,6 @@
34283438
}
34293439
}
34303440

3431-
@media (min-width: @screen-lg-min) {
3432-
.main-navigation__search-box {
3433-
width: 36%;
3434-
}
3435-
}
3436-
34373441
.main-navigation__search-box._search-box-visible {
34383442
opacity: 1;
34393443
visibility: visible;
@@ -7196,7 +7200,7 @@ div.awesomplete li[aria-selected="true"] mark {
71967200
@media (min-width: @screen-sm-min) {
71977201
.header-middle__social-icon .social-icons {
71987202
float: right;
7199-
width: 60%;
7203+
width: auto;
72007204
text-align: right;
72017205
padding: 0 10px 0 0;
72027206
height: @header-middle-height;

felayout_t3kit/dev/styles/main/contentElements/socialIcons.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
@media (min-width: @screen-sm-min) {
7979
.header-middle__social-icon .social-icons {
8080
float: right;
81-
width: 60%;
81+
width: auto;
8282
text-align: right;
8383
padding: 0 10px 0 0;
8484
height: @header-middle-height;

felayout_t3kit/dev/styles/main/header/header.less

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@
356356
@media (min-width: @screen-sm-min) {
357357
.header-middle__logo {
358358
float: left;
359-
width: 40%;
359+
width: auto;
360360
text-align: left;
361361
}
362362

@@ -906,6 +906,21 @@
906906
// =================================
907907
// Search
908908

909+
// .tx-solr-searchbox contains .main-navigation__search-btn and .main-navigation__search-box
910+
// by setting it to relative position, the search-field can now float (responsive)
911+
.header-top-wrp .tx-solr-searchbox,
912+
.main-navigation .tx-solr-searchbox {
913+
position: relative;
914+
float: right;
915+
}
916+
917+
@media (max-width: @screen-sm-max) {
918+
// removes relative position to make header-top searchbox full width
919+
.header-top-wrp .tx-solr-searchbox {
920+
position: initial;
921+
}
922+
}
923+
909924
.main-navigation__search-btn-wrp {
910925
display: none;
911926
float: right;
@@ -1106,22 +1121,17 @@
11061121
.main-navigation__search-box {
11071122
position: relative;
11081123
height: @nav-height;
1109-
width: 100%;
1110-
top: 0;
1124+
width: 100vw;
1125+
bottom: 0;
11111126
left: auto;
11121127
right: 0;
11131128
z-index: 3000;
11141129
}
11151130

1116-
@media (min-width: @screen-sm-min) {
1117-
.main-navigation__search-box {
1118-
// width: 50%;
1119-
}
1120-
}
1121-
11221131
@media (min-width: @screen-md-min) {
1132+
// search-box in both header-top and main-navigation
11231133
.main-navigation__search-box {
1124-
width: 46%;
1134+
width: 450px;
11251135
position: absolute;
11261136
right: 60px;
11271137
opacity: 0;
@@ -1130,12 +1140,6 @@
11301140
}
11311141
}
11321142

1133-
@media (min-width: @screen-lg-min) {
1134-
.main-navigation__search-box {
1135-
width: 36%;
1136-
}
1137-
}
1138-
11391143
.main-navigation__search-box._search-box-visible {
11401144
opacity: 1;
11411145
visibility: visible;

0 commit comments

Comments
 (0)