Skip to content

Instantly share code, notes, and snippets.

View Ricardo-Diaz's full-sized avatar

Ricardo Diaz Ricardo-Diaz

View GitHub Profile
.ir {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@Ricardo-Diaz
Ricardo-Diaz / gist:3956182
Created October 25, 2012 23:43
CSS: Visualy hide not display none
.visuallyhidden {
position: absolute;
width: 1px; /* Setting this to 0 make it invisible for VoiceOver */
height: 1px; /* Setting this to 0 make it invisible for VoiceOver */
padding: 0;
margin: -1px;
border: 0;
clip: rect(0 0 0 0);
overflow: hidden;
}
@Ricardo-Diaz
Ricardo-Diaz / gist:3956176
Created October 25, 2012 23:42
CSS: Clearfix
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
@Ricardo-Diaz
Ricardo-Diaz / gist:3956164
Created October 25, 2012 23:38
CSS: Style even lines on table
table tr:nth-child(even) {
background: rgba(0,0,0,0.1);
}
@Ricardo-Diaz
Ricardo-Diaz / gist:3956159
Created October 25, 2012 23:37
CSS: Disabled Pointers shades grey
.disabled {
pointer-events: none;
opacity: 0.5;
}
@Ricardo-Diaz
Ricardo-Diaz / gist:3956139
Created October 25, 2012 23:34
CSS: Design related CSS
.content {
font: 1em/1.4 Segoe, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
.title {
font: 1.7em/1.2 Baskerville, "Baskerville old face", "Hoefler Text", Garamond, "Times New Roman", serif;
}
.code {
font: 0.8em/1.6 Monaco, Mono-Space, monospace;
@Ricardo-Diaz
Ricardo-Diaz / gist:3956079
Created October 25, 2012 23:17
CSS: Reset all colors and Link Color
Reset all colors and change link color
This resets all text and background colors so you’re back at square one with black text. Then it changes the color and style of links to distinguish from regular text and make them apparent that they’re links – change the color and styling to whatever you want.
* {
color: black !important;
background-color: white !important;
background-image: none !important;
}
a:link {
@Ricardo-Diaz
Ricardo-Diaz / List of browser hacks.txt
Created October 25, 2012 23:16
Comprehensive List of Browser-Specific CSS Hacks With these you’ll be able to better target IE, Firefox, Chrome, Safari and Opera from within the CSS.
Comprehensive List of Browser-Specific CSS Hacks
With these you’ll be able to better target IE, Firefox, Chrome, Safari and Opera from within the CSS.
/***** Selector Hacks ******/
/* IE6 and below */
* html #uno { color: red }
/* IE7 */
*:first-child+html #dos { color: red }
@Ricardo-Diaz
Ricardo-Diaz / gist:3956059
Created October 25, 2012 23:14
CSS Change Size of Content Area
Changing the size of your content area
Make your content area wider or narrower.
#content {
width: 100%;
margin: 0;
float: none;
}
@Ricardo-Diaz
Ricardo-Diaz / gist:3956044
Created October 25, 2012 23:11
CSS: Rotate an image or text-transform
Rotating an image or text – transform
Rotate any image, text, or technically any element using this. Change the rotate value to how many degrees you want it to rotate, adding a “-” (like in the snippet) for counterclockwise rotating.
/* for firefox, safari, chrome, and any other gecko/webkit browser */
-webkit-transform: rotate(-90deg);
-moz-transform: rotate(-90deg);
/* for ie */
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);