You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In React project, I am having an issue with cursor's style, when I pass html tag with class as an argument to type() function.
I can not override css variable introduced in root (e.g. --ti-cursor-font-size) locally in my css class . It affects font style but NOT cursor style.
import{renderToStaticMarkup}from"react-dom/server";importTypeItfrom"typeit-react";importstylesfrom"./index.module.css";import"./styles.css";exportdefaultfunctionApp(){constspanClass=styles.myReactClass;return(<><TypeItclassName={styles.myReactClass}>
Cursor OK, CSS class:myReactClass TypeIt: without instance!
</TypeIt><TypeItgetBeforeInit={(instance)=>{instance// .break({ delay: 750 })// .type('<span class="myClass">Hello World!</span>').break({delay: 750}).type(`<span class="${spanClass}">Cursor NOK, CSS class:myReactClass; TypeIt: with instance; type func: 1!</span>`).break({delay: 750}).type(renderToStaticMarkup(<spanclassName={styles.myAnotherReactClass}>
Cursor NOK, CSS class:myAnotherReactClass; TypeIt: without
instance; type func: 2!
</span>));returninstance;}}/></>);}
For further details please check the question I posted on StackOverflow and for visual effect of the error here.
The text was updated successfully, but these errors were encountered:
m19v
changed the title
Cursor position and animation is not working with html tag
Cursor style problem: can not override --ti-cursor-font-size css variable
Apr 18, 2023
In React project, I am having an issue with cursor's style, when I pass html tag with class as an argument to
type()
function.I can not override css variable introduced in root (e.g.
--ti-cursor-font-size
) locally in my css class . It affects font style but NOT cursor style.For further details please check the question I posted on StackOverflow and for visual effect of the error here.
The text was updated successfully, but these errors were encountered: