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

Change container element to a div instead of span since span can not have all elements as children according to W3C #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

yn5
Copy link
Contributor

@yn5 yn5 commented May 26, 2016

W3C threw me an error when having a <p> element inside react-typewriter so I'd like to propose to change the container to be a <div> since it may have any element as a child.

…have all elements as children according to W3C
@yn5
Copy link
Contributor Author

yn5 commented May 27, 2016

This of course creates the problem in the other direction: now the react-typewriter can't have any element as a parent. @frostney @ianbjorndilling Any suggestions on how to fix the problem both ways?

@frostney
Copy link
Collaborator

@yn5 What do you think about having the container element as a prop? I feel like it should be span by default. From the top of my head, I some projects I worked on where it would break the layout if the container suddenly changed from span to div.

@yn5
Copy link
Contributor Author

yn5 commented May 30, 2016

@frostney Sounds like a good solution to me! I've added another commit to implement it.

@yn5
Copy link
Contributor Author

yn5 commented Jun 3, 2016

@frostney What do you think of the code?

@yn5
Copy link
Contributor Author

yn5 commented Aug 3, 2016

@frostney I noticed the PR caused a warning, added another commit to fix that.

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

Successfully merging this pull request may close these issues.

2 participants