Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  Version Bump.
  Update changelog for 0.11.5
  Reset only the block HTML elements #339
  fix warning logic in vertical-rhythms module

Conflicts:
	VERSION.yml
  • Loading branch information
chriseppstein committed Jul 11, 2011
2 parents 6c12749 + 04800af commit 5ac72d5
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 36 deletions.
9 changes: 9 additions & 0 deletions doc-src/content/CHANGELOG.markdown
Expand Up @@ -14,6 +14,15 @@ The Documentation for the [latest stable release](http://compass-style.org/docs/

The Documentation for the [latest preview release](http://beta.compass-style.org/)

0.11.5 (07/10/2011)
-------------------

* Updated the list of elements returned by the `elements-of-type()` helper.
It now understands `html5-block` and `html5-inline` and other types now
return html5 elements in them by default.
* Fix warning logic in vertical-rhythms module.
* Fix typo in the css3/transition module.

0.11.4 (07/03/2011)
-------------------

Expand Down
Expand Up @@ -17,7 +17,7 @@
form, label, legend,
caption, tbody, tfoot, thead, tr { @include blueprint-basic-reset; }
#{headers(all)} { @include blueprint-basic-reset(bp-reset-element); }
#{elements-of-type(html5)} { @include blueprint-reset-html5-element(bp-reset-element); }
#{elements-of-type(html5-block)} { @include blueprint-reset-html5-element(bp-reset-element); }
blockquote, q { @include blueprint-reset-quotation(bp-reset-element); }
th, td, caption { @include blueprint-reset-table-cell(bp-reset-element); }
table { @include blueprint-reset-table(bp-reset-element); }
Expand Down
Expand Up @@ -105,7 +105,7 @@
// so they are rendered correctly in browsers that don't recognize them
// and reset in browsers that have default styles for them.
@mixin reset-html5 {
article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
#{elements-of-type(html5-block)} {
@include reset-box-model;
display: block; } }

Expand Down
5 changes: 2 additions & 3 deletions frameworks/compass/stylesheets/compass/reset/_utilities.scss
Expand Up @@ -107,12 +107,11 @@
border: none; }

// Unrecognized elements are displayed inline.
// This reset provides a basic reset for html5 elements
// This reset provides a basic reset for block html5 elements
// so they are rendered correctly in browsers that don't recognize them
// and reset in browsers that have default styles for them.
@mixin reset-html5 {
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
#{elements-of-type(html5-block)} {
display: block; } }

// Resets the display of inline and block elements to their default display
Expand Down
Expand Up @@ -68,15 +68,15 @@ $base-half-leader: $base-leader / 2;
// to the smallest integer that is large enough to fit the font.
// Use $from_size to adjust from a non-base font-size.
@mixin adjust-font-size-to($to-size, $lines: lines-for-font-size($to-size), $from-size: $base-font-size) {
@if $relative-font-sizing and $from-size != $base-font-size {
@if not $relative-font-sizing and $from-size != $base-font-size {
@warn "$relative-font-sizing is false but a relative font size was passed to adjust-font-size-to";
}
font-size: $font-unit * $to-size / $from-size;
@include adjust-leading-to($lines, if($relative-font-sizing, $to-size, $base-font-size));
}

@mixin adjust-leading-to($lines, $font-size: $base-font-size) {
@if $relative-font-sizing and $font-size != $base-font-size {
@if not $relative-font-sizing and $font-size != $base-font-size {
@warn "$relative-font-sizing is false but a relative font size was passed to adjust-leading-to";
}
line-height: $font-unit * $lines * $base-line-height / $font-size;
Expand All @@ -87,7 +87,7 @@ $base-half-leader: $base-leader / 2;
$lines: 1,
$font-size: $base-font-size
) {
@if $relative-font-sizing and $font-size != $base-font-size {
@if not $relative-font-sizing and $font-size != $base-font-size {
@warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function";
}
$rhythm: $font-unit * $lines * $base-line-height / $font-size;
Expand Down Expand Up @@ -151,7 +151,7 @@ $base-half-leader: $base-leader / 2;

// Apply a border width to any side without destroying the vertical rhythm
@mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
@if $relative-font-sizing and $font-size != $base-font-size {
@if not $relative-font-sizing and $font-size != $base-font-size {
@warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border";
}
border-#{$side}: {
Expand All @@ -163,7 +163,7 @@ $base-half-leader: $base-leader / 2;

// Aplly rhythm borders equally to all sides
@mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
@if $relative-font-sizing and $font-size != $base-font-size {
@if not $relative-font-sizing and $font-size != $base-font-size {
@warn "$relative-font-sizing is false but a relative font size was passed to rhythm-borders";
}
border: {
Expand Down
21 changes: 11 additions & 10 deletions lib/compass/sass_extensions/functions/display.rb
@@ -1,25 +1,26 @@
module Compass::SassExtensions::Functions::Display
DEFAULT_DISPLAY = {
:block => %w{address blockquote center dir div dd dl dt fieldset form
frameset h1 h2 h3 h4 h5 h6 hr isindex menu noframes
noscript ol p pre ul
article aside dialog figure footer header hgroup nav section},
:inline => %w{a abbr acronym b basefont bdo big br cite code dfn em
font i img input kbd label q s samp select small span
strike strong sub sup textarea tt u var},
:block => %w{address article aside blockquote center dir div dd details dl dt fieldset
figcaption figure form footer frameset h1 h2 h3 h4 h5 h6 hr header hgroup
isindex menu nav noframes noscript ol p pre section summary ul},
:inline => %w{a abbr acronym audio b basefont bdo big br canvas cite code command
datalist dfn em embed font i img input keygen kbd label mark meter output
progress q rp rt ruby s samp select small span strike strong sub
sup textarea time tt u var video wbr},
:table => %w{table},
:"list-item" => %w{li},
:"table-row-group" => %w{tbody},
:"table-header-group" => %w{thead},
:"table-footer-group" => %w{tfoot},
:"table-row" => %w{tr},
:"table-cell" => %w{th td},
:html5 => %w{article aside dialog figure footer header hgroup nav section}
:"html5-block" => %w{article aside details figcaption figure footer header hgroup menu nav section summary},
:"html5-inline" => %w{audio canvas command datalist embed keygen mark meter output progress rp rt ruby time video wbr},
}

DEFAULT_DISPLAY[:html5] = (DEFAULT_DISPLAY[:"html5-block"] + DEFAULT_DISPLAY[:"html5-inline"]).sort
# returns a comma delimited string for all the
# elements according to their default css3 display value.
def elements_of_type(display)
Sass::Script::String.new(DEFAULT_DISPLAY.fetch(display.value.to_sym).join(", "))
end
end
end
3 changes: 1 addition & 2 deletions test/fixtures/stylesheets/blueprint/css/screen.css
Expand Up @@ -42,8 +42,7 @@ q, blockquote {
a img {
border: none; }

article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block; }

body {
Expand Down
Expand Up @@ -3,7 +3,7 @@ html {
padding: 0;
border: 0; }

.bp-reset-element, body, h1, h2, h3, h4, h5, h6, article, aside, dialog, figure, footer, header, hgroup, nav, section, blockquote, q, th, td, caption, table, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing dialog, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing nav, body.testing section, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table, div, span, object, iframe, p, pre, a, abbr, acronym, address, code, del, dfn, em, img, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
.bp-reset-element, body, h1, h2, h3, h4, h5, h6, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, blockquote, q, th, td, caption, table, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing details, body.testing figcaption, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing menu, body.testing nav, body.testing section, body.testing summary, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table, div, span, object, iframe, p, pre, a, abbr, acronym, address, code, del, dfn, em, img, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
margin: 0;
padding: 0;
border: 0;
Expand All @@ -13,7 +13,7 @@ html {
font-family: inherit;
vertical-align: baseline; }

article, aside, dialog, figure, footer, header, hgroup, nav, section {
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block; }

blockquote, q {
Expand All @@ -35,7 +35,7 @@ table {
a img {
border: none; }

body.testing .bp-reset-element, body.testing body, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing dialog, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing nav, body.testing section, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing dialog, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing nav, body.testing section, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table,
body.testing .bp-reset-element, body.testing body, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing details, body.testing figcaption, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing menu, body.testing nav, body.testing section, body.testing summary, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table, body.testing h1, body.testing h2, body.testing h3, body.testing h4, body.testing h5, body.testing h6, body.testing article, body.testing aside, body.testing details, body.testing figcaption, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing menu, body.testing nav, body.testing section, body.testing summary, body.testing blockquote, body.testing q, body.testing th, body.testing td, body.testing caption, body.testing table,
body.testing div, body.testing span, body.testing object, body.testing iframe, body.testing p,
body.testing pre, body.testing a, body.testing abbr, body.testing acronym, body.testing address,
body.testing code, body.testing del, body.testing dfn, body.testing em, body.testing img,
Expand All @@ -50,7 +50,7 @@ body.testing caption, body.testing tbody, body.testing tfoot, body.testing thead
font-size: 100%;
font-family: inherit;
vertical-align: baseline; }
body.testing article, body.testing aside, body.testing dialog, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing nav, body.testing section {
body.testing article, body.testing aside, body.testing details, body.testing figcaption, body.testing figure, body.testing footer, body.testing header, body.testing hgroup, body.testing menu, body.testing nav, body.testing section, body.testing summary {
display: block; }
body.testing blockquote, body.testing q {
quotes: "" ""; }
Expand Down
Expand Up @@ -3,7 +3,7 @@ html {
padding: 0;
border: 0; }

.bp-reset-element, body, h1, h2, h3, h4, h5, h6, article, aside, dialog, figure, footer, header, hgroup, nav, section, blockquote, q, th, td, caption, table,
.bp-reset-element, body, h1, h2, h3, h4, h5, h6, article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, blockquote, q, th, td, caption, table,
div, span, object, iframe, p,
pre, a, abbr, acronym, address,
code, del, dfn, em, img,
Expand All @@ -19,7 +19,7 @@ caption, tbody, tfoot, thead, tr {
font-family: inherit;
vertical-align: baseline; }

article, aside, dialog, figure, footer, header, hgroup, nav, section {
article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
display: block; }

blockquote, q {
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/stylesheets/compass/css/print.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ac72d5

Please sign in to comment.