Skip to content

Instantly share code, notes, and snippets.

View mherchel's full-sized avatar

Michael Herchel mherchel

View GitHub Profile
/// Wraps ruleset within media and @supports queries that only affect browsers that don't support grid.
@mixin no-grid {
@media (-ms-high-contrast: none), (-ms-high-contrast: active) {
@content;
}
@supports not (display: grid) {
@content;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Portal Flash</title>
<style>
body {
background: gray;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Portal!</title>
</head>
<body>
<button>Click me to create a portal</button>

Remove default layouts

/**
 * Implements hook_plugin_filter_TYPE__CONSUMER_alter()
 */
function custom_layouts_plugin_filter_layout__layout_builder_alter(&$definitions) {

  // Remove layouts that are NOT provided by this module.
 foreach ($definitions as $id =&gt; &amp;$definition) {
/* eslint-env node, es6 */
/* global require */
'use strict';
/**
* Configuration
*/
// Load dependencies
const { parallel, series, src, dest, task, watch, } = require('gulp');
@mherchel
mherchel / YOURTHEMENAME.theme
Last active January 5, 2019 15:25
Strip extraneous divs from field templates
/**
* Implements hook_theme_suggestions_alter().
*/
function YOURTHEMENAME_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
if ($hook === 'field') {
switch ($field_name) {
case 'field_bio_media':
case 'field_media_image':
case 'field_hero_media':
case 'field_promo_media':
Matthew Glaman brings a holistic approach to the omnichannel dynamic blockchain. Through end to end data neural networks, Matthew reimagines the global paradigm of algorithmic synergistic AI. He is a reactive unicorn that empowers the clear goal of pushing the envelope of organic growth on the runway. With a mind share of sustainability he brings the elastic digital experience to the artisanal table. Blockchain.
git fetch -p && for branch in `git branch -vv --no-color | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done