mirror of
https://github.com/rsms/inter.git
synced 2024-11-22 11:02:55 +03:00
website: fix issue in lab where letterSpacing=0 would be interpreted as "auto"
This commit is contained in:
parent
867d63c790
commit
77b4d1f683
@ -1057,15 +1057,14 @@ function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let letterSpacingVar = vars.bind('letterSpacing', (el, v) => {
|
let letterSpacingVar = vars.bind('letterSpacing', (el, v) => {
|
||||||
resetLetterSpacingButton.classList.toggle("disabled", !v)
|
resetLetterSpacingButton.classList.toggle("disabled", v === '')
|
||||||
if (v) {
|
if (v !== '') {
|
||||||
resetLetterSpacingButton.tabIndex = null
|
resetLetterSpacingButton.tabIndex = null
|
||||||
} else {
|
} else {
|
||||||
resetLetterSpacingButton.tabIndex = -1
|
resetLetterSpacingButton.tabIndex = -1
|
||||||
}
|
}
|
||||||
if (!v) {
|
if (v === '')
|
||||||
v = calcImplicitLetterSpacing(sizeVar.getValue(), el)
|
v = calcImplicitLetterSpacing(sizeVar.getValue(), el)
|
||||||
}
|
|
||||||
setCSSProp('letter-spacing', (v / 100) + 'em')
|
setCSSProp('letter-spacing', (v / 100) + 'em')
|
||||||
}, (el, prevValue, ev) => {
|
}, (el, prevValue, ev) => {
|
||||||
if (ev && !ev.inputType && !prevValue) {
|
if (ev && !ev.inputType && !prevValue) {
|
||||||
|
Loading…
Reference in New Issue
Block a user