Skip to content

Instantly share code, notes, and snippets.

View zanesensenig's full-sized avatar

Zane Sensenig zanesensenig

View GitHub Profile
@zanesensenig
zanesensenig / fix_css_hardware.css
Created March 16, 2016 13:58
Hardware Acceleration -- CSS Transition Flickering
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-perspective: 1000;
-moz-perspective: 1000;
-ms-perspective: 1000;
perspective: 1000;
@zanesensenig
zanesensenig / animate.css
Created April 18, 2016 12:30
artsUP Landing Gradient
background: linear-gradient(90deg, #00aeef, #ed008c);
background-size: 400% 400%;
-webkit-animation: AnimationName 16s ease infinite;
-moz-animation: AnimationName 16s ease infinite;
-o-animation: AnimationName 16s ease infinite;
animation: AnimationName 16s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:0% 82%}
50%{background-position:100% 19%}
100%{background-position:0% 82%}
@zanesensenig
zanesensenig / paragraphs--example.php
Last active April 20, 2016 12:26
Paragraphs print value snippet
<?php
$items = field_get_items('paragraphs_item', $variables['paragraphs_item'], 'field_para_background_color');
$key = $items[0]['value'];
?>
<div id="full-width-container" class="<?php print $key; ?>">
<div id="full-width-image" class="">
<?php print render($content['field_image']); ?>
</div>
</div>
@zanesensenig
zanesensenig / show-hide.js
Created June 1, 2016 13:30
reusable show/hide utility
$('.past-projects-card').hover(
function(){ $(this).addClass('project-details-hover'); },
function(){ $(this).removeClass('project-details-hover'); }
);
$('.past-projects-card').hover(
function(){ $('.show-project-details', this).removeClass('hide'); },
function(){ $('.show-project-details', this).addClass('hide'); }
);
@zanesensenig
zanesensenig / hover.tpl.php
Last active June 2, 2016 12:21
PURE CSS HOVER
<a class="past-projects-card" href="/node/<?php print $fields['nid']->content ?>" style="background: url(<?php print $fields['field_exhibition_image']->content ?>) center center/cover;">
<div class="show-project-details">
<?php print $fields['title']->content ?>
<?php print $fields['field_artist_group']->content ?>
<?php print $fields['field_project_date']->content ?>
</div>
</a>