├── 2012 └── 01-01-example.post ├── assets ├── styles │ ├── class.css │ ├── screen.css │ ├── syntax.css │ ├── print.css │ ├── reset.css │ ├── custom.css │ └── normalize.css ├── images │ ├── bg.jpg │ └── icon.jpg ├── layouts │ ├── page.layout │ ├── post.layout │ └── main.layout ├── scripts │ └── main.js └── partials │ ├── google │ └── analytics.part │ ├── highlight_js.part │ └── disqus │ ├── combination.part │ ├── counter.part │ └── comments.part ├── .gitignore ├── robots.txt ├── .rsync-filter ├── humans.txt ├── tags.page ├── index.page ├── atom.page ├── brite.yml └── README.md /assets/styles/class.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /assets/styles/screen.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.html 2 | *.xml 3 | -------------------------------------------------------------------------------- /assets/images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/brite-site/master/assets/images/bg.jpg -------------------------------------------------------------------------------- /assets/layouts/page.layout: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | layout: main 4 | 5 | --- 6 | 7 | <%= content %> 8 | 9 | -------------------------------------------------------------------------------- /assets/scripts/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | // Your code here 3 | }); 4 | 5 | -------------------------------------------------------------------------------- /assets/images/icon.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rubyworks/brite-site/master/assets/images/icon.jpg -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | # www.robotstxt.org/ 2 | # www.google.com/support/webmasters/bin/answer.py?hl=en&answer=156449 3 | 4 | User-agent: * 5 | 6 | -------------------------------------------------------------------------------- /.rsync-filter: -------------------------------------------------------------------------------- 1 | - *.layout 2 | - *.post 3 | - *.page 4 | - *.part 5 | - .svn 6 | - scrap 7 | P wiki 8 | P robot.txt 9 | P robots.txt 10 | P statcvs 11 | P statsvn 12 | P usage 13 | -------------------------------------------------------------------------------- /humans.txt: -------------------------------------------------------------------------------- 1 | /* the humans responsible & colophon */ 2 | /* humanstxt.org */ 3 | 4 | /* TEAM */ 5 | : 6 | Site: 7 | Twitter: 8 | Location: 9 | 10 | /* THANKS */ 11 | Names (& URL): 12 | 13 | /* SITE */ 14 | Standards: HTML5, CSS3 15 | Components: Modernizr, jQuery 16 | Software: 17 | 18 | -------------------------------------------------------------------------------- /assets/partials/google/analytics.part: -------------------------------------------------------------------------------- 1 | --- html 2 | 3 | <% if site.config.google_analytics %> 4 | 5 | 6 | 8 | 12 | 13 | <% end %> 14 | 15 | -------------------------------------------------------------------------------- /tags.page: -------------------------------------------------------------------------------- 1 | title : Site Index 2 | layout : page 3 | 4 | --- html 5 | <% for tag in site.tags %> 6 |
7 |
8 | <%= tag %> 9 |
10 | <% for post in site.posts_by_tag[tag] %> 11 |
12 | <%= post.date %> 13 | <%= post.title %> 14 |
15 | <% end %> 16 |
17 |
18 | <% end %> 19 | 20 | -------------------------------------------------------------------------------- /assets/partials/highlight_js.part: -------------------------------------------------------------------------------- 1 | --- html 2 | 3 | 7 | 8 | 9 | 10 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /assets/partials/disqus/combination.part: -------------------------------------------------------------------------------- 1 | --- html 2 | 3 | <% if config.disqus['shortname'] %> 4 | 5 | 6 | Powered by Disqus 7 | 8 | <% end %> 9 | 10 | -------------------------------------------------------------------------------- /index.page: -------------------------------------------------------------------------------- 1 | title : My First Brite Blog! 2 | layout: page 3 | 4 | --- html 5 | <% for post in site.posts %> 6 |
7 |
8 |
9 |
<%= post.date.strftime('%Y') %>
10 |
<%= post.date.strftime('%m-%d') %>
11 |
12 | <%= post.title %> 13 |
14 | <%= post.summary %> 15 | 16 |
17 |
18 | <% end %> 19 | 20 | 21 | -------------------------------------------------------------------------------- /assets/partials/disqus/counter.part: -------------------------------------------------------------------------------- 1 | --- html 2 | 3 | 4 | 18 | 19 | -------------------------------------------------------------------------------- /assets/styles/syntax.css: -------------------------------------------------------------------------------- 1 | .Syntax .normal { color: #111; } 2 | .Syntax .comment { color: #005; font-style: italic; } 3 | .Syntax .keyword { color: #A44; font-weight: bold; } 4 | .Syntax .method { color: #44f; } 5 | .Syntax .class { color: #0c4; } 6 | .Syntax .module { color: #050; } 7 | .Syntax .punct { color: #668; font-weight: bold; } 8 | .Syntax .symbol { color: #220; } 9 | .Syntax .string { color: #4f4; } 10 | .Syntax .char { color: #F07; } 11 | .Syntax .ident { color: #111; } 12 | .Syntax .constant { color: #0c4; } 13 | .Syntax .regex { color: #B66; background: #FEF; } 14 | .Syntax .number { color: #F99; } 15 | .Syntax .attribute { color: #fc4; } 16 | .Syntax .global { color: #7FB; } 17 | .Syntax .expr { color: #227; } 18 | .Syntax .escape { color: #277; } 19 | 20 | -------------------------------------------------------------------------------- /atom.page: -------------------------------------------------------------------------------- 1 | layout : false 2 | extension : xml 3 | 4 | --- html 5 | 6 | 7 | 8 | Transcode Blog 9 | 10 | 11 | {{ site.time | date_to_xmlschema }} 12 | {{ site.url }} 13 | 14 | {% for post in site.posts %} 15 | 16 | {{ post.title | xml_escape }} 17 | 18 | {{ post.date | date_to_xmlschema }} 19 | {{ site.url }}{{ post.id }} 20 | 21 | {{ post.summary | xml_escape }} 22 | [Read More] 23 | 24 | 25 | {% endfor %} 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /assets/layouts/post.layout: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | layout: main 4 | 5 | --- html 6 | 7 |
8 |
9 |
<%= date.strftime('%Y') %>
10 |
<%= date.strftime('%m-%d') %>
11 |
12 | <%= title %> 13 |
14 | 15 | <%= content %> 16 | 17 | Written by <%= author %>, <%= date %> 18 | 19 |
20 | <% if p = previous_post %> 21 | << Back <%= p.date %> <%= p.title %> 22 | <% end %> 23 | · 24 | <% if p = next_post %> 25 | Next <%= p.date %> <%= p.title %> » 26 | <% end %> 27 |
28 | 29 |
30 | <%= part 'disqus/comments' %> 31 |
32 | 33 | -------------------------------------------------------------------------------- /brite.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # default author name 3 | author: Anonymous 4 | 5 | # site's absolute url; generally not used, but needed in some cases 6 | url: http://___URL___.com 7 | 8 | # default template engine/format 9 | stencil : rhtml 10 | 11 | # default section format 12 | format : html 13 | 14 | # layout to use for pages 15 | page_layout : page 16 | 17 | # layout to use for posts 18 | post_layout : post 19 | 20 | # location to save pages 21 | page_route : ":path" 22 | 23 | # location to save posts 24 | post_route : ":path" 25 | 26 | # where to find layout files 27 | layout_path : assets/layouts 28 | 29 | # where to find partials files 30 | partial_path : assets/partials 31 | 32 | # google analytics plugin 33 | google_analytics: UA-2883355-2 34 | 35 | # fill in shortname for disqus 36 | disqus: 37 | shortname: ~ 38 | num_items: 5 39 | hide_mods: 0 40 | color: blue 41 | default_tab: people 42 | excerpt_length: 200 43 | 44 | -------------------------------------------------------------------------------- /assets/partials/disqus/comments.part: -------------------------------------------------------------------------------- 1 | --- html 2 | 3 | <% if config.disqus['shortname'] %> 4 | 5 |
6 | 17 | 18 | blog comments powered by Disqus 19 | 20 | <% end %> 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Brite Site 2 | 3 | This repository provides a good starting point for creating a website with blog 4 | using [Brite](http://rubyworks.github.com/brite), the static website generator. 5 | 6 | The site files are organized neatly with all site assets in an `assets` 7 | directory. 8 | 9 | Layouts are in `assets/layouts`. You will surely want to edit those files 10 | first thing. 11 | 12 | An atom feed template is provided, though it probably needs a little fine-tuning 13 | yet. 14 | 15 | The `tags.page` provides a page of links to the rest of you site, divided into 16 | tag categories. 17 | 18 | While the site organization as given is nice and neat, Brite is flexible, so 19 | reorganize it to your hearts content. 20 | 21 | To learn more, head over to the main [Brite](http://rubyworks.github.com/brite) 22 | website. 23 | 24 | 25 | ## Copyrights 26 | 27 | Brite (c) 2011 Rubyworks 28 | 29 | These template files are made available to you without license, but Rubyworks 30 | would appreciate the shout-out if you make use of them. Thanks. 31 | 32 | Some fo the files included in this scaffolding may be copyrigted by others, 33 | be sure to check out the various files for details. 34 | 35 | -------------------------------------------------------------------------------- /assets/styles/print.css: -------------------------------------------------------------------------------- 1 | body { 2 | line-height:1.5; 3 | font-family:"Helvetica Neue", "Lucida Grande", Arial, Verdana, sans-serif; 4 | color:#000; 5 | background:none; 6 | font-size:10pt; 7 | } 8 | 9 | .container { 10 | background:none; 11 | } 12 | 13 | h1,h2,h3,h4,h5,h6 { 14 | font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif; 15 | } 16 | 17 | code { 18 | font:.9em "Courier New", Monaco, Courier, monospace; 19 | } 20 | 21 | img { 22 | float:left; 23 | margin:1.5em 1.5em 1.5em 0; 24 | } 25 | 26 | a img { 27 | border:none; 28 | } 29 | 30 | p img.top { 31 | margin-top:0; 32 | } 33 | 34 | hr { 35 | background:#ccc; 36 | color:#ccc; 37 | width:100%; 38 | height:2px; 39 | border:none; 40 | margin:2em 0; 41 | padding:0; 42 | } 43 | 44 | blockquote { 45 | font-style:italic; 46 | font-size:.9em; 47 | margin:1.5em; 48 | padding:1em; 49 | } 50 | 51 | .small { 52 | font-size:.9em; 53 | } 54 | 55 | .large { 56 | font-size:1.1em; 57 | } 58 | 59 | .quiet { 60 | color:#999; 61 | } 62 | 63 | .hide { 64 | display:none; 65 | } 66 | 67 | a:link,a:visited { 68 | background:transparent; 69 | font-weight:700; 70 | text-decoration:underline; 71 | } 72 | 73 | a:link:after,a:visited:after { 74 | content:" (" attr(href) ") "; 75 | font-size:90%; 76 | } -------------------------------------------------------------------------------- /2012/01-01-example.post: -------------------------------------------------------------------------------- 1 | title : My First Post 2 | date : 2012-01-01 3 | tags : first 4 | layout : post 5 | 6 | --- markdown 7 | This is a sample post. In this section you use markdown formated text 8 | b/c that is what we specified after the seciton marker '---'. You could 9 | have used *textile*, *rdoc* or *html* too. Other sections type are 10 | supported as well. For instance the following section is a *coderay.ruby* 11 | section. 12 | 13 | --- coderay.ruby 14 | puts "Yea for Brite!" 15 | 16 | --- markdown 17 | You can of course editing the documents in this scaffolding 18 | to suit your needs. What's offered here is just a general 19 | layout to help get you started. 20 | 21 | A few things to notice: 22 | 23 | * General configuration of Brite is done in the 24 | `brite.yaml` file. 25 | 26 | * Posts do not need to be under year directories, 27 | they just need to end in `.post`. But it is a nice 28 | place to put them. 29 | 30 | * The `atom.page` file actually generates `atom.xml` not 31 | atom.html becuase of a YAML front matter setting. 32 | 33 | * The .rsync-filter file is designed to be used with 34 | rsync when uploading your website. Delete it if you 35 | will not be using rsync, or edit it to suit your host. 36 | 37 | Brite still needs development to reach it's full potential. 38 | Please consider contributing at [GitHub](http://github/rubyworks/brite) 39 | 40 | That's it for now. Enjoy! 41 | 42 | -------------------------------------------------------------------------------- /assets/styles/reset.css: -------------------------------------------------------------------------------- 1 | /* -------------------------------------------------------------- 2 | 3 | reset.css 4 | * Resets default browser CSS. 5 | 6 | Based on work by Eric Meyer: 7 | * meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/ 8 | 9 | -------------------------------------------------------------- */ 10 | 11 | html, body, div, span, object, iframe, 12 | h1, h2, h3, h4, h5, h6, 13 | a, img, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td { 15 | margin: 0; padding: 0; border: 0; 16 | font-weight: inherit; font-style: inherit; 17 | font-family: inherit; font-size: 100%; 18 | /* vertical-align: baseline; */ 19 | } 20 | 21 | body { 22 | line-height: 1.5; 23 | background: #fff; 24 | } 25 | 26 | table { 27 | border-collapse: separate; 28 | border-spacing: 0; 29 | } 30 | 31 | caption, th, td { 32 | text-align: left; 33 | } 34 | 35 | q:before, q:after { 36 | content:''; 37 | } 38 | 39 | p { 40 | text-align: justify; 41 | padding: 0.2em 0; 42 | } 43 | 44 | pre { 45 | font-family: monospace; 46 | font-size: 0.9em; 47 | 48 | } 49 | 50 | blockquote { 51 | font-style: italic; 52 | } 53 | 54 | /* 55 | body { 56 | text-align: center; 57 | font-family: sans-serif; 58 | font-size: 10pt; 59 | } 60 | 61 | h1 { 62 | margin-top: 30px; 63 | } 64 | 65 | a { 66 | color: #ff7000; 67 | font-weight: bold; 68 | } 69 | 70 | td { 71 | font-size: 10pt; 72 | padding: 5px; 73 | vertical-align: top; 74 | } 75 | 76 | */ 77 | 78 | -------------------------------------------------------------------------------- /assets/layouts/main.layout: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | --- html 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | <%= title %> 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 |
58 | 59 | 66 | 67 | 76 | 77 |
78 |
79 | <%= content %> 80 |
81 |
82 | 83 |
84 | 85 | 91 | 92 | <%= part 'google/analytics' %> 93 | 94 | 95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /assets/styles/custom.css: -------------------------------------------------------------------------------- 1 | /* TAGS */ 2 | 3 | body { 4 | margin: 0; padding: 0; 5 | font-size: 11pt; font-family: sans-serif, Arial; 6 | } 7 | 8 | a { 9 | text-decoration: none; 10 | color: #ff4455; 11 | } 12 | 13 | a:hover { 14 | color: #ff4455; 15 | } 16 | 17 | h1,h2,h3,h4,h5,h6 { 18 | font-family: sans-serif, Arial; font-weight: bold; 19 | } 20 | 21 | h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { 22 | text-decoration: none; 23 | } 24 | 25 | h1 { font-size: 1.9em; line-height: 1; margin: 0.50em 0; } 26 | h2 { font-size: 1.5em; margin: 0.75em 0; } 27 | h3 { font-size: 1.3em; line-height: 1; margin: 1.00em 0; } 28 | h4 { font-size: 1.2em; line-height: 1.25; margin: 1.25em 0; } 29 | h5 { font-size: 1.0em; font-weight: bold; margin: 0 0 1.5em 0; } 30 | h6 { font-size: 1.0em; font-weight: bold; } 31 | 32 | h1,h2 { 33 | padding-top: 10px; 34 | } 35 | 36 | h1:first-child { 37 | padding-top: 5px; 38 | } 39 | 40 | p { 41 | font-family: times; 42 | line-height: 1.5em; 43 | color: #222; 44 | } 45 | 46 | li p { 47 | line-height: 1.2em; 48 | } 49 | 50 | pre { 51 | padding: 1em 2em; 52 | } 53 | 54 | /* CLASSES */ 55 | 56 | .heading { font-size: 2em; } 57 | 58 | .heading .title { 59 | font-size: 1.4em; font-weight: bold; 60 | color: #ff4455; 61 | } 62 | 63 | .heading .title:hover { 64 | color: #2454ad; 65 | } 66 | 67 | .heading .date { 68 | margin-right: 1em; 69 | border: 1px solid #ccc; 70 | box-shadow: 5px 5px 5px #ccc; -moz-box-shadow: 5px 5px 5px #ccc; 71 | font-size: 0.6em; 72 | } 73 | .heading .date .year { background: url(/assets/images/bg.jpg) bottom; padding: 0 3px; text-align: center; } 74 | .heading .date .month { background: #fff; padding: 0 3px; text-align: center; } 75 | 76 | .inner { 77 | width: 720px; 78 | margin: 0 auto; 79 | } 80 | 81 | /* ID */ 82 | 83 | #container { 84 | } 85 | 86 | #header { 87 | height: 210px; 88 | background: url(/assets/images/bg.jpg) center repeat-x; 89 | position: relative; 90 | } 91 | 92 | #header .title { 93 | margin-bottom: 20px; 94 | } 95 | 96 | #header { 97 | color: white; 98 | } 99 | 100 | #header .title { 101 | height: 70px; padding: 60px 0; 102 | font-size: 5em; text-align:center; font-weight:bold; letter-spacing:10px; 103 | } 104 | 105 | #nav { 106 | width:100%; height:30px; 107 | font-size:12px; font-weight:bold; 108 | background:white; opacity:0.8; 109 | border: 1px solid #ccc; 110 | background: url(/assets/images/bg.jpg) bottom repeat-x; 111 | } 112 | 113 | #nav ul { 114 | margin:0; padding:0; 115 | list-style: none; 116 | } 117 | 118 | #nav li { 119 | width: 100px; float: left; 120 | height: 30px; border-left: 1px solid #ccc; border-right: 1px solid #ccc; 121 | line-height: 26px; text-align: center; 122 | } 123 | #nav li:hover { background: #000; color: #fff; } 124 | #nav li a { color: inherit; height: 30px; } 125 | 126 | #article { 127 | padding: 2em 0; 128 | } 129 | 130 | #post-nav { 131 | float: right; 132 | font-size: 0.8em; 133 | margin: 2em 0; 134 | } 135 | 136 | #comments { 137 | clear: both; 138 | margin: 2em 0; 139 | } 140 | 141 | #footer { 142 | padding: 2em; 143 | color:white; background:url(/assets/images/bg.jpg) center repeat-x; 144 | font-size:9px; font-weight:bold; 145 | } 146 | 147 | -------------------------------------------------------------------------------- /assets/styles/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css 2011-11-04T15:38 UTC - http://github.com/necolas/normalize.css */ 2 | 3 | /* ============================================================================= 4 | HTML5 display definitions 5 | ========================================================================== */ 6 | 7 | /* 8 | * Corrects block display not defined in IE6/7/8/9 & FF3 9 | */ 10 | 11 | article, 12 | aside, 13 | details, 14 | figcaption, 15 | figure, 16 | footer, 17 | header, 18 | hgroup, 19 | nav, 20 | section { 21 | display: block; 22 | } 23 | 24 | /* 25 | * Corrects inline-block display not defined in IE6/7/8/9 & FF3 26 | */ 27 | 28 | audio, 29 | canvas, 30 | video { 31 | display: inline-block; 32 | *display: inline; 33 | *zoom: 1; 34 | } 35 | 36 | /* 37 | * Prevents modern browsers from displaying 'audio' without controls 38 | */ 39 | 40 | audio:not([controls]) { 41 | display: none; 42 | } 43 | 44 | /* 45 | * Addresses styling for 'hidden' attribute not present in IE7/8/9, FF3, S4 46 | * Known issue: no IE6 support 47 | */ 48 | 49 | [hidden] { 50 | display: none; 51 | } 52 | 53 | 54 | /* ============================================================================= 55 | Base 56 | ========================================================================== */ 57 | 58 | /* 59 | * 1. Corrects text resizing oddly in IE6/7 when body font-size is set using em units 60 | * http://clagnut.com/blog/348/#c790 61 | * 2. Keeps page centred in all browsers regardless of content height 62 | * 3. Prevents iOS text size adjust after orientation change, without disabling user zoom 63 | * www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/ 64 | */ 65 | 66 | html { 67 | font-size: 100%; /* 1 */ 68 | overflow-y: scroll; /* 2 */ 69 | -webkit-text-size-adjust: 100%; /* 3 */ 70 | -ms-text-size-adjust: 100%; /* 3 */ 71 | } 72 | 73 | /* 74 | * Addresses margins handled incorrectly in IE6/7 75 | */ 76 | 77 | body { 78 | margin: 0; 79 | } 80 | 81 | /* 82 | * Addresses font-family inconsistency between 'textarea' and other form elements. 83 | */ 84 | 85 | body, 86 | button, 87 | input, 88 | select, 89 | textarea { 90 | font-family: sans-serif; 91 | } 92 | 93 | 94 | /* ============================================================================= 95 | Links 96 | ========================================================================== */ 97 | 98 | /* 99 | * Addresses outline displayed oddly in Chrome 100 | */ 101 | 102 | a:focus { 103 | outline: thin dotted; 104 | } 105 | 106 | /* 107 | * Improves readability when focused and also mouse hovered in all browsers 108 | * people.opera.com/patrickl/experiments/keyboard/test 109 | */ 110 | 111 | a:hover, 112 | a:active { 113 | outline: 0; 114 | } 115 | 116 | 117 | /* ============================================================================= 118 | Typography 119 | ========================================================================== */ 120 | 121 | /* 122 | * Neutralise smaller font-size in 'section' and 'article' in FF4+, Chrome, S5 123 | */ 124 | 125 | h1 { 126 | font-size: 2em; 127 | } 128 | 129 | /* 130 | * Addresses styling not present in IE7/8/9, S5, Chrome 131 | */ 132 | 133 | abbr[title] { 134 | border-bottom: 1px dotted; 135 | } 136 | 137 | /* 138 | * Addresses style set to 'bolder' in FF3+, S4/5, Chrome 139 | */ 140 | 141 | b, 142 | strong { 143 | font-weight: bold; 144 | } 145 | 146 | blockquote { 147 | margin: 1em 40px; 148 | } 149 | 150 | /* 151 | * Addresses styling not present in S5, Chrome 152 | */ 153 | 154 | dfn { 155 | font-style: italic; 156 | } 157 | 158 | /* 159 | * Addresses styling not present in IE6/7/8/9 160 | */ 161 | 162 | mark { 163 | background: #ff0; 164 | color: #000; 165 | } 166 | 167 | /* 168 | * Corrects font family set oddly in IE6, S4/5, Chrome 169 | * en.wikipedia.org/wiki/User:Davidgothberg/Test59 170 | */ 171 | 172 | pre, 173 | code, 174 | kbd, 175 | samp { 176 | font-family: monospace, serif; 177 | _font-family: 'courier new', monospace; 178 | font-size: 1em; 179 | } 180 | 181 | /* 182 | * Improves readability of pre-formatted text in all browsers 183 | */ 184 | 185 | pre { 186 | white-space: pre; 187 | white-space: pre-wrap; 188 | word-wrap: break-word; 189 | } 190 | 191 | /* 192 | * 1. Addresses CSS quotes not supported in IE6/7 193 | * 2. Addresses quote property not supported in S4 194 | */ 195 | 196 | /* 1 */ 197 | 198 | q { 199 | quotes: none; 200 | } 201 | 202 | /* 2 */ 203 | 204 | q:before, 205 | q:after { 206 | content: ''; 207 | content: none; 208 | } 209 | 210 | small { 211 | font-size: 75%; 212 | } 213 | 214 | /* 215 | * Prevents sub and sup affecting line-height in all browsers 216 | * gist.github.com/413930 217 | */ 218 | 219 | sub, 220 | sup { 221 | font-size: 75%; 222 | line-height: 0; 223 | position: relative; 224 | vertical-align: baseline; 225 | } 226 | 227 | sup { 228 | top: -0.5em; 229 | } 230 | 231 | sub { 232 | bottom: -0.25em; 233 | } 234 | 235 | 236 | /* ============================================================================= 237 | Lists 238 | ========================================================================== */ 239 | 240 | ul, 241 | ol { 242 | margin-left: 0; 243 | padding: 0 0 0 40px; 244 | } 245 | 246 | dd { 247 | margin: 0 0 0 40px; 248 | } 249 | 250 | nav ul, 251 | nav ol { 252 | list-style: none; 253 | list-style-image: none; 254 | } 255 | 256 | 257 | /* ============================================================================= 258 | Embedded content 259 | ========================================================================== */ 260 | 261 | /* 262 | * 1. Removes border when inside 'a' element in IE6/7/8/9, FF3 263 | * 2. Improves image quality when scaled in IE7 264 | * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ 265 | */ 266 | 267 | img { 268 | border: 0; /* 1 */ 269 | -ms-interpolation-mode: bicubic; /* 2 */ 270 | } 271 | 272 | /* 273 | * Corrects overflow displayed oddly in IE9 274 | */ 275 | 276 | svg:not(:root) { 277 | overflow: hidden; 278 | } 279 | 280 | 281 | /* ============================================================================= 282 | Figures 283 | ========================================================================== */ 284 | 285 | /* 286 | * Addresses margin not present in IE6/7/8/9, S5, O11 287 | */ 288 | 289 | figure { 290 | margin: 0; 291 | } 292 | 293 | 294 | /* ============================================================================= 295 | Forms 296 | ========================================================================== */ 297 | 298 | /* 299 | * Corrects margin displayed oddly in IE6/7 300 | */ 301 | 302 | form { 303 | margin: 0; 304 | } 305 | 306 | /* 307 | * Define consistent border, margin, and padding 308 | */ 309 | 310 | fieldset { 311 | border: 1px solid #c0c0c0; 312 | margin: 0 2px; 313 | padding: 0.35em 0.625em 0.75em; 314 | } 315 | 316 | /* 317 | * 1. Corrects color not being inherited in IE6/7/8/9 318 | * 2. Corrects alignment displayed oddly in IE6/7 319 | */ 320 | 321 | legend { 322 | border: 0; /* 1 */ 323 | *margin-left: -7px; /* 2 */ 324 | } 325 | 326 | /* 327 | * 1. Corrects font size not being inherited in all browsers 328 | * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome 329 | * 3. Improves appearance and consistency in all browsers 330 | */ 331 | 332 | button, 333 | input, 334 | select, 335 | textarea { 336 | font-size: 100%; /* 1 */ 337 | margin: 0; /* 2 */ 338 | vertical-align: baseline; /* 3 */ 339 | *vertical-align: middle; /* 3 */ 340 | } 341 | 342 | /* 343 | * Addresses FF3/4 setting line-height on 'input' using !important in the UA stylesheet 344 | */ 345 | 346 | button, 347 | input { 348 | line-height: normal; /* 1 */ 349 | } 350 | 351 | /* 352 | * 1. Improves usability and consistency of cursor style between image-type 'input' and others 353 | * 2. Corrects inability to style clickable 'input' types in iOS 354 | * 3. Removes inner spacing in IE7 without affecting normal text inputs 355 | * Known issue: inner spacing remains in IE6 356 | */ 357 | 358 | button, 359 | input[type="button"], 360 | input[type="reset"], 361 | input[type="submit"] { 362 | cursor: pointer; /* 1 */ 363 | -webkit-appearance: button; /* 2 */ 364 | *overflow: visible; /* 3 */ 365 | } 366 | 367 | /* 368 | * 1. Addresses box sizing set to content-box in IE8/9 369 | * 2. Removes excess padding in IE8/9 370 | */ 371 | 372 | input[type="checkbox"], 373 | input[type="radio"] { 374 | box-sizing: border-box; /* 1 */ 375 | padding: 0; /* 2 */ 376 | } 377 | 378 | /* 379 | * 1. Addresses appearance set to searchfield in S5, Chrome 380 | * 2. Addresses box-sizing set to border-box in S5, Chrome (include -moz to future-proof) 381 | */ 382 | 383 | input[type="search"] { 384 | -webkit-appearance: textfield; /* 1 */ 385 | -moz-box-sizing: content-box; 386 | -webkit-box-sizing: content-box; /* 2 */ 387 | box-sizing: content-box; 388 | } 389 | 390 | /* 391 | * Removes inner padding that is displayed in S5, Chrome on OS X 392 | */ 393 | 394 | input[type="search"]::-webkit-search-decoration { 395 | -webkit-appearance: none; 396 | } 397 | 398 | /* 399 | * Removes inner padding and border in FF3+ 400 | * www.sitepen.com/blog/2008/05/14/the-devils-in-the-details-fixing-dojos-toolbar-buttons/ 401 | */ 402 | 403 | button::-moz-focus-inner, 404 | input::-moz-focus-inner { 405 | border: 0; 406 | padding: 0; 407 | } 408 | 409 | /* 410 | * 1. Removes default vertical scrollbar in IE6/7/8/9 411 | * 2. Improves readability and alignment in all browsers 412 | */ 413 | 414 | textarea { 415 | overflow: auto; /* 1 */ 416 | vertical-align: top; /* 2 */ 417 | } 418 | 419 | 420 | /* ============================================================================= 421 | Tables 422 | ========================================================================== */ 423 | 424 | /* 425 | * Remove most spacing between table cells 426 | */ 427 | 428 | table { 429 | border-collapse: collapse; 430 | border-spacing: 0; 431 | } 432 | --------------------------------------------------------------------------------