Skip to content

Instantly share code, notes, and snippets.

View cynazem's full-sized avatar

Cynthia Azevedo de Magalhães cynazem

View GitHub Profile
@cynazem
cynazem / CSS3 transitions
Created June 26, 2013 17:43
css GENERAL transitions
a, li, label, article, tr, span, input, select, textarea, .actions {
-webkit-transition: all 200ms ease-in-out;
-moz-transition: all 200ms ease-in-out;
-ms-transition: all 200ms ease-in-out;
-o-transition: all 200ms ease-in-out;
transition: all 200ms ease-in-out;
}
@cynazem
cynazem / checkboxRadioCss
Created June 25, 2013 17:51
Checkbox and Radio buttons (image replacement)
/* CHECKBOX & RADIOS */
/*********************/
input[type="radio"], input[type="checkbox"] {display: none}
input[type="radio"] + label,input[type="checkbox"] + label {display: block; padding-left: 20px; min-height: 18px; margin-bottom: 5px; cursor: pointer;}
input[type="checkbox"] + label {background: url(../images/ico-checkbox-normal.png) left top no-repeat} /* checkbox normal */
input[type="checkbox"] + label:hover {background: url(../images/ico-checkbox-hover.png) left top no-repeat} /* checkbox normal + hover */
input[type="checkbox"] + label:active {background: url(../images/ico-checkbox-active.png) left top no-repeat} /* checkbox clicado */
input[type="checkbox"]:checked + label{background: url(../images/ico-checkbox-checked.png) left top no-repeat} /* checkado + hover */
input[type="checkbox"]:checked + label:active {background: url(../images/ico-checkbox-active.png) left top no-repeat} /* checkbox checkado clicado */
/* Empty Elements */
div:empty, span:empty, li:empty, p:empty, td:empty, th:empty
{ padding: 20px; border: 5px dotted yellow !important; }
/* Empty Attributes */
*[alt=""], *[title=""], *[class=""], *[id=""], a[href=""], a[href="#"]
{ border: 5px solid yellow !important; }
/* Deprecated Elements */
applet, basefont, center, dir, font, isindex, menu, s, strike, u
@cynazem
cynazem / CSS - Micro clearfix hack
Created January 9, 2013 16:07
A new micro clearfix hack from Nicolas Gallegher - http://nicolasgallagher.com/micro-clearfix-hack/
/**
* 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,