Skip to content

Instantly share code, notes, and snippets.

View fabiorochafg's full-sized avatar

Fábio Rocha fabiorochafg

View GitHub Profile
@fabiorochafg
fabiorochafg / top-of-the-page-link.html
Last active December 17, 2015 04:39
Top of the page link with jQuery animation.
@fabiorochafg
fabiorochafg / print-stylesheet.css
Last active December 1, 2016 16:57
A print stylesheet example.
@media print {
*,
*:before,
*:after,
*:first-letter,
p:first-line,
div:first-line,
blockquote:first-line,
li:first-line {
background: transparent !important;
@fabiorochafg
fabiorochafg / accessible-resizable-fonts.css
Last active December 17, 2015 04:59
A way to make resizable fonts accessible.
.fontSize80 { font-size: 80% !important; }
.fontSize90 { font-size: 90% !important; }
.fontSize100 { font-size: 100% !important; }
.fontSize110 { font-size: 110% !important; }
.fontSize120 { font-size: 120% !important; }
.fontSize130 { font-size: 130% !important; }
.fontSize140 { font-size: 140% !important; }
.fontSize150 { font-size: 150% !important; }
.fontSize160 { font-size: 160% !important; }
.fontSize170 { font-size: 170% !important; }
@fabiorochafg
fabiorochafg / high-contrast.css
Last active September 15, 2023 11:30
High contrast example.
body.highContrast {
background: #000000;
color: #ffffff;
}
body.highContrast label,
body.highContrast li,
body.highContrast p,
body.highContrast td,
body.highContrast th,
body.highContrast span {
@fabiorochafg
fabiorochafg / sitemap-template.xml
Last active December 17, 2015 04:59
A sitemap template.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://url</loc>
<lastmod>2009-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
@fabiorochafg
fabiorochafg / media-queries.css
Last active May 8, 2019 17:55
CSS Media Queries example including devices
/* For Mobile */
@media only screen and (min-device-width: 320px) and (max-device-width: 1024px), only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-device-pixel-ratio: 3) {
button,
input[type="button"],
input[type="submit"] {
-webkit-appearance: none;
}
}
/* For screens widths larger than 1440px */
@fabiorochafg
fabiorochafg / fluid-grid-system.css
Last active December 18, 2015 02:58
A fluid grid system for responsive layout.
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.box {
margin: 0 -1%;
overflow: hidden;
@fabiorochafg
fabiorochafg / remove-webkit-from-button.css
Last active December 22, 2015 10:28
Remove webkit appearance from buttons on Apple devices.
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: none;
}
@fabiorochafg
fabiorochafg / text-selected-attributes.css
Last active January 2, 2016 00:29
Allow change attributes from any selected layout item on the page.
::selection {
background: black;
color: white;
}
::-moz-selection {
background: black;
color: white;
}
@fabiorochafg
fabiorochafg / newsletter-template.html
Last active May 3, 2017 23:35
A newsletter template.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>NEWSLETTER TITLE</title>
</head>
<body>
<table width="600" style="clear:both; margin:0 auto;">
<tr>