Skip to content

Instantly share code, notes, and snippets.

View curiositry's full-sized avatar

Curiositry curiositry

View GitHub Profile
@curiositry
curiositry / gradient_line
Created August 28, 2013 18:47
A neat gradient line snippet. Dependent on flexbox_functions.php. You could use the straight flexbox code or some other alignment system.
.gradient_line{
<?php flexbox::align_items_center(); ?>
height: 1px;
background: black;
width: 100%;
background: -webkit-gradient(linear, 100% 100%, 0 0, from(white), to(white), color-stop(50%, black));
background: -moz-linear-gradient(left, #FFF 0%, #444 50%, #fff 100%);
background: -o-gradient(linear, 0 0, 100% 0, from(white), to(white), color-stop(50%, black));
clear:all;
}
@curiositry
curiositry / CSS_headers_and_compression
Created August 28, 2013 18:44
For those using PHP as a CSS preprocessor, this snippet sets the headers and also enables gzipping.
<?php ob_start ("ob_gzhandler");
header("Content-type: text/css; charset: UTF-8");
header("Cache-Control: must-revalidate");
$offset = 60 * 60 ;
$ExpStr = "Expires: " .
gmdate("D, d M Y H:i:s",
time() + $offset) . " GMT";
header($ExpStr);
?>
@curiositry
curiositry / text_selection_style
Created August 28, 2013 18:41
CSS to style selected text differently from how the OS/Browser displays it be default.
::-moz-selection {
background-color: #777;
color: #fff;
}
::selection {
background-color: #777;
color: #fff;
}
@curiositry
curiositry / placeholder_styles
Created August 28, 2013 18:39
The code needed to style HTML5 input placeholder text.
::-webkit-input-placeholder { /* WebKit browsers */
color: #555;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: #555;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: #555;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */