Skip to content

Instantly share code, notes, and snippets.

@djuxed
djuxed / gist:4546266
Created January 16, 2013 10:40
rel="logo"
<link rel="logo" type="image/svg" href="http://yourdomain.com/logo.svg"/>
@djuxed
djuxed / gist:4451839
Created January 4, 2013 11:19
Box Shadow
.InnerShadow (@Horizontal: 0, @Vertical: 10px, @Blur: 10px, @Colour: @Orangeshadow) {
-webkit-box-shadow: inset @Horizontal @Vertical @Blur @Colour;
-moz-box-shadow: inset @Horizontal @Vertical @Blur @Colour;
box-shadow: inset @Horizontal @Vertical @Blur @Colour;
}
.BoxShadow (@boxShadow: 0 1px 1px rgba(0,0,0,0.08)) {
-webkit-box-shadow: @boxShadow;
-moz-box-shadow: @boxShadow;
box-shadow: @boxShadow;
@djuxed
djuxed / gist:4451827
Last active December 10, 2015 15:08
Border Radius Mixin
.BorderRadius (@radius: 3px) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
@djuxed
djuxed / gist:4259467
Last active October 13, 2015 21:38
Support Specification
@supports ( font-feature-settings: ‘liga’ ) or
( -webkit-font-feature-settings: 'liga' ) or
( -moz-font-feature-settings: 'liga=1' ) {
h1 {
font-family: 'A Common Ligatured Font', serif;
}
}
/* OR */
@djuxed
djuxed / gist:4259229
Last active October 13, 2015 21:38
Better Ampersand in CSS3. Unicode range allows you to target specific characters that are not likely to be used within the content, for example changing the font only for the 'Ampersand' or special characters.
@font-face {
font-family: 'Ampersand';
src: local('Baskerville'), local('Palatino'), local('Book Antiqua');
unicode-range: U+26;
}
@font-face {
/* Ampersand fallback font, otherwise the Ampersand font family will be applied to all characters for unsupported browsers. */
font-family: 'Ampersand';
src: local('Arial');