Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :root {
- /* Color theme */
- --light-mode-bg-color: #fffaf0;
- --light-mode-fg-color: #333333;
- /* Pitch colors */
- --dark-mode-heiban: #39bae6;
- --dark-mode-atamadaka: #ec464f;
- --dark-mode-nakadaka: #ff8f40;
- --dark-mode-odaka: #6cbf43;
- --dark-mode-kifuku: #af85f4;
- --light-mode-heiban: #1aa0ce;
- --light-mode-atamadaka: #e92a35;
- --light-mode-nakadaka: #ff6b03;
- --light-mode-odaka: #61ad3b;
- --light-mode-kifuku: #7e53c4;
- /* Bold color */
- --light-mode-bold: #999999;
- --dark-mode-bold: #7d8590;
- /* PC Font sizes */
- --pc-main-font-size: 16px;
- --pc-main-def-size: 20px;
- --pc-vocab-font-size: 55px;
- --pc-sentence-font-size: 52px;
- --pc-back-sentence-font-size: 25px;
- --pc-hint-font-size: 38px;
- --pc-info-font-size: 23px;
- /* Mobile font sizes */
- --mobile-main-font-size: 16px;
- --mobile-main-def-size: 16px;
- --mobile-vocab-font-size: 50px;
- --mobile-sentence-font-size: 35px;
- --mobile-back-sentence-font-size: 20px;
- --mobile-hint-font-size:24px;
- --mobile-info-font-size: 16px;
- /* Miscellaneous */
- --font-serif: "Georgia", "Liberation Serif", "Times New Roman", "Hiragino Mincho ProN", "Noto Serif CJK JP", "Yu Mincho", HanaMinA, HanaMinB, serif;
- --font-sans: "Yu Mincho", "Liberation Sans", "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans CJK JP", "Meiryo", HanaMinA, HanaMinB, sans-serif;
- --light-mode-image-brightness: 85%;
- --dark-mode-image-brightness: 80%;
- --light-mode-tooltip-hover-color: rgb(256, 256, 256, 0.9);
- --dark-mode-tooltip-hover-color: rgba(0, 0, 0, 0.9);
- --def-picture-size: 200px;
- --max-width: 800px;
- font-size: var(--main-font-size);
- }
- .card {
- background-color: var(--bg-color) !important;
- color: var(--fg-color) !important;
- }
- .card.nightMode {
- --bg-color: var(--canvas, #2c2c2c);
- --fg-color: var(--fg, #fcfcfc);
- --heiban: var(--dark-mode-heiban, initial);
- --atamadaka: var(--dark-mode-atamadaka, initial);
- --nakadaka: var(--dark-mode-nakadaka, initial);
- --odaka: var(--dark-mode-odaka, initial);
- --kifuku: var(--dark-mode-kifuku, initial);
- --bg-elevated: rgba(0, 0, 0, 0.12);
- --bg-inset: rgba(255, 255, 241, 0.3);
- --fg-subtle: rgba(255, 255, 241, 0.3);
- --bold: var(--dark-mode-bold, #7d8590);
- --image-brightness: var(--dark-mode-image-brightness);
- --tooltip-hover-color: var(--dark-mode-tooltip-hover-color);
- }
- .android .nightMode {
- --bg-color: black;
- --fg-color: white;
- }
- .android .nightMode:not(.ankidroid_dark_mode) {
- /* make it brighter since bg is black */
- --bg-elevated: rgba(255, 255, 255, 0.06);
- }
- .android .nightMode.ankidroid_dark_mode {
- --bg-color: #303030;
- }
- .card:not(.nightMode) {
- --bg-color: var(--light-mode-bg-color);
- --fg-color: var(--light-mode-fg-color);
- --heiban: var(--light-mode-heiban, initial);
- --atamadaka: var(--light-mode-atamadaka, initial);
- --nakadaka: var(--light-mode-nakadaka, initial);
- --odaka: var(--light-mode-odaka, initial);
- --kifuku: var(--light-mode-kifuku, initial);
- --bg-elevated: rgba(0, 0, 0, 0.03);
- --bg-inset: rgba(0, 0, 0, 0.06);
- --fg-subtle: rgba(0, 0, 0, 0.6);
- --bold: var(--light-mode-bold, #999999);
- --image-brightness: var(--light-mode-image-brightness);
- --tooltip-hover-color: var(--light-mode-tooltip-hover-color);
- }
- html.win,
- html.mac,
- html.linux:not(.android) {
- --main-font-size: var(--pc-main-font-size);
- --main-def-size: var(--pc-main-def-size);
- --vocab-font-size: var(--pc-vocab-font-size);
- --sentence-font-size: var(--pc-sentence-font-size);
- --back-sentence-font-size: var(--pc-back-sentence-font-size);
- --hint-font-size: var(--pc-hint-font-size);
- --info-font-size: var(--pc-info-font-size);
- }
- html.mobile {
- --main-font-size: var(--mobile-main-font-size);
- --main-def-size: var(--mobile-main-def-size);
- --vocab-font-size: var(--mobile-vocab-font-size);
- --sentence-font-size: var(--mobile-sentence-font-size);
- --back-sentence-font-size: var(--mobile-back-sentence-font-size);
- --hint-font-size: var(--mobile-hint-font-size);
- --info-font-size: var(--mobile-info-font-size);
- }
- #qa {
- display: flex;
- align-items: center;
- flex-direction: column;
- min-height: calc(100vh - 40px);
- font-family: var(--font-serif);
- font-size: var(--main-font-size);
- text-align: left;
- }
- #main_image {
- max-width: 100%;
- box-sizing: border-box;
- text-align: center;
- overflow: hidden;
- position: relative;
- width: 100%;
- max-width: var(--max-width);
- }
- #main_image img {
- max-width: 100%;
- width: auto;
- max-height: 500px;
- height: auto;
- display: block;
- margin: 0 auto;
- }
- .def-header {
- display: flex;
- justify-content: center;
- align-items: center;
- max-width: var(--max-width);
- width: 100%;
- margin: 0 auto;
- }
- .dh-left {
- display: flex;
- justify-content: center;
- align-items: center;
- flex: 1;
- width: 100%;
- background: var(--bg-elevated);
- padding: 0.52em;
- border-radius: 5px;
- }
- .mobile .dh-left {
- background: none;
- padding: 0em;
- border-radius: 0px;
- }
- /* Mobile css */
- @media (max-width: 512px) {
- .def-header {
- max-width: var(--max-width);
- width: calc(100% - 20px);
- }
- .dh-left {
- background: none;
- padding: 0em;
- width: 100%;
- max-width: calc(100% - 20px);
- justify-content: center;
- align-items: center;
- overflow: hidden;
- }
- .vocab {
- font-size: clamp(16px, 6vw, 40px);
- line-height: 1.5;
- white-space: normal;
- overflow-wrap: break-word;
- display: inline-block;
- text-align: center;
- margin: 0 auto;
- max-width: 100%;
- }
- .front-vocab {
- font-size: clamp(16px, 6vw, 40px);
- line-height: 1.5;
- white-space: normal;
- overflow-wrap: break-word;
- display: inline-block;
- text-align: center;
- max-width: 100%;
- }
- @media (max-width: 360px) {
- .vocab,
- .front-vocab {
- font-size: clamp(16px, 5vw, 40px);
- }
- }
- .dh-right {
- max-width: 40vw;
- }
- .info {
- font-size: 0.9rem;
- padding-top: 7px;
- }
- .audio-buttons {
- position: fixed;
- bottom: 0;
- left: 0;
- z-index: 1000;
- }
- .def-info {
- display: none;
- }
- .sentence {
- display: none;
- }
- .sentence-mobile {
- line-height: 1.5;
- font-size: var(--back-sentence-font-size);
- display: inline-block;
- width: calc(100% - 20px);
- max-width: var(--max-width);
- }
- .tags {
- padding: 1px 3px;
- font-size: 9px;
- }
- b {
- font-weight: 400;
- }
- li[data-dictionary^="Jitendex"] ul,
- li[data-dictionary^="Jitendex"] ol,
- li[data-details^="Jitendex"] ul,
- li[data-details^="Jitendex"] ol {
- padding-left: 0.3em;
- }
- .nightMode #pitch-tags {
- color: #000 !important;
- background-color: #fff;
- }
- }
- /* Front elements */
- .front-vocab {
- font-size: var(--vocab-font-size);
- line-height: 1.5;
- white-space: nowrap;
- display: inline-block;
- text-align: center;
- max-width: 90vw;
- margin-top: 0.1em;
- }
- /* Back elements */
- .vocab {
- font-size: var(--vocab-font-size);
- line-height: 1.1;
- white-space: nowrap;
- display: inline-block;
- text-align: center;
- margin: 0 auto;
- padding-top: 0.1em;
- }
- a {
- color: #3b82f6 !important;
- }
- .nightMode a {
- color: #93c5fd !important;
- }
- /* Header */
- header {
- color: var(--fg-subtle);
- height: 40px;
- text-align: right;
- width: 100%;
- font-size: 1rem;
- }
- .top-container {
- max-width: calc(var(--max-width) + 20px);
- margin: 0px auto;
- width: calc(100% - 20px);
- fill: var(--fg-subtle) !important;
- position: relative;
- display: inline-block;
- }
- .freq-dropdown {
- cursor: pointer;
- }
- .freq-list-container {
- font-family: var(--font-sans);
- display: none;
- position: absolute;
- top: 100%;
- right: 0;
- background-color: var(--tooltip-hover-color);
- color: var(--fg-color);
- padding: 10px;
- border-radius: 5px;
- z-index: 1000;
- width: 200px;
- }
- .freq-list-container ul {
- list-style-type: none;
- line-height: 1.5;
- margin: 0;
- padding: 0;
- }
- .freq-dropdown:hover .freq-list-container {
- display: block;
- }
- /* Info (audio, reading) */
- .info {
- font-family: var(--font-sans);
- font-size: var(--info-font-size);
- color: var(--fg-color);
- }
- /* Replay button */
- .replay-button svg {
- width: 32px;
- height: 32px;
- }
- /* Pitch */
- .pitch {
- display: inline;
- }
- #pitch-tags {
- color: var(--bg-color);
- font-family: var(--font-serif);
- background-color: var(--fg-color);
- display: none;
- vertical-align: top;
- padding: 1px 3px;
- margin-right: -5px;
- }
- /* When multiple pitch */
- .pitch ul,
- #pitch-tags ul {
- list-style: none;
- display: inline;
- margin: 0;
- padding: 0;
- }
- .pitch li,
- #pitch-tags li {
- display: inline;
- }
- .pitch ul>li:not(:last-child)::after,
- #pitch-tags ul>li:not(:last-child)::after {
- content: "・";
- }
- .pitch ul>li:not(:last-child)::after {
- color: var(--fg-color);
- }
- #pitch-tags ul>li:not(:last-child)::after {
- color: var(--bg-color);
- }
- /* Definition container */
- .main-def {
- max-width: var(--max-width);
- font-size: var(--main-def-size);
- line-height: 1.75em;
- margin: 10px auto;
- width: calc(100% - 20px);
- position: relative;
- display: block;
- }
- /* Definition info display */
- .def-info-container {
- display: block;
- max-width: var(--max-width);
- width: calc(100% - 20px);
- position: relative;
- margin: 0 auto;
- }
- .def-info {
- font-family: var(--font-sans);
- position: absolute;
- top: 0;
- right: 0;
- font-size: 0.9rem;
- color: var (--fg-subtle);
- pointer-events: none;
- }
- /* MainDefinition */
- .definition {
- text-align: left;
- width: fit-content;
- max-width: 100%;
- }
- /* Definition box */
- .def-blockquote {
- font-family: var(--font-sans);
- background-color: var(--bg-elevated);
- display: block;
- max-width: min(var(--max-width), calc(100% - 20px));
- text-align: left;
- align-items: left;
- justify-content: left;
- border-left: 5px solid #ccc;
- overflow: hidden;
- padding: 5px 7px;
- position: relative;
- }
- /* Primary Image */
- .image img {
- max-height: 400px;
- width: auto;
- border-radius: 5px;
- cursor: pointer;
- transition: filter 0.3s;
- }
- .image img:hover,
- .def-image img:hover {
- filter: brightness(var(--image-brightness));
- }
- /* Definition Image(s) */
- .def-image {
- float: right;
- margin-left: 10px;
- max-width: min(35%, var(--def-picture-size));
- display: flex;
- flex-flow: column nowrap;
- justify-content: flex-start;
- gap: 10px;
- }
- .def-image img {
- object-fit: contain;
- max-height: var(--def-picture-size);
- border-radius: 3px;
- cursor: pointer;
- transition: filter 0.3s;
- }
- .def-image ol {
- list-style-type: none;
- padding: 0;
- margin: 0;
- }
- /* Image modal css */
- .modal-bg {
- position: fixed;
- display: none;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- background-color: rgba(0, 0, 0, 0.8);
- z-index: 1000;
- cursor: pointer;
- }
- .img-popup-container {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: min(calc(100% - 20px), calc(var(--max-width) + 200px));
- display: none;
- z-index: 1001;
- overflow: hidden;
- }
- .img-popup-img {
- width: auto;
- height: auto;
- margin: 0 auto;
- }
- /* Hide NSFW Images -- make sure you use the tag `NSFW` EXACTLY */
- /* Base styles */
- #main_image {
- }
- /* NSFW styles (standardize to .NSFW, remove -NSFW) */
- #main_image.NSFW {
- }
- /* NSFW blurred state */
- #main_image.NSFW img {
- filter: blur(20px);
- transition: filter 0.3s ease;
- transform: translateZ(0);
- cursor: pointer;
- }
- /* NSFW allowed (unblurred) state */
- #main_image.nsfwAllowed {
- }
- #main_image.nsfwAllowed.NSFW {
- }
- /* Disable tap highlight and focus effects for main_image */
- #main_image,
- #main_image a,
- #main_image img {
- -webkit-tap-highlight-color: transparent;
- -webkit-touch-callout: none;
- outline: none;
- user-select: none;
- }
- /* Ensure active state doesn't trigger visual effects */
- #main_image a:active,
- #main_image img:active {
- background: none;
- outline: none;
- }
- #main_image.nsfwAllowed img {
- filter: blur(0px);
- transition: filter 0.3s ease;
- transform: translateZ(0);
- cursor: pointer;
- }
- .sentence {
- line-height: 1.5;
- font-size: var(--back-sentence-font-size);
- display: inline-block;
- width: calc(100% - 0px);
- max-width: var(--max-width);
- }
- .sentence-mobile {
- display: none;
- }
- /* Footer */
- footer {
- margin-top: auto;
- width: 100%;
- }
- .bot-container {
- display: flex;
- justify-content: flex-end;
- max-width: calc(var(--max-width) + 20px);
- margin: 0px auto;
- width: calc(100% - 20px);
- }
- .tags-container {
- flex-grow: 1;
- }
- .tags-container .tags {
- min-height: 1.6em;
- }
- .tags {
- font-family: var(--font-sans);
- background-color: var(--bg-elevated);
- color: var(--fg-color);
- display: inline-grid;
- place-items: center;
- padding: 1px 5px;
- cursor: pointer;
- border-radius: 5px;
- font-size: 0.9rem;
- margin: auto 3px;
- text-overflow: ellipsis;
- overflow: hidden;
- max-width: 60dvw;
- white-space: nowrap;
- }
- /* Popup CSS */
- .popup {
- font-family: var(--font-sans);
- background-color: var(--bg-elevated);
- display: block;
- border-radius: 8px;
- padding: 10px;
- max-width: min(var(--max-width), calc(100% - 20px));
- }
- /* Definition Header */
- .def-header {
- display: flex;
- justify-content: center;
- align-items: center;
- max-width: var(--max-width);
- width: 100%;
- margin: 0 auto;
- }
- .dh-right {
- padding-left: 20px;
- max-width: 400px;
- position: relative;
- font-size: 0;
- }
- /* Misc. info */
- .misc-info {
- margin: 0 auto;
- }
- .misc-info ul {
- margin: 0;
- }
- /* Misc. */
- .show-furigana>ruby rt {
- visibility: visible;
- }
- ruby rt {
- user-select: none;
- visibility: hidden;
- }
- ruby:hover rt {
- visibility: visible;
- }
- b {
- color: var(--bold);
- font-weight: 600;
- }
- b>ruby rt {
- opacity: 1;
- }
- details {
- font-family: var(--font-sans);
- margin: 5px 0px;
- }
- summary {
- user-select: none;
- cursor: pointer;
- margin: 0px auto;
- }
- .pitch-low {
- position: relative;
- }
- .pitch-high {
- position: relative;
- }
- .pitch-high>.pitch-line {
- display: block;
- position: absolute;
- top: -0.1em;
- left: 0;
- right: 0;
- height: 0;
- border-top-width: 0.1em;
- border-top-style: solid;
- }
- .pitch-to-drop {
- position: relative;
- padding-right: 0.1em;
- margin-right: 0.1em;
- }
- .pitch-to-drop>.pitch-line {
- display: block;
- position: absolute;
- top: -0.1em;
- left: 0;
- right: 0;
- border-top-width: 0.1em;
- border-top-style: solid;
- right: -0.1em;
- height: 0.4em;
- border-right-width: 0.1em;
- border-right-style: solid;
- }
- .heiban {
- color: var(--heiban);
- }
- .atamadaka {
- color: var(--atamadaka);
- }
- .nakadaka {
- color: var(--nakadaka);
- }
- .odaka {
- color: var(--odaka);
- }
- .kifuku {
- color: var(--kifuku);
- }
- .left-edge,
- .right-edge {
- position: absolute;
- top: 0;
- width: 50px;
- height: 100%;
- cursor: pointer;
- opacity: 0.4;
- }
- .left-edge {
- left: 0;
- border-radius: 8px 0px 0px 8px;
- }
- .right-edge {
- right: 0;
- border-radius: 0px 8px 8px 0px;
- }
- .left-edge:hover,
- .right-edge:hover {
- background-color: var(--bg-inset);
- cursor: pointer;
- }
- ul[data-sc-content="glossary"]>li:not(:first-child)::before {
- white-space: pre-wrap;
- content: " | ";
- display: inline;
- }
- ul[data-sc-content="glossary"]>li {
- display: inline;
- }
- ul[data-sc-content="glossary"] {
- display: inline;
- list-style: none;
- padding-left: 0;
- }
- .definition i {
- font-style: normal;
- }
- li[data-dictionary^="JMdict"] i {
- font-style: italic;
- }
- .definition a span {
- max-width: 300px !important;
- }
- .definition .hidden {
- display: none
- }
- span[data-sc-code] {
- white-space: nowrap;
- }
- li[data-details="JMdict (English)"] .dict-group__glossary>ul,
- li[data-details="JMdict (English)"] .dict-group__glossary ul[data-sc-content="glossary"],
- li[data-details="JMdict"] .dict-group__glossary>ul,
- li[data-details="JMdict"] .dict-group__glossary ul[data-sc-content="glossary"],
- li[data-details="JMdict Extra"] .dict-group__glossary>ul,
- li[data-details="JMdict Extra"] .dict-group__glossary ul[data-sc-content="glossary"] {
- display: inline;
- padding-left: 0em;
- }
- li[data-details="JMdict (English)"] .dict-group__glossary>ul>li,
- li[data-details="JMdict (English)"] .dict-group__glossary ul[data-sc-content="glossary"]>li,
- li[data-details="JMdict"] .dict-group__glossary>ul>li,
- li[data-details="JMdict"] .dict-group__glossary ul[data-sc-content="glossary"]>li,
- li[data-details="JMdict Extra"] .dict-group__glossary>ul>li,
- li[data-details="JMdict Extra"] .dict-group__glossary ul[data-sc-content="glossary"]>li {
- display: inline;
- padding-right: 0em;
- margin-right: 0em;
- }
- li[data-details="JMdict (English)"] .dict-group__glossary>ul>li::after,
- li[data-details="JMdict (English)"] .dict-group__glossary ul[data-sc-content="glossary"]>li::after,
- li[data-details="JMdict"] .dict-group__glossary>ul>li::after,
- li[data-details="JMdict"] .dict-group__glossary ul[data-sc-content="glossary"]>li::after,
- li[data-details="JMdict Extra"] .dict-group__glossary>ul>li::after,
- li[data-details="JMdict Extra"] .dict-group__glossary ul[data-sc-content="glossary"]>li::after {
- content: " | ";
- white-space: pre-wrap;
- }
- li[data-details="JMdict (English)"] .dict-group__glossary>ul>li:last-of-type:after,
- li[data-details="JMdict (English)"] .dict-group__glossary ul[data-sc-content="glossary"]>li:last-of-type:after,
- li[data-details="JMdict"] .dict-group__glossary>ul>li:last-of-type:after,
- li[data-details="JMdict"] .dict-group__glossary ul[data-sc-content="glossary"]>li:last-of-type:after,
- li[data-details="JMdict Extra"] .dict-group__glossary>ul>li:last-of-type:after,
- li[data-details="JMdict Extra"] .dict-group__glossary ul[data-sc-content="glossary"]>li:last-of-type:after {
- display: none;
- }
- ol li[data-details="JMdict (English)"] .dict-group__tag-list,
- ol li[data-details="JMdict"] .dict-group__tag-list,
- ol li[data-details="JMdict Extra"] .dict-group__tag-list {
- font-style: italic;
- }
- ol li[data-details="JMdict ( hitsEnglish)"] .dict-group__tag-list .dict-group__tag--dict,
- ol li[data-details="JMdict"] .dict-group__tag-list .dict-group__tag--dict,
- ol li[data-details="JMdict Extra"] .dict-group__tag-list .dict-group__tag--dict {
- display: none;
- }
- ol li[data-details="Nico/Pixiv"] .dict-group__tag-list {
- font-style: italic;
- }
- ol li[data-details="新和英"] details.glossary-text__details .glossary-text__summary .dict-group__glossary--first-line {
- display: none;
- }
- .dict-group__tag-list .dict-group__tag:not(:first-child)::before {
- content: ", ";
- }
- .dict-group__tag-list::before {
- content: "(";
- }
- .dict-group__tag-list::after {
- content: ") ";
- }
- /* Show definition furigana */
- .def-blockquote rt {
- visibility: visible;
- }
- /* Lessen def-blockquote padding */
- .def-blockquote {
- padding-block: .5em;
- }
- .def-blockquote ol {
- margin-block: 0em;
- }
- .definition ol:has(> li[data-dictionary]),
- .definition ol:has(> li[data-details]) {
- padding-inline-start: 1.3em;
- }
- .definition ol:has(> li[data-dictionary]:only-of-type),
- .definition ol:has(> li[data-details]:only-of-type) {
- list-style-type : none;
- padding-inline-start: 0;
- }
- .front-container {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- width: 100%;
- max-width: var(--max-width);
- margin: 0 auto;
- }
- .front-vocab#front-vocab-expression {
- text-align: center !important;
- display: inline-block !important;
- margin: 0 auto !important;
- width: auto !important;
- }
- #hint {
- text-align: left !important;
- display: block;
- margin: 0 auto !important;
- width: auto !important;
- }
Add Comment
Please, Sign In to add comment