Skip to content

Instantly share code, notes, and snippets.

Responsive Video Examples

These examples show you how to do responsive video both HTML 5 based and embedded video from YouTube (can work with video embedded from other sites). All of the HTML and CSS on this page is based on the good work done by Thierry Koblentz and Chris Coyier. See the HTML for links to their work.

A Pen by chris0stein on CodePen.

License.

@chris0stein
chris0stein / SassMeister-input-HTML.html
Created October 3, 2014 19:13
Generated by SassMeister.com.
<section>
<div class="grid">
<img src="thumbs/mobile-tb.png" alt="picture of entire page at mobile size ">
</div>
<div class="grid">
<img src="thumbs/tablet-tb.png" alt=" picture of entire page at tablet size">
</div>
<div class="grid">
<img src="thumbs/desktop-tb.png" alt="picture of entire page at desktop size">
</div>
@chris0stein
chris0stein / SassMeister-input.scss
Last active August 29, 2015 14:07
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
//through goes from the first number through (including) last number
@for $i from 1 through 3 {
.for-through {
i: $i;
}
@chris0stein
chris0stein / SassMeister-input.scss
Last active August 29, 2015 14:07
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
// map in a map
$buttons: (
search : (
@chris0stein
chris0stein / SassMeister-input.scss
Last active August 29, 2015 14:07
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// Maps of buttons
$buttons: (
search: (
background: 22,
icon: "magnifier.svg"
@chris0stein
chris0stein / SassMeister-input.scss
Last active August 29, 2015 14:07
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
//functions
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
@chris0stein
chris0stein / SassMeister-input.scss
Created October 3, 2014 20:31
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// Maps of buttons
//this is a map inside of a map
$buttons: (
search: (
background: blue
@chris0stein
chris0stein / SassMeister-input.scss
Created October 3, 2014 20:34
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
//list
//$list: "sass" 4 "life";
$list: "blue" "red" "green";
//maps
@chris0stein
chris0stein / SassMeister-input.scss
Created October 3, 2014 21:02
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// Example error in a function
@function double-width($num) {
@if (type-of($num) == number) {
@return $num * 2;
} @else {
@chris0stein
chris0stein / SassMeister-input.scss
Created October 3, 2014 21:03
Generated by SassMeister.com.
// ----
// Sass (v3.3.14)
// Compass (v1.0.1)
// ----
// Simple warn
@warn "Hmmm, something went wrong.";
// Warn with conditional
$var: true;