Skip to content

Instantly share code, notes, and snippets.

View stellarcowboy's full-sized avatar

Kenneth White stellarcowboy

View GitHub Profile
@stellarcowboy
stellarcowboy / gist:f76776443ef5c663092e
Created March 12, 2015 16:13
Typical metaquery breakpoints
<meta media="(max-width: 480px)" content="mobile" name="breakpoint" >
<meta media="(min-width: 481px)" content="mobilelarge" name="breakpoint" >
<meta media="(max-width: 1024px)" content="mobile-tablet" name="breakpoint" >
<meta media="(min-width: 768px)" content="tablet" name="breakpoint" >
<meta media="(min-width: 1016px)" content="desktop" name="breakpoint" >
@stellarcowboy
stellarcowboy / gist:c4eb5c93876c75c0e333
Created March 12, 2015 16:17
WordPress script enqueues for metaquery and matchMedia
wp_register_script('match_media', get_stylesheet_directory_uri().'/js/matchMedia.js', array('jquery'));
wp_enqueue_script('match_media');
wp_register_script('metaquery', get_stylesheet_directory_uri().'/js/metaquery.min.js', array('jquery','match_media'));
wp_enqueue_script('metaquery');
@stellarcowboy
stellarcowboy / gist:eba8a07af3b3ad67f96b
Last active August 29, 2015 14:16
Typical metaquery SCSS selector
.section-inner {
width:100%;
margin: 0 auto;
.breakpoint-desktop & {
width:60em;
background-color: transparent;
}
}
ul.logo-tagline {
@stellarcowboy
stellarcowboy / gist:f1670515c15bcafdf7a49e8c3bcfd33e
Created January 11, 2017 19:04
Add URL parameters to YouTube oembed in WordPress
/**
* youtube_embed_url_parameters function.
*
* @access public
* @param string $html
* @param string $url
* @param array $args
* @return string $html
*/
function youtube_embed_url_parameters( $html, $url, $args ) {