Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View michaelnie's full-sized avatar

Michael Nielsen michaelnie

  • Sweden
View GitHub Profile
<?php
add_action( 'wp_ajax_my_request', function () {
ob_start();
echo get_theme_mod( 'position', 'top' );
wp_send_json_success( ob_get_clean() );
wp_die();
@michaelnie
michaelnie / CSS
Created October 25, 2013 15:31
Font Smoothing
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
@michaelnie
michaelnie / CSS
Created October 25, 2013 11:41
CSS Transition
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-ms-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
@michaelnie
michaelnie / CSS
Created March 1, 2013 15:17
SVG with PNG fallback
background: url("image.png");
background: none, url("image.svg");
@michaelnie
michaelnie / CSS
Last active December 12, 2015 05:09 — forked from marcedwards/high-dpi-media.css
High DPI Media
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@michaelnie
michaelnie / CSS
Created January 5, 2013 15:20
High-Resolution Media Queries
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
}
@michaelnie
michaelnie / CSS
Created December 21, 2012 10:10
Text Indent
p + p {
text-indent: 2em;
}
@michaelnie
michaelnie / CSS
Last active December 9, 2015 21:09
Hide Text
.module {
background-color: transparent;
border: 0;
overflow: hidden;
}
.module:before {
content: "";
display: block;
width: 0;
@michaelnie
michaelnie / CSS
Last active December 9, 2015 21:09
Opacity
filter: alpha(opacity=50);
opacity: 0.5;
@michaelnie
michaelnie / CSS
Created December 18, 2012 15:36
Border Box
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;