Skip to content

Commit 2cad841

Browse files
committed
Coveo: Refactored CSS code
1 parent 8ebcbb4 commit 2cad841

File tree

1 file changed

+69
-72
lines changed

1 file changed

+69
-72
lines changed

assets/css/v2/style.css

Lines changed: 69 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,9 @@ main {
950950

951951
/* MARK: Coveo
952952
*/
953-
#search-v2 {
953+
954+
/* Search results on content */
955+
atomic-search-interface#search-v2 {
954956
display: inline-block !important;
955957
width: 95vw;
956958
grid-column: 1 / -1;
@@ -965,94 +967,89 @@ main {
965967
atomic-search-box {
966968
z-index: 0;
967969
}
968-
}
969970

970-
atomic-search-interface {
971-
height: fit-content;
972-
}
971+
atomic-search-layout {
972+
grid-template-areas:
973+
"atomic-section-search"
974+
"atomic-section-status"
975+
"atomic-section-facets"
976+
"atomic-section-main";
973977

974-
.header-search-box {
975-
&::part(wrapper) {
976-
border-radius: 0;
977-
border-color: oklch(var(--color-foreground));
978-
}
978+
grid-template-columns: minmax(50%, 100%) !important;
979979

980-
&::part(suggestions-wrapper) {
981-
border-radius: 0;
982-
border-color: oklch(var(--color-foreground));
983-
width: calc(100% + 2px);
984-
margin-inline-start: -1px;
985-
}
980+
@media (min-width: 1024px) {
981+
grid-template-areas:
982+
"atomic-section-search atomic-section-status"
983+
"atomic-section-facets atomic-section-main "
984+
"atomic-section-facets . " !important;
986985

987-
&::part(submit-button-wrapper) {
988-
--atomic-primary: var(--atomic-neutral-dark);
989-
}
990-
}
986+
grid-template-columns: minmax(17rem, 24rem) minmax(50%, 100%) !important;
987+
column-gap: calc(1.5rem + 2rem) !important;
988+
}
991989

992-
atomic-refine-toggle {
993-
display: none;
994-
}
990+
atomic-layout-section[section="status"] {
991+
/* Override Coveo's width to be full */
992+
margin: var(--atomic-layout-spacing-y) 0;
993+
max-width: 100%;
994+
display: block;
995+
width: 100%;
995996

996-
@media (max-width: 1024px) {
997-
atomic-refine-toggle {
998-
display: block;
999-
}
1000-
}
997+
.atomic-full-summary-and-sort {
998+
display: flex;
999+
flex-direction: column;
1000+
align-items: start;
1001+
gap: 1rem;
1002+
justify-content: space-between;
10011003

1002-
atomic-query-summary {
1003-
/* Show duration */
1004-
&::part(duration) {
1005-
display: inline-block !important;
1006-
}
1007-
}
1004+
@media (min-width: 480px) {
1005+
flex-direction: row;
1006+
align-items: center;
1007+
}
10081008

1009-
atomic-search-layout {
1010-
grid-template-areas:
1011-
"atomic-section-search"
1012-
"atomic-section-status"
1013-
"atomic-section-facets"
1014-
"atomic-section-main";
1009+
atomic-query-summary {
1010+
&::part(duration) {
1011+
display: inline-block !important;
1012+
}
1013+
}
10151014

1016-
grid-template-columns: minmax(50%, 100%) !important;
1015+
atomic-refine-toggle {
1016+
display: none;
10171017

1018-
@media (min-width: 1024px) {
1019-
grid-template-areas:
1020-
"atomic-section-search atomic-section-status"
1021-
"atomic-section-facets atomic-section-main "
1022-
"atomic-section-facets . " !important;
1018+
@media (max-width: 1024px) {
1019+
display: block;
1020+
}
1021+
}
1022+
}
1023+
}
10231024

1024-
grid-template-columns: minmax(17rem, 24rem) minmax(50%, 100%) !important;
1025-
column-gap: calc(1.5rem + 2rem) !important;
1025+
atomic-layout-section[section="search"] {
1026+
/* Override Coveo's width to be full */
1027+
width: 100% !important;
1028+
max-width: 100% !important;
1029+
}
10261030
}
10271031
}
10281032

1029-
atomic-search-layout atomic-layout-section[section="status"] {
1030-
/* Override Coveo's width to be full */
1031-
max-width: 100%;
1032-
display: block;
1033-
width: 100%;
1034-
}
1035-
1036-
atomic-search-layout atomic-layout-section[section="search"] {
1037-
/* Override Coveo's width to be full */
1038-
width: 100% !important;
1039-
max-width: 100% !important;
1040-
}
1033+
/* Search bar on header */
1034+
atomic-search-interface#search-standalone-header {
1035+
height: fit-content;
10411036

1042-
.atomic-full-summary-and-sort {
1043-
display: flex;
1044-
flex-direction: column;
1045-
align-items: start;
1046-
gap: 1rem;
1047-
justify-content: space-between;
1037+
.header-search-box {
1038+
&::part(wrapper) {
1039+
border-radius: 0;
1040+
border-color: oklch(var(--color-foreground));
1041+
}
10481042

1049-
@media (min-width: 480px) {
1050-
flex-direction: row;
1051-
align-items: center;
1052-
}
1043+
&::part(suggestions-wrapper) {
1044+
border-radius: 0;
1045+
border-color: oklch(var(--color-foreground));
1046+
width: calc(100% + 2px);
1047+
margin-inline-start: -1px;
1048+
}
10531049

1054-
atomic-sort-dropdown::part(label) {
1055-
margin-inline-start: 0;
1050+
&::part(submit-button-wrapper) {
1051+
--atomic-primary: var(--atomic-neutral-dark);
1052+
}
10561053
}
10571054
}
10581055

0 commit comments

Comments
 (0)