Skip to content

Conversation

@uniqname
Copy link
Collaborator

@uniqname uniqname commented Apr 6, 2021

No description provided.

@coolaj86
Copy link

coolaj86 commented Apr 6, 2021

Oh, I did not see this come in. Will review tomorrow.

@coolaj86
Copy link

coolaj86 commented Apr 6, 2021

Would it not be possible to use a media query and set the iframe to a percentage width on small screens?
Is JavaScript the only answer?

@uniqname
Copy link
Collaborator Author

uniqname commented Apr 6, 2021

It wouldn't do anything. The width attribute overcomes any CSS rule you try to put on it. Even if it did work, the height would be fixed while the width changed.

@coolaj86
Copy link

coolaj86 commented Apr 6, 2021

What if we don’t set width (or height) on the frame then?

@coolaj86
Copy link

coolaj86 commented Apr 6, 2021

I’m on my phone right now so I haven’t checked what the code looks like, but what does this guy do? Would it work for us?

https://entendy.com/Youtube-Mobile-Resize/

@uniqname
Copy link
Collaborator Author

uniqname commented Apr 6, 2021

It does almost exactly what my code does (same technique), but statically and not scalably.

@uniqname
Copy link
Collaborator Author

uniqname commented Apr 6, 2021

What if we don’t set width (or height) on the frame then?

We could control the size of the iframe with CSS then, but we would still need some kind of signal that we can use to determine what the aspect ratio should be.

For instance, we could add data-aspect="56.25" or similar to the iframe, but we would still need javascript to reference it and apply it to the style.

@coolaj86
Copy link

coolaj86 commented Apr 6, 2021

Ugh! Why can we not have nice things?

I'll try this out, but I'd also like to get some time with you today, maybe around lunch, to see if there's not some way we can do this without JavaScript that works well enough, and maybe some optional JavaScript for flair.

@uniqname
Copy link
Collaborator Author

uniqname commented Apr 6, 2021

This would almost certainly solve the problem, but it is not widely supported. We could use JS as a fallback though.

margin: 0;
padding: 0;
padding-top: 0.5em;
.beyond-nav > .nav-items {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix for long navigation

@coolaj86
Copy link

coolaj86 commented Apr 8, 2021

I was still getting prettier conflicts, but I think that I properly squashed this. Want to double check?

@coolaj86
Copy link

coolaj86 commented Apr 8, 2021

I've got the latest version of this up on alpha.gchomebrew.com and there are issues both with the navbar (no spacing between items) and with the tables (I can't zoom out to see it at-a-glance).

I'm going to check the other PR now.

@uniqname
Copy link
Collaborator Author

uniqname commented Apr 9, 2021

Could you show me what you mean about "no spacing between items" in the nav bar? This is what I see
Screen Shot 2021-04-08 at 5 57 39 PM

Also, it seems I've managed to bollocks up the history on this PR somehow.

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