2020-11-08 17:34:23 +00:00
|
|
|
/*
|
2022-02-03 01:43:10 +00:00
|
|
|
* Copyright (C) 2020-2022 Yomichan Authors
|
2020-11-08 17:34:23 +00:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Variables */
|
|
|
|
:root {
|
2020-11-19 01:15:30 +00:00
|
|
|
--main-content-horizontal-padding: 0.72em;
|
|
|
|
--entry-horizontal-padding: 0;
|
|
|
|
|
2020-12-30 02:33:57 +00:00
|
|
|
--padding: calc(10em / var(--font-size-no-units));
|
2021-03-13 18:08:50 +00:00
|
|
|
--content-width-search: 700;
|
|
|
|
--content-width: calc(1em * var(--content-width-search) / var(--font-size-no-units));
|
2020-11-08 17:34:23 +00:00
|
|
|
|
|
|
|
--background-color: #ffffff;
|
|
|
|
--separator-color1: #cccccc;
|
|
|
|
}
|
2020-12-30 02:33:57 +00:00
|
|
|
:root:not([data-loaded=true]) {
|
|
|
|
--animation-duration: 0s;
|
2020-11-08 17:34:23 +00:00
|
|
|
}
|
2020-11-26 04:22:05 +00:00
|
|
|
:root[data-theme=dark] {
|
2020-12-30 02:33:57 +00:00
|
|
|
--separator-color1: #333333;
|
2020-11-08 17:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Common styles */
|
|
|
|
:root {
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
body {
|
|
|
|
background-color: var(--background-color);
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
2021-01-03 20:30:38 +00:00
|
|
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
2020-12-30 02:33:57 +00:00
|
|
|
color: var(--text-color);
|
2020-11-08 17:34:23 +00:00
|
|
|
height: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
h1 {
|
|
|
|
font-size: 2em;
|
|
|
|
line-height: 1.5em;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0.25em 0 0;
|
|
|
|
font-weight: normal;
|
|
|
|
box-sizing: border-box;
|
2020-11-14 23:12:06 +00:00
|
|
|
border-bottom: calc(1em / (var(--font-size-no-units) * 2)) solid var(--separator-color1);
|
2020-11-08 17:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Search bar */
|
|
|
|
.search-textbox-container {
|
|
|
|
display: flex;
|
|
|
|
flex-flow: row nowrap;
|
|
|
|
width: 100%;
|
|
|
|
align-items: stretch;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
#search-textbox {
|
2020-12-30 02:33:57 +00:00
|
|
|
color: var(--text-color);
|
2020-11-08 17:34:23 +00:00
|
|
|
flex: 1 1 auto;
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: var(--textarea-padding);
|
|
|
|
background-color: var(--input-background-color);
|
|
|
|
border-radius: 0;
|
|
|
|
line-height: var(--textarea-line-height);
|
|
|
|
border: 0;
|
|
|
|
outline: none;
|
|
|
|
width: 100%;
|
|
|
|
height: calc(var(--textarea-line-height) + var(--textarea-padding) * 2);
|
|
|
|
min-height: calc(var(--textarea-line-height) + var(--textarea-padding) * 2);
|
|
|
|
max-height: calc(var(--textarea-line-height) * 10 + var(--textarea-padding) * 2);
|
|
|
|
resize: vertical;
|
2020-11-14 20:23:20 +00:00
|
|
|
font-size: var(--font-size);
|
2021-01-03 20:30:38 +00:00
|
|
|
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
2020-11-08 17:34:23 +00:00
|
|
|
white-space: pre-wrap;
|
2020-12-30 02:33:57 +00:00
|
|
|
z-index: 1;
|
2022-10-16 02:43:21 +00:00
|
|
|
margin: 0;
|
2020-11-08 17:34:23 +00:00
|
|
|
}
|
2021-10-09 18:32:56 +00:00
|
|
|
.search-button {
|
2020-11-08 17:34:23 +00:00
|
|
|
flex: 0 0 auto;
|
|
|
|
position: relative;
|
|
|
|
width: 2.5em;
|
|
|
|
background-color: var(--input-background-color);
|
|
|
|
border: 0;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
cursor: pointer;
|
|
|
|
outline: none;
|
|
|
|
transition: background-color var(--animation-duration) ease-in-out;
|
2020-12-30 02:52:04 +00:00
|
|
|
border-radius: 0;
|
2020-11-08 17:34:23 +00:00
|
|
|
}
|
2021-10-09 18:32:56 +00:00
|
|
|
.search-button:hover,
|
|
|
|
.search-button:focus {
|
2020-11-08 17:34:23 +00:00
|
|
|
background-color: var(--input-background-color-dark);
|
|
|
|
}
|
2021-10-09 18:32:56 +00:00
|
|
|
.search-button:focus:not(:focus-visible):not(:hover) {
|
2021-02-21 01:56:20 +00:00
|
|
|
background-color: var(--input-background-color);
|
|
|
|
}
|
2021-10-09 18:32:56 +00:00
|
|
|
.search-button:focus-visible {
|
2021-02-21 01:56:20 +00:00
|
|
|
background-color: var(--input-background-color-dark);
|
|
|
|
}
|
2021-10-09 18:32:56 +00:00
|
|
|
.search-button:active,
|
|
|
|
.search-button:active:focus {
|
2020-11-08 17:34:23 +00:00
|
|
|
background-color: var(--input-background-color-darker);
|
|
|
|
}
|
|
|
|
|
2021-10-09 18:32:56 +00:00
|
|
|
.search-button>.icon {
|
2020-11-08 17:34:23 +00:00
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
2021-02-21 05:18:43 +00:00
|
|
|
background-color: var(--button-default-icon-color);
|
2020-12-20 20:43:10 +00:00
|
|
|
--icon-size: 16px 16px;
|
2020-11-08 17:34:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* Search options */
|
|
|
|
.search-options {
|
|
|
|
display: flex;
|
|
|
|
flex-flow: row wrap;
|
2021-05-15 20:30:33 +00:00
|
|
|
margin: 0.5em calc(-1 * var(--main-content-horizontal-padding));
|
2020-11-08 17:34:23 +00:00
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
.search-option {
|
|
|
|
flex: 0 1 auto;
|
|
|
|
margin: 0.5em 1em;
|
|
|
|
align-items: center;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2020-11-08 18:25:07 +00:00
|
|
|
.search-option:not([hidden]) {
|
|
|
|
display: flex;
|
|
|
|
}
|
2020-11-08 17:34:23 +00:00
|
|
|
.search-option-label {
|
|
|
|
padding-left: 0.5em;
|
|
|
|
}
|
2020-11-08 18:25:07 +00:00
|
|
|
.search-option-pre-label {
|
|
|
|
padding-right: 0.5em;
|
|
|
|
}
|
|
|
|
#query-parser-mode-container {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
}
|
|
|
|
#query-parser-mode-container:not([hidden]) {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
#query-parser-mode-select {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
max-width: 220px;
|
|
|
|
min-width: 100px;
|
|
|
|
}
|
2020-11-08 17:34:23 +00:00
|
|
|
|
|
|
|
/* Search styles */
|
|
|
|
#intro {
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
#intro>p {
|
|
|
|
margin: 0;
|
|
|
|
}
|
2021-05-15 20:30:33 +00:00
|
|
|
:root[data-search-mode=action-popup] #intro,
|
|
|
|
:root[data-search-mode=action-popup] #search-option-clipboard-monitor-container {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
:root[data-search-mode=action-popup],
|
|
|
|
:root[data-search-mode=action-popup] body {
|
|
|
|
width: 640px;
|
|
|
|
height: 480px;
|
|
|
|
}
|