html5-boilerplate 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,7 +3,7 @@ Compass Html5 Boilerplate
3
3
 
4
4
  HTML5 Boilerplate is a Compass extension based on HTML5 Boilerplate by Paul Irish.
5
5
  You can use it to kick-start fully compliant HTML5 applications. Generate either
6
- stand-alone Compass projects, or Rails applications with fully integrated
6
+ stand-alone HTML5 projects, or Rails applications with fully integrated HTML5
7
7
  Haml and Sass (Scss) templates.
8
8
 
9
9
  Browse [html5boilerplate.com](http://html5boilerplate.com) for the full workup.
@@ -28,8 +28,9 @@ Rails Installation
28
28
 
29
29
  app/stylesheets/style.scss
30
30
  app/stylesheets/handheld.scss
31
- app/stylesheets/partials/_base.scss
32
- app/stylesheets/partials/_html5_boilerplate.scss
31
+ app/stylesheets/partials/_defaults.scss
32
+ app/stylesheets/partials/_example.scss
33
+ app/stylesheets/partials/_page.scss
33
34
 
34
35
  public/404.html
35
36
  public/.htaccess
@@ -93,8 +94,9 @@ If you omit them, be sure to edit your javascript and style tags accordingly in
93
94
 
94
95
  src/style.scss
95
96
  src/handheld.scss
96
- src/partials/_base.scss
97
- src/partials/_html5_boilerplate.scss
97
+ src/partials/_defaults.scss
98
+ src/partials/_example.scss
99
+ src/partials/_page.scss
98
100
 
99
101
  js/dd_belatedpng.js
100
102
  js/jquery-1.4.2.min.js
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -1,13 +1,13 @@
1
1
  @import "html5-boilerplate/reset";
2
2
  @import "html5-boilerplate/fonts";
3
- @import "html5-boilerplate/page";
3
+ @import "html5-boilerplate/base";
4
4
  @import "html5-boilerplate/helpers";
5
5
  @import "html5-boilerplate/media";
6
6
 
7
7
  @mixin html5-boilerplate {
8
8
  @include html5-boilerplate-reset;
9
9
  @include html5-boilerplate-fonts;
10
- @include html5-boilerplate-page;
10
+ @include html5-boilerplate-base;
11
11
  @include html5-boilerplate-helpers;
12
12
  @include html5-boilerplate-media;
13
13
  }
@@ -1,63 +1,32 @@
1
1
  $font-color: #444 !default; //looks better than black: twitter.com/H_FJ/statuses/11800719859
2
-
3
2
  $link-color: #607890 !default;
4
-
5
3
  $link-hover-color: #036 !default;
6
-
7
4
  $link-active-color: #607890 !default;
8
-
9
5
  $link-visited-color: #607890 !default;
10
-
11
6
  $selected-font-color: #fff !default;
12
-
13
- $selected-background-color: #ff5e99 !default;
14
-
15
7
  $selected-background-color: #ff5e99 !default;
16
-
17
- $valid-input-background-color: #ddf0dd !default;
18
-
19
- $invalid-input-background-color: #f0dddd !default;
20
-
21
- $invalid-input-shadow-color: red !default;
22
-
23
-
24
- @import "compass/css3/border-radius";
25
- @import "compass/css3/box-shadow";
26
-
8
+ $list-left-margin: 1.8em !default;
27
9
 
28
10
  //
29
- // minimal base styles
11
+ // Minimal base styles
30
12
  //
31
13
 
32
- @mixin html5-boilerplate-page {
14
+ @mixin html5-boilerplate-base {
33
15
  body, select, input, textarea { color: $font-color; }
34
16
 
35
- h1, h2, h3, h4, h5, h6 { @include bold-font; }
36
-
37
- html {
38
- @include force-scrollbar;
39
- }
17
+ html { @include force-scrollbar; }
40
18
 
41
19
  a, a:active, a:visited { color: $link-color; }
42
20
  a:hover { color: $link-hover-color; }
43
21
 
44
- ul, ol { margin-left: 1.8em; }
22
+ ul, ol { margin-left: $list-left-margin; }
45
23
  ol { list-style-type: decimal; }
46
24
 
47
- small { @include small-font; }
48
- strong, th { @include bold-font; }
49
-
50
25
  td, td img { vertical-align: top; }
51
26
 
52
- sub { vertical-align: sub; font-size: smaller; }
53
- sup { vertical-align: super; font-size: smaller; }
54
-
55
- input:valid {
56
- @include valid-input;
57
- }
58
- input:invalid {
59
- @include invalid-input;
60
- }
27
+ sub { @include sub; }
28
+
29
+ sup { @include sup; }
61
30
 
62
31
  @include accessible-focus;
63
32
 
@@ -74,9 +43,12 @@ $invalid-input-shadow-color: red !default;
74
43
  @include ie-hacks;
75
44
  }
76
45
 
77
- // maxvoltar.com/archive/-webkit-font-smoothing
78
- @mixin font-smoothing {
79
- -webkit-font-smoothing: antialiased;
46
+ @mixin sub{
47
+ vertical-align: sub; font-size: smaller;
48
+ }
49
+
50
+ @mixin sup{
51
+ vertical-align: super; font-size: smaller;
80
52
  }
81
53
 
82
54
  // Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test
@@ -84,14 +56,6 @@ $invalid-input-shadow-color: red !default;
84
56
  a:hover, a:active { outline: none; }
85
57
  }
86
58
 
87
- @mixin small-font {
88
- font-size: 85%;
89
- }
90
-
91
- @mixin bold-font {
92
- font-weight: bold;
93
- }
94
-
95
59
  // www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/
96
60
  @mixin quoted-pre {
97
61
  pre {
@@ -117,14 +81,6 @@ $invalid-input-shadow-color: red !default;
117
81
  label, input[type=button], input[type=submit], button { cursor: pointer; }
118
82
  }
119
83
 
120
- // colors for form validity
121
- @mixin valid-input {
122
- }
123
- @mixin invalid-input {
124
- @include border-radius(1px);
125
- @include box-shadow($invalid-input-shadow-color, 0, 0, 5px, 0);
126
- }
127
-
128
84
  // These selection declarations have to be separate.
129
85
  // No text-shadow: twitter.com/miketaylr/status/12228805301
130
86
  // Also: hot pink.
@@ -1,21 +1,53 @@
1
+ $base-font-family: unquote("sans-serif") !default;
2
+ $base-font-size: 13px !default;
3
+ $base-line-height: 1.231 !default;
4
+
1
5
  //
2
- // fonts.css from the YUI Library: developer.yahoo.com/yui/
3
- // Please refer to developer.yahoo.com/yui/fonts/ for font sizing percentages
6
+ // fonts.css from the YUI Library: developer.yahoo.com/yui/fonts
4
7
  //
5
8
  // There are two custom edits:
6
9
  // * remove arial, helvetica from explicit font stack
7
10
  // * we normalize monospace styles ourselves
8
11
  //
12
+ // Whatever parts of this port of YUI to Sass that are copyrightable, are Copyright (c) 2008, Christopher Eppstein. All Rights Reserved.
13
+ //
9
14
 
10
- @mixin html5-boilerplate-fonts {
11
- body { font:13px/1.231 sans-serif; *font-size:small; } // hack retained to preserve specificity
15
+ @mixin html5-boilerplate-fonts($family: $base-font-family, $size: $base-font-size, $line-height: $base-line-height) {
16
+ body {
17
+ font-size: $size;
18
+ font-family: $family;
19
+ line-height: $line-height; // hack retained to preserve specificity
20
+ *font-size: small;
21
+ }
12
22
 
13
- table { font-size:inherit; font: 100%; }
23
+ table { font-size: inherit; font: 100%; }
14
24
 
15
- select, input, textarea, button { font:99% sans-serif; }
25
+ select, input, textarea, button { font: 99% $family; }
16
26
 
17
27
  // normalize monospace sizing
18
28
  // meyerweb.com/eric/thoughts/2010/02/12/fixed-monospace-sizing/
19
29
  // en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome
20
30
  pre, code, kbd, samp { font-family: monospace, sans-serif; }
21
31
  }
32
+
33
+ // maxvoltar.com/archive/-webkit-font-smoothing
34
+ @mixin font-smoothing {
35
+ -webkit-font-smoothing: antialiased;
36
+ }
37
+
38
+ // Sets the font size specified in pixels using percents so that the base
39
+ // font size changes and 1em has the correct value. When nesting font size
40
+ // declarations, within the DOM tree, the base_font_size must be the parent's
41
+ // effective font-size in pixels.
42
+ // Usage Examples:
43
+ // .big
44
+ // +font-size(16px)
45
+ // .bigger
46
+ // +font-size(18px)
47
+ // .big .bigger
48
+ // +font-size(18px, 16px)
49
+ //
50
+ // For more information see the table found at http://developer.yahoo.com/yui/fonts/#fontsize
51
+ @mixin font-size($size, $base-font-size: $base-font-size) {
52
+ font-size: percentage($size / $base-font-size);
53
+ }
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  @media screen and (max-device-width: 480px) {
15
- @include media-mobile(false);
15
+ @include media-mobile;
16
16
  }
17
17
  }
18
18
 
@@ -60,6 +60,7 @@
60
60
  @mixin media-mobile($optimize: true) {
61
61
  // j.mp/textsizeadjust
62
62
  @if not $optimize {
63
+ // don't allow iOS and WinMobile to mobile-optimize text
63
64
  html { -webkit-text-size-adjust:none; -ms-text-size-adjust:none; }
64
65
  }
65
66
  }
@@ -1,2 +1,2 @@
1
- .copyright
1
+ %small.copyright
2
2
  Copyright © #{Date.today.year}, All rights reserved.
@@ -2,8 +2,9 @@ description "Compass extention for HTML5 Boilerplate located at http://html5boil
2
2
 
3
3
  stylesheet 'style.scss', :media => 'screen, projection'
4
4
  stylesheet 'handheld.scss', :media => 'handheld'
5
- stylesheet 'partials/_base.scss'
6
- stylesheet 'partials/_html5_boilerplate.scss'
5
+ stylesheet 'partials/_defaults.scss'
6
+ stylesheet 'partials/_example.scss'
7
+ stylesheet 'partials/_page.scss'
7
8
 
8
9
  if Compass.configuration.project_type == :rails
9
10
  file 'application.html.haml', :to => 'app/views/layouts/application.html.haml'
@@ -1,4 +1,10 @@
1
- // This file must be imported before html5-boilerplate/page
1
+ // This file must be imported before loading html5-boilerplate
2
+
3
+ $base-font-family: unquote('sans-serif');
4
+
5
+ $base-font-size: 13px;
6
+
7
+ $base-line-height: 1.231;
2
8
 
3
9
  $font-color: #444;
4
10
 
@@ -14,8 +20,4 @@ $selected-font-color: #fff;
14
20
 
15
21
  $selected-background-color: #FF5E99;
16
22
 
17
- $valid-input-background-color: #ddf0dd;
18
-
19
- $invalid-input-background-color: #f0dddd;
20
-
21
- $invalid-input-shadow-color: red;
23
+ $list-left-margin: 1.8em;
@@ -1,46 +1,33 @@
1
1
  //--------------------------------
2
- // Reset
2
+ // CSS Reset
3
3
  //--------------------------------
4
4
  @include html5-boilerplate-reset;
5
5
 
6
6
 
7
7
  //--------------------------------
8
- // Fonts
8
+ // Base Fonts
9
9
  //--------------------------------
10
- @include html5-boilerplate-fonts;
10
+ @include html5-boilerplate-fonts($base-font-family, $base-font-size, $base-line-height);
11
11
 
12
12
 
13
13
  //--------------------------------
14
- // Page
14
+ // Minimal Base Styles
15
15
  //--------------------------------
16
16
  body, select, input, textarea { color: $font-color; }
17
17
 
18
- h1, h2, h3, h4, h5, h6 { @include bold-font; }
19
-
20
- html {
21
- @include force-scrollbar;
22
- }
18
+ html { @include force-scrollbar; }
23
19
 
24
20
  a, a:active, a:visited { color: $link-color; }
25
21
  a:hover { color: $link-hover-color; }
26
22
 
27
- ul { margin-left: 30px; }
28
- ol { margin-left: 30px; list-style-type: decimal; }
29
-
30
- small { @include small-font; }
31
- strong, th { @include bold-font; }
23
+ ul, ol { margin-left: $list-left-margin; }
24
+ ol { list-style-type: decimal; }
32
25
 
33
26
  td, td img { vertical-align: top; }
34
27
 
35
- sub { vertical-align: sub; font-size: smaller; }
36
- sup { vertical-align: super; font-size: smaller; }
28
+ sub { @include sub; }
37
29
 
38
- input:valid {
39
- @include valid-input;
40
- }
41
- input:invalid {
42
- @include invalid-input;
43
- }
30
+ sup { @include sup; }
44
31
 
45
32
  @include accessible-focus;
46
33
 
@@ -0,0 +1,43 @@
1
+ @import "compass/css3";
2
+
3
+ //-----------------------------------------------
4
+ // The following html5-boilerplate styles should
5
+ // probably be customized for each site
6
+ //-----------------------------------------------
7
+
8
+ h1, h2, h3, h4, h5, h6 {
9
+ // This might not be the best choice if you are
10
+ // embedding font faces that are already bold
11
+ font-weight: bold;
12
+ }
13
+
14
+ strong, th {
15
+ font-weight: bold;
16
+ }
17
+
18
+ small {
19
+ @include font-size(11px); // This is approx 85%
20
+ }
21
+
22
+ // Add the 'required' attribute on your
23
+ // inputs if you want to use these
24
+ input:valid {}
25
+ input:invalid {
26
+ @include border-radius(1px);
27
+ @include box-shadow(red, 0, 0, 5px, 0);
28
+ }
29
+
30
+
31
+ //-----------------------------------
32
+ // Add your own custom styles below
33
+ //-----------------------------------
34
+
35
+ body {}
36
+
37
+ #container {}
38
+
39
+ header {}
40
+
41
+ #main {}
42
+
43
+ footer {}
@@ -1,22 +1,25 @@
1
1
  // First, set some default constants
2
2
  // to be used by html5-boilerplate
3
- @import "partials/base";
3
+ @import "partials/defaults";
4
4
 
5
5
  // Then, we'll import the compass extension
6
6
  @import "html5-boilerplate";
7
7
 
8
- // Now you can choose to include the
9
- // whole enchilada with just one line
8
+ // Now you can choose to include the whole
9
+ // enchilada by uncommeting this line
10
10
  //@include html5-boilerplate;
11
11
 
12
12
  // Or, you can pick and choose only the
13
13
  // sections you want to include
14
14
  //@include html5-boilerplate-reset;
15
15
  //@include html5-boilerplate-fonts;
16
- //@include html5-boilerplate-page;
16
+ //@include html5-boilerplate-base;
17
17
  //@include html5-boilerplate-helpers;
18
18
  //@include html5-boilerplate-media;
19
19
 
20
- // Or, you can import this partial if you want
21
- // full controll over which mixins to include
22
- @import "partials/html5_boilerplate";
20
+ // Or else, you can import this partial if you
21
+ // want more controll over which mixins to use
22
+ @import "partials/example";
23
+
24
+ // Finally, put your own styles in this partial
25
+ @import "partials/page";
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - Peter Gumeson
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-27 00:00:00 -07:00
17
+ date: 2010-08-29 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -47,11 +47,11 @@ files:
47
47
  - templates/project/files/htaccess
48
48
  - lib/html5-boilerplate.rb
49
49
  - stylesheets/_html5-boilerplate.scss
50
+ - stylesheets/html5-boilerplate/_base.scss
50
51
  - stylesheets/html5-boilerplate/_fonts.scss
51
52
  - stylesheets/html5-boilerplate/_handheld.scss
52
53
  - stylesheets/html5-boilerplate/_helpers.scss
53
54
  - stylesheets/html5-boilerplate/_media.scss
54
- - stylesheets/html5-boilerplate/_page.scss
55
55
  - stylesheets/html5-boilerplate/_reset.scss
56
56
  - templates/project/_flashes.html.haml
57
57
  - templates/project/_footer.html.haml
@@ -79,8 +79,9 @@ files:
79
79
  - templates/project/javascripts/profiling/yahoo-profiling.min.js
80
80
  - templates/project/javascripts/rails.js
81
81
  - templates/project/manifest.rb
82
- - templates/project/partials/_base.scss
83
- - templates/project/partials/_html5_boilerplate.scss
82
+ - templates/project/partials/_defaults.scss
83
+ - templates/project/partials/_example.scss
84
+ - templates/project/partials/_page.scss
84
85
  - templates/project/style.scss
85
86
  has_rdoc: true
86
87
  homepage: http://github.com/sporkd/compass-html5-boilerplate