WordPress/wp-content/themes/twentyfourteen/fonts/example.html

443 lines
18 KiB
HTML

<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Genericons</title>
<link rel="stylesheet" href="genericons.css">
<style type="text/css">
body {
font-family: sans-serif;
line-height: 1.5;
width: 800px;
margin: 50px auto;
color: #777;
background: white;
}
.icons {
overflow: hidden;
padding: 10px 0;
}
.icons div {
cursor: pointer;
float: left;
margin: 0 30px 30px 0;
}
.icons:hover div {
background: #f7f7f7;
}
.code {
display: block;
font: 14px/1.5 monospace;
width: 740px;
white-space: pre;
border: 1px solid #ccc;
padding: 10px;
color: #777;
overflow: auto;
}
.my-icon:before {
content: '\f408';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/1 'Genericons';
vertical-align: middle;
}
/* For the Examples */
.my-checklist {
list-style-type: none;
text-indent: -16px;
}
.my-checklist li:before {
padding-right: 16px;
content: '\f418';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: text-top;
}
.my-blockquote {
background: #eee;
border-left: 32px solid #ddd;
padding: 10px;
}
.my-blockquote:before {
margin-left: -42px;
padding-right: 10px;
content: '\f106';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/20px 'Genericons';
vertical-align: bottom;
}
.my-button {
font-family: Helvetica, sans-serif;
font-size: 14px;
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #e05d22 0%, #d94412 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #e05d22 0%, #d94412 100%); /* IE10+ */
background: -o-linear-gradient( top, #e05d22 0%, #d94412 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #e05d22 0%, #d94412 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e05d22', endColorstr='#d94412', GradientType=0); /* IE6-9 */
display: inline-block;
padding: 10px 16px 4px 16px;
color: #fff;
text-decoration: none;
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
}
.my-button:hover,
.my-button:focus {
background: #ed6a31; /* Old browsers */
background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* IE10+ */
background: -o-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #ed6a31 0%, #e55627 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed6a31', endColorstr='#e55627', GradientType=0); /* IE6-9 */
outline: none;
}
.my-button:active {
background: #d94412; /* Old browsers */
background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #d94412 0%, #e05d22 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #d94412 0%, #e05d22 100%); /* IE10+ */
background: -o-linear-gradient( top, #d94412 0%, #e05d22 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #d94412 0%, #e05d22 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d94412', endColorstr='#e05d22', GradientType=0); /* IE6-9 */
border: none;
border-top: 3px solid #b93207;
padding: 6px 16px 7px 16px;
}
</style>
</head>
<body>
<div class="section">
<h1>Genericons Usage</h1>
<p>Copy the <strong>font</strong> folder and the <strong>genericons.css</strong> file together into your project. Link the CSS in your HTML:</p>
<p><code>&lt;link href="path/to/genericons.css" rel="stylesheet"&gt;</code></p>
<p>Drop in the following HTML with the name of the icon you want to display:</p>
<p><code>&lt;div class="genericon genericon-standard"&gt;&lt;/div&gt;</code></p>
<div class="icons">
<!-- post formats -->
<div alt="f100" class="genericon genericon-standard"></div>
<div alt="f101" class="genericon genericon-aside"></div>
<div alt="f102" class="genericon genericon-image"></div>
<div alt="f103" class="genericon genericon-gallery"></div>
<div alt="f104" class="genericon genericon-video"></div>
<div alt="f105" class="genericon genericon-status"></div>
<div alt="f106" class="genericon genericon-quote"></div>
<div alt="f107" class="genericon genericon-link"></div>
<div alt="f108" class="genericon genericon-chat"></div>
<div alt="f109" class="genericon genericon-audio"></div>
<!-- social icons -->
<div alt="f200" class="genericon genericon-github"></div>
<div alt="f201" class="genericon genericon-dribbble"></div>
<div alt="f202" class="genericon genericon-twitter"></div>
<div alt="f203" class="genericon genericon-facebook"></div>
<div alt="f204" class="genericon genericon-facebook-alt"></div>
<div alt="f205" class="genericon genericon-wordpress"></div>
<div alt="f206" class="genericon genericon-googleplus"></div>
<div alt="f207" class="genericon genericon-linkedin"></div>
<div alt="f208" class="genericon genericon-linkedin-alt"></div>
<div alt="f209" class="genericon genericon-pinterest"></div>
<div alt="f210" class="genericon genericon-pinterest-alt"></div>
<div alt="f211" class="genericon genericon-flickr"></div>
<div alt="f212" class="genericon genericon-vimeo"></div>
<div alt="f213" class="genericon genericon-youtube"></div>
<div alt="f214" class="genericon genericon-tumblr"></div>
<div alt="f215" class="genericon genericon-instagram"></div>
<div alt="f216" class="genericon genericon-codepen"></div>
<div alt="f217" class="genericon genericon-polldaddy"></div>
<!-- meta icons -->
<div alt="f300" class="genericon genericon-comment"></div>
<div alt="f301" class="genericon genericon-category"></div>
<div alt="f302" class="genericon genericon-tag"></div>
<div alt="f303" class="genericon genericon-time"></div>
<div alt="f304" class="genericon genericon-user"></div>
<div alt="f305" class="genericon genericon-day"></div>
<div alt="f306" class="genericon genericon-week"></div>
<div alt="f307" class="genericon genericon-month"></div>
<div alt="f308" class="genericon genericon-pinned"></div>
<!-- other icons -->
<div alt="f400" class="genericon genericon-search"></div>
<div alt="f401" class="genericon genericon-unzoom"></div>
<div alt="f402" class="genericon genericon-zoom"></div>
<div alt="f403" class="genericon genericon-show"></div>
<div alt="f404" class="genericon genericon-hide"></div>
<div alt="f405" class="genericon genericon-close"></div>
<div alt="f406" class="genericon genericon-close-alt"></div>
<div alt="f407" class="genericon genericon-trash"></div>
<div alt="f408" class="genericon genericon-star"></div>
<div alt="f409" class="genericon genericon-home"></div>
<div alt="f410" class="genericon genericon-mail"></div>
<div alt="f411" class="genericon genericon-edit"></div>
<div alt="f412" class="genericon genericon-reply"></div>
<div alt="f413" class="genericon genericon-feed"></div>
<div alt="f414" class="genericon genericon-warning"></div>
<div alt="f415" class="genericon genericon-share"></div>
<div alt="f416" class="genericon genericon-attachment"></div>
<div alt="f417" class="genericon genericon-location"></div>
<div alt="f418" class="genericon genericon-checkmark"></div>
<div alt="f419" class="genericon genericon-menu"></div>
<div alt="f420" class="genericon genericon-top"></div>
<div alt="f421" class="genericon genericon-minimize"></div>
<div alt="f422" class="genericon genericon-maximize"></div>
<div alt="f423" class="genericon genericon-404"></div>
<div alt="f424" class="genericon genericon-spam"></div>
<div alt="f425" class="genericon genericon-summary"></div>
<div alt="f426" class="genericon genericon-cloud"></div>
<div alt="f427" class="genericon genericon-key"></div>
<div alt="f428" class="genericon genericon-dot"></div>
<div alt="f429" class="genericon genericon-next"></div>
<div alt="f430" class="genericon genericon-previous"></div>
<div alt="f431" class="genericon genericon-expand"></div>
<div alt="f432" class="genericon genericon-collapse"></div>
<div alt="f433" class="genericon genericon-dropdown"></div>
<div alt="f434" class="genericon genericon-dropdown-left"></div>
<div alt="f435" class="genericon genericon-top"></div>
<div alt="f436" class="genericon genericon-draggable"></div>
<div alt="f437" class="genericon genericon-phone"></div>
<div alt="f438" class="genericon genericon-send-to-phone"></div>
<div alt="f439" class="genericon genericon-plugin"></div>
<div alt="f440" class="genericon genericon-cloud-download"></div>
<div alt="f441" class="genericon genericon-cloud-upload"></div>
<div alt="f442" class="genericon genericon-external"></div>
<div alt="f443" class="genericon genericon-document"></div>
<div alt="f444" class="genericon genericon-book"></div>
<div alt="f445" class="genericon genericon-cog"></div>
<div alt="f446" class="genericon genericon-unapprove"></div>
<div alt="f447" class="genericon genericon-cart"></div>
<div alt="f448" class="genericon genericon-pause"></div>
<div alt="f449" class="genericon genericon-stop"></div>
<div alt="f450" class="genericon genericon-skip-back"></div>
<div alt="f451" class="genericon genericon-skip-ahead"></div>
<div alt="f452" class="genericon genericon-play"></div>
<div alt="f453" class="genericon genericon-tablet"></div>
<div alt="f454" class="genericon genericon-send-to-tablet"></div>
<div alt="f455" class="genericon genericon-info"></div>
<div alt="f456" class="genericon genericon-notice"></div>
<div alt="f457" class="genericon genericon-help"></div>
<div alt="f458" class="genericon genericon-fastforward"></div>
<div alt="f459" class="genericon genericon-rewind"></div>
<div alt="f460" class="genericon genericon-portfolio"></div>
<!-- generic shapes -->
<div alt="f500" class="genericon genericon-uparrow"></div>
<div alt="f501" class="genericon genericon-rightarrow"></div>
<div alt="f502" class="genericon genericon-downarrow"></div>
<div alt="f503" class="genericon genericon-leftarrow"></div>
</div>
<p>If you want to insert an icon manually using the <code>:before</code> selector, you can setup CSS rules like the following example. <strong>Make sure to set the size to a multiple of 16px</strong> or the icons could end up looking fuzzy:</p>
<p><textarea class="code" style="min-height: 150px;" onclick="select();">.my-icon:before {
content: '\f408';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/1 'Genericons';
vertical-align: middle;
}</textarea></p>
<p>Add a matching class to your HTML:</p>
<p><code>&lt;div class="my-icon"&gt;You're a Star!&lt;/div&gt;</code></p>
<p>Here's the result: <span class="my-icon">You're a Star!</span></p>
<h2>Examples</h2>
<p>Turn every icon a <span style="color: #fa8072;">Salmon</span> color:</p>
<p><textarea class="code" style="min-height: 70px" onclick="select();">
.genericon {
color: #fa8072;
}</textarea></p>
<p>Or turn the stars <span style="color: #ffd700;">Gold</span>:</p>
<p><textarea class="code" style="min-height: 70px" onclick="select();">
.genericon-star {
color: #fa8072;
}</textarea></p>
<p>Use icons for bulleted lists:</p>
<ul class="my-checklist">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul>
<p><textarea class="code" style="min-height: 130px" onclick="select();">
<ul class="my-checklist">
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
</ul></textarea></p>
<p><textarea class="code" style="min-height: 260px;" onclick="select();">
.my-checklist {
list-style-type: none;
text-indent: -16px;
}
.my-checklist li:before {
padding-right: 16px;
content: '\f418';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: text-top;
}</textarea></p>
<p>Use icons to style blockquotes:</p>
<blockquote class="my-blockquote">Sometimes I've believed as many as six impossible things before breakfast. &mdash;<em>Lewis Carroll</em></blockquote>
<blockquote class="my-blockquote">`Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!"</blockquote>
<p><textarea class="code" style="min-height: 40px;" onclick="select();"><blockquote class="my-blockquote">Sometimes I've believed as many as six impossible things before breakfast. &mdash;<em>Lewis Carroll</em></blockquote></textarea></p>
<p><textarea class="code" style="min-height: 300px;" onclick="select();">
.my-blockquote {
background: #eee;
border-left: 32px solid #ddd;
padding: 10px;
}
.my-blockquote:before {
margin-left: -42px;
padding-right: 10px;
content: '\f106';
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 32px/20px 'Genericons';
vertical-align: bottom;
} </textarea></p>
<p>Use icons to style buttons:</p>
<a class="my-button" href="javascript:void()"><i class="genericon genericon-show"></i> View</a>
<a class="my-button" href="javascript:void()"><i class="genericon genericon-audio"></i> Listen</a>
<p><textarea class="code" style="min-height: 40px;" onclick="select();"><a class="my-button" href="#"><i class="genericon genericon-show"></i> View</a>
<a class="my-button" href="#"><i class="genericon genericon-audio"></i> Listen</a></textarea></p>
<p><textarea class="code" style="min-height: 300px;" onclick="select();">
.my-button {
font-family: Helvetica, sans-serif;
background: #e05d22; /* Old browsers */
background: -webkit-linear-gradient(top, #e05d22 0%, #d94412 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #e05d22 0%, #d94412 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #e05d22 0%, #d94412 100%); /* IE10+ */
background: -o-linear-gradient( top, #e05d22 0%, #d94412 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #e05d22 0%, #d94412 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e05d22', endColorstr='#d94412', GradientType=0); /* IE6-9 */
display: inline-block;
padding: 10px 16px 6px 16px;
color: #fff;
text-decoration: none;
border: none;
border-bottom: 3px solid #b93207;
border-radius: 2px;
}
.my-button:hover,
.my-button:focus {
background: #ed6a31; /* Old browsers */
background: -webkit-linear-gradient(top, #ed6a31 0%, #e55627 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* IE10+ */
background: -o-linear-gradient( top, #ed6a31 0%, #e55627 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #ed6a31 0%, #e55627 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ed6a31', endColorstr='#e55627', GradientType=0); /* IE6-9 */
outline: none;
}
.my-button:active {
background: #d94412; /* Old browsers */
background: -webkit-linear-gradient(top, #d94412 0%, #e05d22 100%); /* Chrome10+,Safari5.1+ */
background: -moz-linear-gradient( top, #d94412 0%, #e05d22 100%); /* FF3.6+ */
background: -ms-linear-gradient( top, #d94412 0%, #e05d22 100%); /* IE10+ */
background: -o-linear-gradient( top, #d94412 0%, #e05d22 100%); /* Opera 11.10+ */
background: linear-gradient( to bottom, #d94412 0%, #e05d22 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#d94412', endColorstr='#e05d22', GradientType=0); /* IE6-9 */
border: none;
border-top: 3px solid #b93207;
padding: 6px 16px 10px 16px;
}</textarea>/</p>
<h2>CSS Preprocessors</h2>
<p>Preprocessing extensions such as Sass (SCSS Syntax) or LESS</a> can make it easier to manage CSS for a lot of things at once using things like variables and mixins.</p>
<p>This example will seup the basic genericon rules and sets a color you can use for all icons using Sass:</p>
<p><textarea class="code" style="min-height: 360px;" onclick="select();">$icon-color: "#fa8072";
.genericon {
color: $icon-color;
}
@mixin genericon-rules {
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: middle;
}
.my-icon:before {
content: '\f408';
@include genericon-rules;
}</textarea></p>
<p>Here is a similar example for LESS:</p>
<p><textarea class="code" style="min-height: 360px;" onclick="select();">@icon-color: "#fa8072";
.genericon {
color: @icon-color;
}
.genericon-rules {
display: inline-block;
-webkit-font-smoothing: antialiased;
font: normal 16px/1 'Genericons';
vertical-align: middle;
}
.my-icon:before {
content: '\f408';
.genericon-rules;
}</textarea></p>
<h2>Fallback images for IE7 and below</h2>
<p>Genericons <strong>does not come with fallback icons by default</strong> -- therefore you have to create them yourself. If you are using HTML similar to this example:
<p><code>&lt;span class="genericon genericon-warning"&gt;&lt;/span&gt;</code></p>
<p>You can use the asterisk hack to serve a different icon to IE7 once you have saved the fallback icons to your project:</p>
<textarea class="code" style="min-height: 85px;" onclick="select();">.genericon-warning {
*background: url(fallback-icon.png) no-repeat center center;
*text-indent: 100%;
}</textarea>
</div>
</body>
</html>