Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix 3 issues (Unnecessary scrollbar on iFrames, Missing attributes for iFrame, Update readme with examples of videos in iFrame) #353

Merged
merged 4 commits into from
Apr 1, 2018

Conversation

dbworth
Copy link
Contributor

@dbworth dbworth commented Mar 31, 2018

This PR addresses 3 issues.
The functionality was tested on Chrome & Firefox on Ubuntu, and Chrome on Android.

1.

Unnecessary scrollbar on iFrames.

Related issues:
#305

Solution:
The overflow-y attribute for iFrame should be removed (or set to 'auto').

.

2.

Missing attributes for iFrame: style, allow, etc.

Related issues:
#269

Solution:
Add support for the following iFrame attributes:
data-featherlight-iframe-style
data-featherlight-iframe-allow
data-featherlight-iframe-webkitallowfullscreen
data-featherlight-iframe-mozallowfullscreen

These are useful for embedding videos.
e.g.
<a href="http://www.youtube.com/embed/f0BzD1zCye0?rel=0&amp;autoplay=1" data-featherlight="iframe" data-featherlight-iframe-frameborder="0" data-featherlight-iframe-allow="autoplay; encrypted-media" data-featherlight-iframe-allowfullscreen="true" data-featherlight-iframe-style="display:block;border:none;height:85vh;width:85vw;">

.

3.

Add some examples to README for creating an iFrames with a YouTube video, and how to make it a fullsize window with 100% width or height.

Related issues:
#301
#188
#104

Solution:
I added 3 examples to the README.
There are many ways to achieve this but it took me a long time to find a method that actually worked, a method that didn't hide Featherlight's "close" icon, and a method that could be set using the style tag.

.

@marcandre marcandre merged commit 146ddf8 into noelboss:master Apr 1, 2018
@marcandre
Copy link
Collaborator

Good work, thanks!

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

Successfully merging this pull request may close these issues.

2 participants