Skip to content

Instantly share code, notes, and snippets.


Maris Pukitis mpukit

View GitHub Profile
mpukit / _base.scss
Created Jan 10, 2018
Prevent Page Load Page Jump (scrollbar not present)
View _base.scss
// Prevent Screen Jump
@media screen and (min-width: 1200px) { // Less noticable on larger screens
html {
margin-left: calc(100vw - 100%);
margin-right: 0;
mpukit / twitter-feed.html
Created Sep 20, 2017
Twitter Embedded Timeline CSS Override
View twitter-feed.html
<div class="twitter-feed">
<div class="container">
<div class="row">
<div class="col-md-12">
<!-- Twitter Embed Code -->
<a class="twitter-timeline" href=""
data-chrome="noheader nofooter noborders transparent noscrollbar"
data-tweet-limit="1" dnt="true">Tweets by UPMC Physician Education</a>
<script async src="//" charset="utf-8"></script>
<!-- / Twitter Embed Code -->
mpukit / accordion.js
Created Aug 18, 2017
Basic Content/Menu Accordion
View accordion.js
/* =====================================
======================================== */
var accItem = document.getElementsByClassName('accordionItem');
var accHD = document.getElementsByClassName('accordionItemHeading');
for (i = 0; i < accHD.length; i++) {
accHD[i].addEventListener('click', toggleItem, false);
function toggleItem() {
var itemClass = this.parentNode.className;
mpukit /
Created Jul 14, 2016 — forked from jareware/
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

View device.css
.visible-android {
.visible-ios {
.on-device .visible-android, .on-device .visible-android {
.device-ios .visible-android {
mpukit / .gitignore-fix
Created Feb 20, 2015
Fix .gitignore so that it untracks every file that is newly placed in your .gitignore file
View .gitignore-fix
1) To untrack a single file that has already been added to your repo (to stop tracking the file but not delete it from your system, use:
git rm --cached <filename>
2) To untrack every file that is now in your .gitignore - commit changes, then:
git rm -r --cached .

Gulp + Sass + LiveReload + Foundation


To have a gulp workflow that with a single process,

  1. watches for any sass changes, then compiles sass source into css
  2. watches for any changes in the public directory, triggers live-reload
  3. serves your static content in public/
mpukit / vertical-center.html
Last active Aug 29, 2015
Vertically center content in a div
View vertical-center.html
<div class="box">
<span class="vertically-centered">
<h3>Nulla a libero metus intege reget tempor gravida</h3>
mpukit / mixin.scss
Last active Aug 29, 2015
A fix for the Wordpress admin bar overlaying your theme
View mixin.scss
@mixin wp-admin-bumper {
min-height: 46px; // height of mobile wp-admin bar in WP 4.0
@media screen and (min-width: 782px;) {
min-height: 32px; // standard height of wp-admin bar in WP 4.0