Skip to content

Instantly share code, notes, and snippets.

View gemmaweirs's full-sized avatar

Gemma Weirs gemmaweirs

  • Penzance, UK
View GitHub Profile
@gemmaweirs
gemmaweirs / bulletproof-font-face.css
Created March 5, 2014 03:43
This is the new bulletproof font-face syntax from FontSpring. http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax To force Chrome to use SVG fonts, uncomment the media query and adjust as required. See: http://www.fontspring.com/blog/smoother-rendering-in-chrome-update for more info.
@font-face {
font-family: "FontFamily";
src: url("myfont-webfont.eot?#iefix") format("embedded-opentype"),
url("myfont-webfont.woff") format("woff"),
url("myfont-webfont.ttf") format("truetype"),
url("myfont-webfont.svg#svgFontName") format("svg");
/*
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
@gemmaweirs
gemmaweirs / no-bg-border-button.css
Created March 30, 2014 21:27
A collection of flat styles to be applied to links and buttons. A work in progress. Demo: http://cdpn.io/FDriB All credits included in the pen.
button {
border: none;
display: inline-block;
font: 700 1rem/1 Arial, sans-serif;
outline: none;
padding: 1rem 3rem;
position: relative;
text-transform: uppercase;
}
/**
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.cf:before,