diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-05-29 09:56:40 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-05-29 09:56:40 +0200 |
commit | 7a9949a15eb8e9ac572fdd0743b15b2680081b1d (patch) | |
tree | d526c2cd1eab77ef74b694e681162a8a742a861c /yomichan-user/conf.d/custom.css | |
parent | 9b9fb49b64e5d862e69b0b993466d27554d7982b (diff) |
update yomichan css
Diffstat (limited to 'yomichan-user/conf.d/custom.css')
-rw-r--r-- | yomichan-user/conf.d/custom.css | 58 |
1 files changed, 49 insertions, 9 deletions
diff --git a/yomichan-user/conf.d/custom.css b/yomichan-user/conf.d/custom.css index 7ce95f8..1e34039 100644 --- a/yomichan-user/conf.d/custom.css +++ b/yomichan-user/conf.d/custom.css @@ -1,23 +1,63 @@ +/* clean up header */ .search-header { margin-top: 12px; } .search-options { display: none; } + +/* light/dark mode body background-color */ :root[data-theme=dark] #content-body { background-color: #000000; } :root[data-theme=light] #content-body { background-color: #ffffff; } + +/* outlined instead of filled tags */ .tag .tag-label { background-color: unset; } .tag { - border: 2px solid var(--tag-color); - border-radius: 6px; + border: 1px solid var(--tag-color); + border-radius: 4px; } .frequency-group-tag .tag { border: none !important; } .tag .tag-body::before { display: none; } -.frequency-value { font-weight: bold; } -:root[data-theme=dark] .frequency-value { color: var(--tag-color); } +.tag-label, .tag-body { padding: 1px 5px; } + +/* rounded search box */ .search-textbox-container { - border-radius: 6px; - overflow: hidden; + border-radius: 6px; + overflow: hidden; } +:root[data-theme=light] { --tag-text-color: #333; } + +/* larger buttons on mobile */ @media (hover: none) { - .entry .actions .action-button { padding: 16px; } - .search-header .search-button { width: 48px; } + .entry .actions .action-button { padding: 16px; } + .search-header .search-button { width: 48px; } +} + +/* hide non useful tags */ +.tag[data-category="dictionary"] { display: none; } +.tag[data-category="pronunciation-dictionary"] { display: none; } + +/* hide name of frequency dictionary */ +.tag[data-category="frequency"] .tag-label { display: none; } + +/* display separator as comma */ +:root { --compact-list-separator: ', '; } + +/* display frequency and pitch accent inline with entry header */ +.entry-header, +.entry-body, +.entry-body-section[data-section-type="frequencies"], +.entry-body-section[data-section-type="frequencies"] .frequency-group-list, +.entry-body-section[data-section-type="pronunciations"], +.entry-body-section[data-section-type="pronunciations"] .pronunciation-group-list, +.entry-body-section[data-section-type="pronunciations"] .pronunciation-group-list .pronunciation-group +{ display: inline; } + +/* ensure vertical alignment of tags */ +.tag-label, +.tag-body, +.tag-label-content { + font-size: 10pt; + font-weight: 500; +} + +.entry-body-section[data-section-type="pronunciations"] { + font-size: calc(0.75 * var(--headword-font-size)); } -:root[data-theme=light] { --tag-text-color: #333; } |