discourse/app/assets/stylesheets/common/base/search.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

392 lines
7.1 KiB
SCSS
Raw Normal View History

@mixin search-page-spacing {
padding: 2rem 10%;
@include breakpoint(medium) {
padding: 1rem;
}
}
.search-highlight {
font-weight: bold;
}
.search-container {
.search-header {
@include search-page-spacing();
background: var(--primary-very-low);
}
.warning {
background-color: var(--danger-medium);
padding: 5px 8px;
color: var(--secondary);
}
.search-page-heading {
font-size: var(--font-up-3);
// spans can be in different orders depending of locale
span + span {
margin-left: 0.25em;
}
span.term {
background: var(--tertiary-low);
}
}
.search-bar {
display: flex;
justify-content: space-between;
align-items: stretch;
background: var(--primary-very-low);
input.search-query {
flex: 1 0 60%;
margin: 0 1em 0 0;
}
.select-kit {
margin-right: 1em;
flex: 1 0 20%;
}
@include breakpoint(mobile-extra-large) {
flex-direction: column;
input.search-query,
.select-kit {
margin-right: 0;
margin-bottom: 0.5em;
}
}
}
.search-advanced {
position: relative;
.search-actions,
.search-title,
.search-bar {
margin-bottom: 1em;
}
.search-results {
@include search-page-spacing();
}
.search-info {
display: flex;
@include search-page-spacing();
flex-wrap: wrap;
border-bottom: 1px solid var(--primary-low);
padding-top: 2em;
margin-bottom: 2em;
flex-direction: row;
align-items: flex-start;
justify-content: flex-start;
&.bulk-select-visible {
@include sticky;
top: 60px;
background-color: var(--secondary);
z-index: 10;
}
.sort-by {
margin-left: auto;
}
button {
margin: 0 0.5em 0.5em 0;
}
#bulk-select {
position: relative;
right: unset;
margin: 0;
padding: 0;
display: inline;
button {
margin-right: 0.5em;
}
}
}
}
.search-notice .fps-invalid {
padding: 0.5em;
background-color: var(--danger-low);
border: 1px solid var(--danger-medium);
color: var(--danger);
}
.search-context {
margin-top: 1em;
}
.user-items {
display: grid;
gap: 2em 1em;
grid: auto-flow / repeat(4, 1fr);
@include breakpoint(medium) {
grid: auto-flow / repeat(3, 1fr);
}
@include breakpoint(tablet) {
grid: auto-flow / 1fr 1fr;
}
@include breakpoint(mobile-large) {
grid: auto-flow / 1fr;
}
}
.search-filters {
background: var(--primary-very-low);
display: flex;
flex-direction: column;
details.advanced-filters,
details.search-advanced-additional-options {
margin-top: 1em;
> summary {
color: var(--tertiary);
cursor: pointer;
}
&[open] > summary {
color: var(--primary);
margin-bottom: 1em;
}
}
details.search-advanced-additional-options {
> summary {
font-size: var(--font-down-1);
}
}
.combo-box:not(#postTime),
.control-group,
.multi-select {
width: 100%;
min-width: 100%;
}
.search-advanced-filters {
background: var(--primary-very-low);
@include breakpoint(mobile-extra-large, min-width) {
.search-advanced-options {
column-count: 2;
column-gap: 2em;
.control-group {
break-inside: avoid;
}
}
}
@include breakpoint(medium, min-width) {
.search-advanced-options {
column-gap: 5em;
}
}
2018-07-13 04:38:51 +08:00
@include breakpoint(medium) {
.choices,
.select-kit.multi-select {
// overriding inline width from JS
width: 100% !important;
}
.select-kit {
min-width: unset;
}
}
.control-group {
margin-bottom: 1em;
}
.count-group {
input[type="number"] {
width: 8em;
}
.d-icon {
margin-left: 0.25em;
margin-right: 0.25em;
}
}
}
}
}
.fps-invalid {
margin-top: 1em;
margin-bottom: 1em;
}
.fps-result {
display: flex;
padding: 0 0.5em;
margin-bottom: 2em;
max-width: 100%;
word-break: break-word;
position: relative;
&.bulk-select-enabled {
padding-left: 3em;
}
.author {
display: inline-block;
vertical-align: top;
padding-top: 0.15em;
padding-left: 0.15em;
margin-right: 1em;
}
.topic {
padding-bottom: 0.25em;
max-width: 700px;
display: grid;
grid-template-areas:
"bulk-select title"
"meta meta";
grid-template-columns: auto 1fr;
align-items: baseline;
.bulk-select {
position: absolute;
left: 0px;
top: 0px;
padding: 0.5em;
background: var(--tertiary-very-low);
input[type="checkbox"] {
margin: 0;
}
}
.search-link {
grid-area: title;
}
.search-category {
grid-area: meta;
}
}
.search-category {
max-width: 100%;
display: flex;
flex-wrap: wrap;
margin-top: 0.25em;
.badge-wrapper {
max-width: 100%;
}
2015-07-27 17:28:10 +08:00
}
.discourse-tags {
flex-wrap: wrap;
display: inline-flex;
font-weight: normal;
.discourse-tag.simple {
font-size: $font-down-1;
margin-right: 0.25em;
}
}
.blurb {
font-size: $font-0;
line-height: $line-height-large;
color: var(--primary-medium);
.date {
color: var(--primary-high);
}
.search-highlight {
color: var(--primary-high);
}
}
.like-count {
display: block;
color: var(--primary-high);
margin-top: 0.25em;
.d-icon {
color: var(--love);
font-size: $font-down-1;
}
}
a.search-link:visited .topic-title {
color: var(--primary-medium);
}
.search-link {
.topic-title {
font-size: $font-up-1;
line-height: $line-height-medium;
color: var(--primary);
}
.topic-statuses {
display: inline-block;
font-size: 1.3em;
line-height: $line-height-medium;
color: var(--primary-medium);
span {
line-height: 1;
}
}
}
.discourse-tag.simple {
font-size: $font-down-1;
margin-right: 0.25em;
}
}
.no-results-suggestion,
.google-search-form {
margin-top: 1em;
}
// temporary
.search-results {
.fps-user-item {
display: flex;
flex-direction: row;
align-items: center;
.avatar {
margin-right: 0.5em;
min-width: 25px;
}
.user-titles {
display: flex;
flex-direction: column;
max-width: 300px;
.name {
color: var(--primary-high-or-secondary-low);
font-size: var(--font-0);
font-weight: 700;
@include ellipsis;
}
.username {
color: var(--primary-high-or-secondary-low);
font-size: var(--font-down-1);
@include ellipsis;
}
}
}
.category-items,
.tag-items {
margin-bottom: 1.5em;
.fps-category-item,
.fps-tag-item {
margin-bottom: 1.5em;
display: block;
}
}
}