mirror of
https://github.com/ZetaKebab/japanese-conjugation-drill.git
synced 2025-01-14 22:08:44 +00:00
Fixed furigana style.
This commit is contained in:
parent
47fa14deea
commit
1d68a32b58
@ -198,7 +198,6 @@ div.options ul {
|
|||||||
transition: all 0.15s ease;
|
transition: all 0.15s ease;
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
background: yellow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[tooltip]:hover:before {
|
[tooltip]:hover:before {
|
||||||
@ -206,13 +205,31 @@ background: yellow;
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
/* customizable */
|
/* customizable */
|
||||||
margin-top: -20px;
|
margin-top: -12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
[tooltip]:not([tooltip-persistent]):before {
|
[tooltip]:not([tooltip-persistent]):before {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Custom positions for furigana */
|
||||||
|
|
||||||
|
.tooltip-w1[tooltip]:before { font-size: 8px; margin-left: 4px; }
|
||||||
|
.tooltip-w2[tooltip]:before { font-size: 8px; margin-left: 0px; }
|
||||||
|
.tooltip-w3[tooltip]:before { font-size: 8px; margin-left: -4px; }
|
||||||
|
|
||||||
|
.tooltip-w1[tooltip]:hover:before,
|
||||||
|
.tooltip-w2[tooltip]:hover:before,
|
||||||
|
.tooltip-w3[tooltip]:hover:before { margin-top: -10px; }
|
||||||
|
|
||||||
|
#question .tooltip-w1[tooltip]:before { font-size: 12px; margin-left: 14px; }
|
||||||
|
#question .tooltip-w2[tooltip]:before { font-size: 12px; margin-left: 8px; }
|
||||||
|
#question .tooltip-w3[tooltip]:before { font-size: 12px; margin-left: 2px; }
|
||||||
|
|
||||||
|
#question .tooltip-w1[tooltip]:hover:before,
|
||||||
|
#question .tooltip-w2[tooltip]:hover:before,
|
||||||
|
#question .tooltip-w3[tooltip]:hover:before { margin-top: -12px; }
|
||||||
|
|
||||||
div#explanation p span {
|
div#explanation p span {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ function wordWithFurigana(words) {
|
|||||||
var bits = word.split(/(.)\[([^\]]*)\]/);
|
var bits = word.split(/(.)\[([^\]]*)\]/);
|
||||||
|
|
||||||
while (bits.length > 1) {
|
while (bits.length > 1) {
|
||||||
bits[0] = bits[0] + "<span tooltip='" + bits[2] + "'>" + bits[1] + "</span>" + bits[3];
|
bits[0] = bits[0] + "<span class='tooltip-w" + bits[2].length + "' tooltip='" + bits[2] + "'>" + bits[1] + "</span>" + bits[3];
|
||||||
bits.splice(1, 3);
|
bits.splice(1, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user