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 // body#page-1, body#page-2, body.a-special-page-type
// +blueprint(true) // +blueprint(true)
// </pre> // </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) { @mixin blueprint($nested: false) {
//@doc off @include blueprint-typography($nested);
@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);
@include blueprint-utilities; @include blueprint-utilities;
@include blueprint-grid; @include blueprint-grid;
@include blueprint-debug; @include blueprint-debug;

View File

@ -26,19 +26,15 @@
//| <pre class="source-code sass"> //| <pre class="source-code sass">
//| +blueprint-ie("body#page-1, body#page-2, body.a-special-page-type") //| +blueprint-ie("body#page-1, body#page-2, body.a-special-page-type")
//| </pre> //| </pre>
@mixin blueprint-ie($body_selector: body) { @mixin blueprint-ie($nested: false) {
@if $body_selector == true { @if $nested {
@include blueprint-ie-body; @include blueprint-ie-body;
@include blueprint-ie-defaults; } @include blueprint-ie-defaults;
@else { } @else {
#{$body_selector} { body { @include blueprint-ie-body; }
@include blueprint-ie-body; @include blueprint-ie-defaults;
@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; } } }
@mixin blueprint-ie-body { @mixin blueprint-ie-body {
text-align: center; text-align: center;
@include blueprint-ie-hacks; } @include blueprint-ie-hacks; }

View File

@ -16,25 +16,18 @@
// body#page-1, body#page-2, body.a-special-page-type // body#page-1, body#page-2, body.a-special-page-type
// +blueprint-print(true) // +blueprint-print(true)
// </pre> // </pre>
// Deprecated: @mixin blueprint-print($nested: false) {
// You can pass the body selector as the first argument when used as a top-level mixin @if $nested {
// <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 {
@include blueprint-print-body; @include blueprint-print-body;
@include blueprint-print-defaults; } @include blueprint-print-defaults;
@else { } @else {
#{$body_selector} { body { @include blueprint-print-body; }
@include blueprint-print-body; @include blueprint-print-defaults;
@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; } } }
// 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. // Feel free to mix it into anchors where you want it.
@mixin blueprint-show-link-urls { @mixin blueprint-show-link-urls {
&:after { &: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 // body#page-1, body#page-2, body.a-special-page-type
// +rtl-typography(true) // +rtl-typography(true)
// </pre> // </pre>
// @mixin rtl-typography($nested: false) {
// **Deprecated**: @if $nested {
// You can pass the body selector as the first argument when used as a top-level mixin html & { font-family: Arial, sans-serif; }
// <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; }
@include rtl-typography-defaults; } @include rtl-typography-defaults; }
@else { @else {
html #{$body_selector} { html body { font-family: Arial, sans-serif; }
font-family: Arial, sans-serif; body { @include rtl-typography-defaults; }
@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; } } } }
@mixin rtl-typography-defaults { @mixin rtl-typography-defaults {
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {

View File

@ -15,18 +15,17 @@
// Alternatively, you can use the +blueprint-scaffolding-body and +blueprint-scaffolding-defaults // Alternatively, you can use the +blueprint-scaffolding-body and +blueprint-scaffolding-defaults
// mixins to construct your own semantic style rules. // mixins to construct your own semantic style rules.
@mixin blueprint-scaffolding($body_selector: body) { @mixin blueprint-scaffolding($nested: false) {
@if $body_selector != body { @if $nested {
#{$body_selector} {
@include blueprint-scaffolding-defaults;
}
} @else {
@include blueprint-scaffolding-defaults; @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 // The styles this mixin provides were deprecated in Blueprint 0.9 and is no
// main scaffolding, but the mixin is still available if you want to use it. // longer part of the main scaffolding, but the mixin is still available if
// you want to use it.
@mixin blueprint-scaffolding-body { @mixin blueprint-scaffolding-body {
margin: 1.5em 0; } 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 // body#page-1, body#page-2, body.a-special-page-type
// +blueprint-typography(true) // +blueprint-typography(true)
// </pre> // </pre>
// @mixin blueprint-typography($nested: false) {
// **Deprecated**: @if $nested {
// 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 {
@include blueprint-typography-body; @include blueprint-typography-body;
@include blueprint-typography-defaults; @include blueprint-typography-defaults;
} @else { } @else {
#{$body-selector} { body { @include blueprint-typography-body; }
@include blueprint-typography-body; @include blueprint-typography-defaults;
@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;
}
} }
} }