Skip to content

Commit

Permalink
Better spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvNC committed Jan 22, 2024
1 parent 032744e commit 6ff769f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/util/yomitan/convertSenseToSC.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ function convertLanguageDataToLiSC(languageData, isExplanation) {
const sc = {
tag: 'li',
style: {
marginTop: '0.2em',
marginBottom: '0.5em',
marginBottom: isExplanation ? '0.3em' : '0.5em',
listStyleType: isExplanation ? 'none' : 'circle',
},
data: {
Expand Down Expand Up @@ -227,12 +226,14 @@ function convertLanguageEntryToListItems(
};

// Change text size for selected languages
if (!isExplanation) {
const cjkLangs = ['yue', 'zho', 'jpn', 'kor', 'lzh'];
const isCJK = cjkLangs.includes(language);
// @ts-ignore
singleLanguageLi.style.fontSize = isCJK ? '1.2em' : '0.75em';
}
const cjkLangs = ['yue', 'zho', 'jpn', 'kor', 'lzh'];
const isCJK = cjkLangs.includes(language);
// @ts-ignore
singleLanguageLi.style.fontSize = isCJK
? '1.2em'
: isExplanation
? '1em'
: '0.75em';

languageLiScArray.push(singleLanguageLi);
}
Expand Down

0 comments on commit 6ff769f

Please sign in to comment.