fix issue were auto-animate could interfere with inherited line-height
This commit is contained in:
parent
a0e48602d3
commit
b23d15c430
2
dist/reveal.esm.js
vendored
2
dist/reveal.esm.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.esm.js.map
vendored
2
dist/reveal.esm.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js
vendored
2
dist/reveal.js
vendored
File diff suppressed because one or more lines are too long
2
dist/reveal.js.map
vendored
2
dist/reveal.js.map
vendored
File diff suppressed because one or more lines are too long
@ -399,7 +399,14 @@ export default class AutoAnimate {
|
|||||||
value = { value: style.to, explicitValue: true };
|
value = { value: style.to, explicitValue: true };
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
value = computedStyles[style.property];
|
// Use a unitless value for line-height so that it inherits properly
|
||||||
|
if( style.property === 'line-height' ) {
|
||||||
|
value = parseFloat( computedStyles['line-height'] ) / parseFloat( computedStyles['font-size'] );
|
||||||
|
}
|
||||||
|
|
||||||
|
if( isNaN(value) ) {
|
||||||
|
value = computedStyles[style.property];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if( value !== '' ) {
|
if( value !== '' ) {
|
||||||
@ -475,7 +482,6 @@ export default class AutoAnimate {
|
|||||||
} );
|
} );
|
||||||
|
|
||||||
pairs.forEach( pair => {
|
pairs.forEach( pair => {
|
||||||
|
|
||||||
// Disable scale transformations on text nodes, we transition
|
// Disable scale transformations on text nodes, we transition
|
||||||
// each individual text property instead
|
// each individual text property instead
|
||||||
if( matches( pair.from, textNodes ) ) {
|
if( matches( pair.from, textNodes ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user