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

Fluid layout hides video when VIDEO ID begins with a numeric #2828

Closed
nbibler opened this issue Nov 19, 2015 · 6 comments
Closed

Fluid layout hides video when VIDEO ID begins with a numeric #2828

nbibler opened this issue Nov 19, 2015 · 6 comments

Comments

@nbibler
Copy link
Contributor

nbibler commented Nov 19, 2015

Whenever the HTML VIDEO tag's ID attribute begins with a numeric value, the fluid option hides the video entirely. It looks as though the CSS rule is not generated for the element to set the proper padding.

For a demo of the failure, see http://jsbin.com/huveba/2/edit?html,output

Notice that the last two videos use a 1my-video ID attribute value (begin with a numeric).

HTML5 supports element IDs that begin with numerics (different from earlier HTML versions).

@nbibler
Copy link
Contributor Author

nbibler commented Nov 19, 2015

Seemingly, an ID starting with a numeric value is now valid in HTML5. However, it looks like in CSS, selectors / class name that begins with a numeric may not be valid.

Perhaps a fix for this is to reverse the class name generated. Rather than generating 1my-video-dimensions it would likely work to generate dimensions-1my-video.

@gkatsev
Copy link
Member

gkatsev commented Nov 19, 2015

Huh, oops.
Changing the class makes sense, though, it might be considered a breaking change. We might want to special case this and only swap it if the id begins with a number and then when we're ready to do a major update do it for everything.
Care to submit a PR?
Thanks.

@nbibler
Copy link
Contributor Author

nbibler commented Nov 19, 2015

Sure. If it's a concern about a breaking change… perhaps the approach going forward is to generate both, rather than conditionally generate one or the other?

@gkatsev
Copy link
Member

gkatsev commented Nov 19, 2015

Generating both might work, though, it might require us to make do blocks.

/* this may fail completely if a single selector fails, at least on older browsers */
.dimensions-1my-video, .1my-video-dimensions {
...
}

/* we'll need to do this instead */
.dimensions-1my-video {
...
}
.1my-video-dimensions {
...
}

@gkatsev
Copy link
Member

gkatsev commented Nov 19, 2015

Though, it's only needed if it actually fails. I know it's an issue around fullscreen selectors. Not sure about this case.

@nbibler
Copy link
Contributor Author

nbibler commented Nov 19, 2015

Pull request added at #2829.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants