Disambiguation style strings (#1442)

* Add strings section

* Add disambiguation prefix/suffix strings

* Add separator strings

* Add padding definition
This commit is contained in:
toasted-nutbread 2021-02-25 18:48:42 -05:00 committed by GitHub
parent ec495bd7b2
commit 5197b6cb9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,6 +17,14 @@
/* Variables */ /* Variables */
:root { :root {
/* Strings */
--compact-list-separator: ' | ';
--disambiguation-prefix: '(';
--disambiguation-suffix: ' only)';
--disambiguation-separator: ', ';
--disambiguation-reading-separator: ':';
/* Layout */ /* Layout */
--font-size-no-units: 14; --font-size-no-units: 14;
--font-size: calc(1px * var(--font-size-no-units)); --font-size: calc(1px * var(--font-size-no-units));
@ -71,7 +79,6 @@
--tag-font-weight: bold; --tag-font-weight: bold;
--tag-border-radius: 0.25em; --tag-border-radius: 0.25em;
--compact-list-separator: ' | ';
--list-padding1: 1.4em; --list-padding1: 1.4em;
--list-padding2: var(--list-padding1); --list-padding2: var(--list-padding1);
@ -80,6 +87,8 @@
--overlay-panel-translate-distance: 4em; --overlay-panel-translate-distance: 4em;
--disambiguation-space: 0.25em;
--animation-duration: 0.125s; --animation-duration: 0.125s;
--animation-duration2: calc(2 * var(--animation-duration)); --animation-duration2: calc(2 * var(--animation-duration));
@ -1045,18 +1054,19 @@ button.action-button[data-icon=source-term]::before {
} }
.term-definition-disambiguation-list { .term-definition-disambiguation-list {
color: var(--text-color-light3); color: var(--text-color-light3);
padding-right: var(--disambiguation-space);
} }
.term-definition-disambiguation-list[data-count='0'] { .term-definition-disambiguation-list[data-count='0'] {
display: none; display: none;
} }
.term-definition-disambiguation-list::before { .term-definition-disambiguation-list::before {
content: '('; content: var(--disambiguation-prefix);
} }
.term-definition-disambiguation-list::after { .term-definition-disambiguation-list::after {
content: ' only) '; content: var(--disambiguation-suffix);
} }
.term-definition-disambiguation+.term-definition-disambiguation::before { .term-definition-disambiguation+.term-definition-disambiguation::before {
content: ', '; content: var(--disambiguation-separator);
} }
.term-glossary-separator, .term-glossary-separator,
.term-reason-separator { .term-reason-separator {
@ -1081,16 +1091,16 @@ button.action-button[data-icon=source-term]::before {
} }
.frequency-disambiguation { .frequency-disambiguation {
color: var(--text-color-light3); color: var(--text-color-light3);
padding-right: 0.25em; padding-right: var(--disambiguation-space);
} }
.frequency-disambiguation-separator::before { .frequency-disambiguation-separator::before {
content: ':'; content: var(--disambiguation-reading-separator);
} }
.frequency-disambiguation::before { .frequency-disambiguation::before {
content: '('; content: var(--disambiguation-prefix);
} }
.frequency-disambiguation::after { .frequency-disambiguation::after {
content: ' only)'; content: var(--disambiguation-suffix);
} }
.frequency-disambiguation-reading { .frequency-disambiguation-reading {
display: inline; display: inline;
@ -1305,17 +1315,17 @@ button.action-button[data-icon=source-term]::before {
margin-right: 0.375em; margin-right: 0.375em;
} }
.term-pitch-accent-disambiguation-list { .term-pitch-accent-disambiguation-list {
padding-right: 0.25em;
color: var(--text-color-light3); color: var(--text-color-light3);
padding-right: var(--disambiguation-space);
} }
.term-pitch-accent-disambiguation-list::before { .term-pitch-accent-disambiguation-list::before {
content: '('; content: var(--disambiguation-prefix);
} }
.term-pitch-accent-disambiguation-list::after { .term-pitch-accent-disambiguation-list::after {
content: ' only)'; content: var(--disambiguation-suffix);
} }
.term-pitch-accent-disambiguation+.term-pitch-accent-disambiguation::before { .term-pitch-accent-disambiguation+.term-pitch-accent-disambiguation::before {
content: ', '; content: var(--disambiguation-separator);
} }
.term-pitch-accent-disambiguation-list[data-count='0'] { .term-pitch-accent-disambiguation-list[data-count='0'] {
display: none; display: none;