Skip to content

Instantly share code, notes, and snippets.

@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
@snoblucha
snoblucha / ce_my_content_element.html5
Last active December 16, 2016 12:15 — forked from anonymous/ce_my_content_element.html5
Contao checkbox options for multiple content element in one field
<?php
$options = deserialize($this->my_options, true);
?>
<?php if (in_array('option-1', $options)): ?>
Option 1 is checked
<?php endif; ?>
<?php if (!in_array('option-2', $options)): ?>
Option 2 is not checked
@marcedwards
marcedwards / high-dpi-media.css
Last active November 19, 2023 12:56
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* 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 */