Removed the deprecated API for passing body selectors to the blueprint mixins.

This commit is contained in:
Chris Eppstein 2010-05-12 18:01:33 -07:00
parent db200c0bba
commit 0783761178
6 changed files with 38 additions and 85 deletions

View File

@ -26,19 +26,9 @@
// body#page-1, body#page-2, body.a-special-page-type
// +blueprint(true)
// </pre>
//
// #### Deprecated:
// You use to be able to pass the body selector as the first argument when used as a top-level mixin
// <pre class="source-code sass">
// +blueprint("body#page-1, body#page-2, body.a-special-page-type")
// </pre>
@mixin blueprint($body_selector: body) {
//@doc off
@if not ($body_selector == "body" or $body_selector == true) {
@warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint, pass true as the first argument and mix it into #{$body_selector}."; }
//@doc on
@include blueprint-typography($body_selector);
@mixin blueprint($nested: false) {
@include blueprint-typography($nested);
@include blueprint-utilities;
@include blueprint-grid;
@include blueprint-debug;

View File

@ -26,19 +26,15 @@
//| <pre class="source-code sass">
//| +blueprint-ie("body#page-1, body#page-2, body.a-special-page-type")
//| </pre>
@mixin blueprint-ie($body_selector: body) {
@if $body_selector == true {
@mixin blueprint-ie($nested: false) {
@if $nested {
@include blueprint-ie-body;
@include blueprint-ie-defaults; }
@else {
#{$body_selector} {
@include blueprint-ie-body;
@if $body_selector != "body" {
@warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint-ie, pass true as the first argument and mix it into #{$body_selector}.";
@include blueprint-ie-defaults; } }
@if $body_selector == "body" {
@include blueprint-ie-defaults; } } }
@include blueprint-ie-defaults;
} @else {
body { @include blueprint-ie-body; }
@include blueprint-ie-defaults;
}
}
@mixin blueprint-ie-body {
text-align: center;
@include blueprint-ie-hacks; }

View File

@ -16,25 +16,18 @@
// body#page-1, body#page-2, body.a-special-page-type
// +blueprint-print(true)
// </pre>
// Deprecated:
// You can pass the body selector as the first argument when used as a top-level mixin
// <pre class="source-code sass">
// +blueprint-print("body#page-1, body#page-2, body.a-special-page-type")
// </pre>
@mixin blueprint-print($body_selector: body) {
@if $body_selector == true {
@mixin blueprint-print($nested: false) {
@if $nested {
@include blueprint-print-body;
@include blueprint-print-defaults; }
@else {
#{$body_selector} {
@include blueprint-print-body;
@if $body_selector != "body" {
@warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint-print, pass true as the first argument and mix it into #{$body_selector}.";
@include blueprint-print-defaults; } }
@if $body_selector == "body" {
@include blueprint-print-defaults; } } }
@include blueprint-print-defaults;
} @else {
body { @include blueprint-print-body; }
@include blueprint-print-defaults;
}
}
// This style is in blueprint, but I think it's annoying and it doesn't work in all browsers.
// This style is in blueprint, but it can be annoying and
// it doesn't work in all browsers.
// Feel free to mix it into anchors where you want it.
@mixin blueprint-show-link-urls {
&:after {

View File

@ -91,26 +91,15 @@ $blueprint_container_size: $blueprint_grid_outer_width * $blueprint_grid_columns
// body#page-1, body#page-2, body.a-special-page-type
// +rtl-typography(true)
// </pre>
//
// **Deprecated**:
// You can pass the body selector as the first argument when used as a top-level mixin
// <pre class="source-code sass">
// +rtl-typography("body#page-1, body#page-2, body.a-special-page-type")
// </pre>
@mixin rtl-typography($body_selector: body) {
@if $body_selector == true {
html & {
font-family: Arial, sans-serif; }
@mixin rtl-typography($nested: false) {
@if $nested {
html & { font-family: Arial, sans-serif; }
@include rtl-typography-defaults; }
@else {
html #{$body_selector} {
font-family: Arial, sans-serif;
@if $body_selector != "body" {
@warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +rtl-typography, pass true as the first argument and mix it into #{$body_selector}.";
@include rtl-typography-defaults; } }
@if $body_selector == "body" {
body {
@include rtl-typography-defaults; } } } }
html body { font-family: Arial, sans-serif; }
body { @include rtl-typography-defaults; }
}
}
@mixin rtl-typography-defaults {
h1, h2, h3, h4, h5, h6 {

View File

@ -15,18 +15,17 @@
// Alternatively, you can use the +blueprint-scaffolding-body and +blueprint-scaffolding-defaults
// mixins to construct your own semantic style rules.
@mixin blueprint-scaffolding($body_selector: body) {
@if $body_selector != body {
#{$body_selector} {
@include blueprint-scaffolding-defaults;
}
} @else {
@mixin blueprint-scaffolding($nested: false) {
@if $nested {
@include blueprint-scaffolding-defaults;
} @else {
body { @include blueprint-scaffolding-defaults; }
}
}
// The styles this mixin provides were deprecated in Blueprint 0.9 and is no longer part of the
// main scaffolding, but the mixin is still available if you want to use it.
// The styles this mixin provides were deprecated in Blueprint 0.9 and is no
// longer part of the main scaffolding, but the mixin is still available if
// you want to use it.
@mixin blueprint-scaffolding-body {
margin: 1.5em 0; }

View File

@ -25,27 +25,13 @@ $blueprint-font-size: 12px !default;
// body#page-1, body#page-2, body.a-special-page-type
// +blueprint-typography(true)
// </pre>
//
// **Deprecated**:
// You can pass the body selector as the first argument when used as a top-level mixin
// <pre class="source-code sass">
// +blueprint-typography("body#page-1, body#page-2, body.a-special-page-type")
// </pre>
@mixin blueprint-typography($body-selector: body) {
@if $body-selector == true {
@mixin blueprint-typography($nested: false) {
@if $nested {
@include blueprint-typography-body;
@include blueprint-typography-defaults;
} @else {
#{$body-selector} {
@include blueprint-typography-body;
@if $body-selector != body {
@warn "[DEPRECATED] To specify the selector \"#{$body-selector}\" to +blueprint-typography, pass true as the first argument and mix it into #{$body-selector}.";
@include blueprint-typography-defaults;
}
}
@if $body-selector == body {
@include blueprint-typography-defaults;
}
body { @include blueprint-typography-body; }
@include blueprint-typography-defaults;
}
}