Skip to content

Instantly share code, notes, and snippets.

@keithdevon
keithdevon / grid-overlay.php
Created March 27, 2018 09:33
Function to append a grid overlay div to the body depending on the environment
<?php
/**
* This function appends a grid overlay div to the body depending on the environment.
*
*/
function tgf_add_grid_overlay_debugging_helper() {
if ( WP_LOCAL ) {
// echo the script
@keithdevon
keithdevon / _grid-overlay.scss
Created March 27, 2018 09:39
Styling for the Neat 2 grid overlay
/*
* Layout debugging display
*/
body {
&.env--local {
.grid-overlay {
display: none;
position: fixed;
z-index: 99999999;
@keithdevon
keithdevon / hd-gutenberg-column-fix.css
Last active December 18, 2020 22:26
Gutenberg columns block alignment fix
:root {
--gutter: 32px;
}
@media screen and (min-width: 782px) {
/* For the '25's' in the 25 / 50 / 25 variation */
.wp-block-column[style='flex-basis:25%'] {
flex-basis: calc(var(--gutter) * 2) !important;