Skip to content

Instantly share code, notes, and snippets.

View zachakbar's full-sized avatar
👻
...

{...} zachakbar

👻
...
View GitHub Profile
@zachakbar
zachakbar / _grid-columns.scss
Last active March 26, 2020 16:49
Grid columns with centered children.
@import "breakpoint";
// Breakpoints
$sm: 375px;
$md: 600px;
$md-lg: 768px;
$lg: 900px;
$lg-xl: 1032px;
$xl: 1170px;
$xxl: 1500px;
@zachakbar
zachakbar / menu-is-scrolling.js
Created April 23, 2020 17:03
add/remove classes to header on page scroll
menuIsScrolling: function() {
var $body = $('body'),
$header = $('header[role="banner"]'),
lastScrollTop = 0;
$(window).scroll(function(event){
var st = $(this).scrollTop();
if( st > 0 ) {
$header.addClass( 'is-scrolling' );
}
<!-- Section Layout -->
default : <span class="flip" title="Text Left / Image Right"><svg width="48" height="48" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path d="M13 17h8v-2h-8v2zM3 19h8V5H3v14zM13 9h8V7h-8v2zm0 4h8v-2h-8v2z"></path></svg></span>
alt : <span title="Image Left / Text Right"><svg width="48" height="48" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-hidden="true" focusable="false"><path d="M13 17h8v-2h-8v2zM3 19h8V5H3v14zM13 9h8V7h-8v2zm0 4h8v-2h-8v2z"></path></svg></span>
<!-- Column Split -->
split-equal : <span title="Two columns; equal split"><svg width="48" height="48" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" focusable="false"><path fill-rule="evenodd" clip-rule="evenodd" d="M39 12C40.1046 12 41 12.8954 41 14V34C41 35.1046 40.1046 36 39 36H9C7.89543 36 7 35.1046 7 34V14C7 12.8954 7.89543 12 9 12H39ZM39 34V14H25V34H39ZM23 34H9V14H23V34Z"></path></svg></span>
spl