Skip to content

Instantly share code, notes, and snippets.

View mpukit's full-sized avatar

Maris Pukitis mpukit

View GitHub Profile
@mpukit
mpukit / _base.scss
Created January 10, 2018 21:02
Prevent Page Load Page Jump (scrollbar not present)
// Prevent Screen Jump
@media screen and (min-width: 1200px) { // Less noticable on larger screens
html {
margin-left: calc(100vw - 100%);
margin-right: 0;
}
}
@mpukit
mpukit / twitter-feed.html
Created September 20, 2017 14:25
Twitter Embedded Timeline CSS Override
<div class="twitter-feed">
<div class="container">
<div class="row">
<div class="col-md-12">
<!-- Twitter Embed Code -->
<a class="twitter-timeline" href="https://twitter.com/UPMCPhysicianEd"
data-chrome="noheader nofooter noborders transparent noscrollbar"
data-tweet-limit="1" dnt="true">Tweets by UPMC Physician Education</a>
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<!-- / Twitter Embed Code -->
@mpukit
mpukit / accordion.js
Created August 18, 2017 20:31
Basic Content/Menu Accordion
/* =====================================
Accordion
======================================== */
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
mpukit / SCSS.md
Created July 14, 2016 20:52 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

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

@mpukit
mpukit / device.css
Last active August 29, 2015 14:15 — forked from jsoverson/device.css
.visible-android {
display:none;
}
.visible-ios {
display:none;
}
.on-device .visible-android, .on-device .visible-android {
display:inherit;
}
.device-ios .visible-android {
@mpukit
mpukit / .gitignore-fix
Created February 20, 2015 18:51
Fix .gitignore so that it untracks every file that is newly placed in your .gitignore file
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 .
@mpukit
mpukit / README.md
Last active August 29, 2015 14:15 — forked from theRemix/README.md

Gulp + Sass + LiveReload + Foundation

Goals

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
mpukit / vertical-center.html
Last active August 29, 2015 14:15
Vertically center content in a div
<div class="box">
<span class="vertically-centered">
<h3>Nulla a libero metus intege reget tempor gravida</h3>
</span>
</div>
@mpukit
mpukit / mixin.scss
Last active August 29, 2015 14:15
A fix for the Wordpress admin bar overlaying your theme
@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
}
}