framework/less/common/Search.less

108 lines
1.8 KiB
Plaintext

.Search {
position: relative;
// TODO v2.0 check if this is supported by Firefox,
// if so, consider switching to it.
::-webkit-search-cancel-button {
display: none;
}
&-clear {
// It looks very weird due to the padding given to the button..
&:focus {
outline: none;
}
// ...so we display the ring around the icon inside the button, with an offset
.add-keyboard-focus-ring-nearby("> *");
.add-keyboard-focus-ring-nearby-offset("> *", 4px);
}
}
@media @tablet-up {
.Search {
transition: margin-left 0.4s;
&.focused {
margin-left: -400px;
input,
.Search-results {
width: 400px;
}
}
}
}
.Search-results {
overflow: auto;
left: auto;
right: 0;
@media @phone {
left: 0;
}
> li > a {
white-space: normal;
}
mark {
background: none;
padding: 0;
font-weight: bold;
color: inherit;
box-shadow: none;
}
}
.Search-input {
overflow: hidden;
color: var(--muted-color);
&:before {
.fa();
content: @fa-var-search;
float: left;
margin-right: -36px;
width: 36px;
font-size: 14px;
text-align: center;
position: relative;
padding: 8px 0;
line-height: 1.5;
pointer-events: none;
}
input {
float: left;
width: 225px;
padding-left: 32px;
padding-right: 32px;
transition: var(--transition), width 0.4s;
box-sizing: inherit !important;
}
.LoadingIndicator-container {
height: 36px;
}
.Button {
float: left;
margin-left: -36px;
width: 36px !important;
&.LoadingIndicator {
width: var(--size) !important;
padding: 0;
}
}
}
.DiscussionSearchResult-excerpt {
margin-top: 3px;
color: var(--muted-color);
font-size: 11px;
}
.UserSearchResult .Avatar {
.Avatar--size(24px);
margin: -2px 10px -2px 0;
}