2020-06-07 19:54:42 +00:00
|
|
|
//
|
|
|
|
// Citizen - Search styles
|
|
|
|
// https://starcitizen.tools
|
|
|
|
//
|
|
|
|
|
|
|
|
@import '../variables.less';
|
|
|
|
@import '../mixins.less';
|
|
|
|
|
|
|
|
#typeahead-suggestions {
|
|
|
|
position: absolute;
|
2020-06-09 02:45:25 +00:00
|
|
|
top: 38px;
|
2020-06-09 02:36:45 +00:00
|
|
|
z-index: 90;
|
2020-06-07 19:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.suggestions-dropdown {
|
2020-06-08 23:12:03 +00:00
|
|
|
width: @search-bar-width;
|
2020-06-07 19:54:42 +00:00
|
|
|
max-width: calc( ~'100vw -'@icon-box-size + @icon-padding * 2 + @margin-side );
|
2020-06-08 05:13:24 +00:00
|
|
|
display: flex; // Needed to show margin
|
2020-06-08 05:14:17 +00:00
|
|
|
flex-direction: column;
|
2020-06-08 05:13:24 +00:00
|
|
|
background: @base-100;
|
2020-06-08 20:26:51 +00:00
|
|
|
border-radius: 0 0 @border-radius-large @border-radius-large;
|
2020-06-08 05:13:24 +00:00
|
|
|
.boxshadow(4);
|
2020-06-07 19:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.suggestion {
|
|
|
|
&-link {
|
2020-06-08 05:13:24 +00:00
|
|
|
padding: 8px 20px;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2020-06-07 19:54:42 +00:00
|
|
|
|
|
|
|
&.active {
|
|
|
|
background-color: @accent-90;
|
|
|
|
|
|
|
|
.suggestion-title {
|
|
|
|
color: @accent-50;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
&-text {
|
2020-06-08 05:22:33 +00:00
|
|
|
margin-left: 15px;
|
2020-06-08 05:13:24 +00:00
|
|
|
}
|
|
|
|
|
2020-06-07 19:54:42 +00:00
|
|
|
&-title {
|
|
|
|
margin: 0 0 0.78rem * @content-scaling 0;
|
2020-06-08 05:22:33 +00:00
|
|
|
display: inline-block; // so that the margin does not occupy space
|
2020-06-07 21:44:42 +00:00
|
|
|
color: @base-10;
|
2020-06-07 22:34:12 +00:00
|
|
|
font-size: @content-h6-size;
|
2020-06-07 19:54:42 +00:00
|
|
|
line-height: 1.872rem * @content-scaling;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-highlight {
|
2020-06-07 21:44:42 +00:00
|
|
|
color: @base-30;
|
2020-06-07 19:54:42 +00:00
|
|
|
font-style: normal;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-description {
|
|
|
|
color: @base-30;
|
|
|
|
margin: 0;
|
|
|
|
font-family: @fonts;
|
2020-06-07 22:34:12 +00:00
|
|
|
font-size: @content-caption-size;
|
2020-06-07 19:54:42 +00:00
|
|
|
line-height: 1.43rem * @content-scaling;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-thumbnail {
|
2020-06-08 05:13:24 +00:00
|
|
|
width: 70px;
|
2020-06-08 05:22:33 +00:00
|
|
|
min-width: 70px; // so it won't be squeezed by the content text
|
2020-06-08 05:13:24 +00:00
|
|
|
height: 60px;
|
2020-06-08 20:51:48 +00:00
|
|
|
border-radius: @border-radius-small;
|
2020-06-07 19:54:42 +00:00
|
|
|
background-color: @base-80;
|
|
|
|
background-position: center center;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-size: cover;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
#suggestion {
|
|
|
|
&-link {
|
|
|
|
&-first {
|
|
|
|
margin-top: 8px;
|
|
|
|
}
|
2020-06-08 04:27:25 +00:00
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
&-last {
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
2020-06-08 04:27:25 +00:00
|
|
|
}
|
2020-06-08 05:14:17 +00:00
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
&-special {
|
|
|
|
padding: 1rem;
|
|
|
|
border-top: 1px solid @base-80;
|
2020-06-08 20:26:51 +00:00
|
|
|
border-radius: 0 0 @border-radius-large @border-radius-large;
|
2020-06-08 05:13:24 +00:00
|
|
|
display: flex;
|
|
|
|
color: @base-10;
|
|
|
|
align-items: center;
|
2020-06-07 22:34:12 +00:00
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
&-icon {
|
|
|
|
margin: 0 14px 0 10px;
|
|
|
|
width: 20px;
|
2020-06-09 01:00:27 +00:00
|
|
|
min-width: 20px;
|
2020-06-08 05:13:24 +00:00
|
|
|
height: 20px;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
}
|
2020-06-07 22:34:12 +00:00
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
&-text {
|
|
|
|
padding: 5px 0; // make it looks more center aligned
|
|
|
|
font-size: @content-caption-size;
|
|
|
|
font-family: @fonts;
|
|
|
|
font-weight: bold;
|
2020-06-09 01:00:27 +00:00
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis; // handle overflow
|
2020-06-08 05:13:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: @accent-90;
|
|
|
|
}
|
2020-06-07 22:34:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-07 19:54:42 +00:00
|
|
|
/* using element selector to override default anchor styles */
|
|
|
|
a.suggestion-link:hover {
|
|
|
|
text-decoration: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
// RTL tweaks
|
|
|
|
.rtl {
|
|
|
|
#searchform {
|
|
|
|
left: @icon-box-size + @margin-side + @icon-padding;
|
|
|
|
right: unset;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-08 23:12:03 +00:00
|
|
|
@media only screen and ( max-width: @search-bar-width ) {
|
2020-06-07 19:54:42 +00:00
|
|
|
.suggestions-dropdown {
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
max-width: 100vw;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@media ( prefers-color-scheme: dark ) {
|
|
|
|
.suggestions-dropdown {
|
|
|
|
background: @dark-bg-50;
|
|
|
|
}
|
|
|
|
|
|
|
|
.suggestion {
|
|
|
|
&-link {
|
|
|
|
&.active {
|
|
|
|
background-color: @accent-10;
|
|
|
|
|
|
|
|
.suggestion-title {
|
|
|
|
color: @accent-90;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-title {
|
2020-06-07 21:44:42 +00:00
|
|
|
color: @dark-text-90;
|
2020-06-07 19:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-highlight {
|
2020-06-07 21:44:42 +00:00
|
|
|
color: @dark-text-70;
|
2020-06-07 19:54:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
&-description {
|
2020-06-07 21:44:42 +00:00
|
|
|
color: @dark-text-70;
|
2020-06-07 19:54:42 +00:00
|
|
|
}
|
|
|
|
}
|
2020-06-07 22:34:12 +00:00
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
#suggestion {
|
|
|
|
&-special {
|
|
|
|
border-color: @dark-bg-40;
|
|
|
|
color: @dark-text-90;
|
2020-06-07 22:34:12 +00:00
|
|
|
|
2020-06-08 05:13:24 +00:00
|
|
|
&:hover {
|
|
|
|
background-color: @accent-10;
|
|
|
|
}
|
2020-06-07 22:34:12 +00:00
|
|
|
}
|
|
|
|
}
|
2020-06-07 19:54:42 +00:00
|
|
|
}
|