-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
div element inside heading (h1, h2..) / paragraph elements #82
Comments
This also occurs with the following example given by documentation which uses a div inside of Typist. The same happens with p element. I suppose the cause of this problem is related to CSS display properties as h1, p and div have block as default value.
One thing that I used to temporarily solve this is setting display property of the used element to inline-block. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
By default
<Typist />
component produces adiv
element with classTypist
. If I want to animate a heading I need to put<Typist />
component insideh1
tag just like this:This will result in the following markup:
Now the above syntax has no issues everything works as it is supposed to but is it a good practice to put a
div
tag inside aheading
tag?To solve the above issue I tried to animate my heading in this way:
But this way does not animate the heading correctly and pushes the cursor to the next line instead of showing at the end of the text. The markup will be:
Is there any way to keep the functionality and animations without having to put the
div
insideheading
orparagraph
tags?Can we give a
porp
to<Typist />
component to produce aspan
element instead ofdiv
soh1
does not have adiv
inside of it.The text was updated successfully, but these errors were encountered: