Skip to content
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

Use '<span>' instead of '<div>' #159

Closed
olive007 opened this issue Jan 27, 2020 · 4 comments · Fixed by #325
Closed

Use '<span>' instead of '<div>' #159

olive007 opened this issue Jan 27, 2020 · 4 comments · Fixed by #325

Comments

@olive007
Copy link

Simply change div to span inside the code to be able to use it inside text element.

Problem related:
We got a warning if we want to any loader inside a text element (<p/>).

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.

@0xc0d3r
Copy link

0xc0d3r commented Jan 31, 2020

Hi @olive007

As per HTML5 spec, using a block element div inside of p is invalid. For more details check here

I hope you understand the problem.

@jaketoolson
Copy link

@0xc0d3r this is why Olive007 is suggesting replacing div with span.

@davidhu2000
Copy link
Owner

I will look into this. Hopefully this could be an easy switch and wouldn't cause any major styling issues.

davidhu2000 added a commit that referenced this issue Dec 27, 2020
davidhu2000 added a commit that referenced this issue Dec 27, 2020
* replace div with span to fix #159

* update demo site
@davidhu2000 davidhu2000 reopened this Dec 27, 2020
@davidhu2000
Copy link
Owner

@olive007 can you install react-spinners@0.10.0-alpha.3 and see if this issue is resolved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants