-
Notifications
You must be signed in to change notification settings - Fork 664
Responsive embeds and heading line height #615
Conversation
LGTM, but I'm going to let Matthew take a look at this one. |
This is VERY odd CSS. Doing a little research, it is considered standard practice and there are multiple articles that show this exact code. However, I did notice in these articles that much of this code is to get around IE5 and IE6 . First, there aren't many mobile browsers that use IE5 or 6 and second, most folks have moved well beyond supporting such legacy browsers. These same articles point out that the following mark up is what any sane browser should use: `video { Instead of supporting CopyPastaCSS, This HTML5 solution seems significantly simpler and allows for a single change to the CSS file. Any objections to using that approach? |
Correct me if I'm wrong, but I think that would only work if the YouTube embeds were Applying that CSS to an The reason the I hope this reflects it's not about CopyPastaCSS, I think I know all the possible ways of implementing responsive videos but went with the one that fit the scenario and had the least impact in the codebase. I did use a classname commonly related with this pattern so other people contributing could recognise it more easily. I would say that we don't really need the |
Thank you @jaicab that makes sense and I very much appreciate your experience on this. CSS just has a way of making you think it's a hack when as you point out, it may be the only way to do it! Just to confirm, are you saying the current pull request is the best way, or is there a small modification you could make. I'm happy to accept either version. |
No problem @scottjenson, happy to help! I love the project. I've done that small modification, which is just to remove the It's ready to merge if you ask me! |
Responsive embeds and heading line height
The YouTube embeds on the website weren't responsive, causing a increase in layout width on mobile, breaking the experience. Using the common pattern of 16:9 aspect ratio for responsive embeds via CSS I applied it to all the iframes in the HTML.
I also fixed a line height problem in the headings as it was being relied on for margin. In cases where the headings go to two lines, the spacing was huge. So changed it to 1 and applied margin bottom.