Reformat some scss -- trying to find a code formatting style that doesn't make my eyes bleed.
This commit is contained in:
parent
ae6bb46f12
commit
20c2c05a1d
@ -1,18 +1,19 @@
|
|||||||
@mixin no-link-icon {
|
@mixin no-link-icon {
|
||||||
background: transparent none !important;
|
background: transparent none !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
margin: 0 !important; }
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin link-icon-base {
|
@mixin link-icon-base {
|
||||||
padding: 2px 22px 2px 0;
|
padding: 2px 22px 2px 0;
|
||||||
margin: -2px 0;
|
margin: -2px 0;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: right center; }
|
background-position: right center;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin link-icon($name, $include_base: true) {
|
@mixin link-icon($name, $include-base: true) {
|
||||||
@if $include_base {
|
@if $include-base { @include link-icon-base; }
|
||||||
@include link-icon-base; }
|
background-image: image-url("link_icons/#{$name}"); }
|
||||||
background-image: image_url("link_icons/#{$name}"); }
|
|
||||||
|
|
||||||
@mixin link-icons {
|
@mixin link-icons {
|
||||||
a[href^="http:"],
|
a[href^="http:"],
|
||||||
@ -23,22 +24,14 @@
|
|||||||
a[href$=".xls"],
|
a[href$=".xls"],
|
||||||
a[href$=".rss"],
|
a[href$=".rss"],
|
||||||
a[href$=".rdf"],
|
a[href$=".rdf"],
|
||||||
a[href^="aim:"] {
|
a[href^="aim:"] { @include link-icon-base; }
|
||||||
@include link-icon-base; }
|
a[href^="http:"] { @include link-icon("external.png", false); }
|
||||||
a[href^="http:"] {
|
a[href^="mailto:"] { @include link-icon("email.png", false); }
|
||||||
@include link-icon(unquote("external.png"), false); }
|
a[href^="http:"]:visited { @include link-icon("visited.png", false); }
|
||||||
a[href^="mailto:"] {
|
a[href$=".pdf"] { @include link-icon("pdf.png", false); }
|
||||||
@include link-icon(unquote("email.png"), false); }
|
a[href$=".doc"] { @include link-icon("doc.png", false); }
|
||||||
a[href^="http:"]:visited {
|
a[href$=".xls"] { @include link-icon("xls.png", false); }
|
||||||
@include link-icon(unquote("visited.png"), false); }
|
|
||||||
a[href$=".pdf"] {
|
|
||||||
@include link-icon(unquote("pdf.png"), false); }
|
|
||||||
a[href$=".doc"] {
|
|
||||||
@include link-icon(unquote("doc.png"), false); }
|
|
||||||
a[href$=".xls"] {
|
|
||||||
@include link-icon(unquote("xls.png"), false); }
|
|
||||||
a[href$=".rss"],
|
a[href$=".rss"],
|
||||||
a[href$=".rdf"] {
|
a[href$=".rdf"] { @include link-icon("feed.png", false); }
|
||||||
@include link-icon(unquote("feed.png"), false); }
|
a[href^="aim:"] { @include link-icon("im.png", false); }
|
||||||
a[href^="aim:"] {
|
}
|
||||||
@include link-icon(unquote("im.png"), false); } }
|
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
@import "compass/utilities/links/link-colors";
|
@import "compass/utilities/links/link-colors";
|
||||||
@import "compass/utilities/general/float";
|
@import "compass/utilities/general/float";
|
||||||
|
|
||||||
$blueprint_font_family: unquote("Helvetica Neue, Arial, Helvetica, sans-serif") !default;
|
$blueprint-font-family: "Helvetica Neue", Arial, Helvetica, sans-serif !default;
|
||||||
|
|
||||||
$blueprint_fixed_font_family: unquote("'andale mono', 'lucida console', monospace") !default;
|
$blueprint-fixed-font-family: "andale mono", "lucida console", monospace !default;
|
||||||
|
|
||||||
$blueprint_font_size: 12px !default;
|
$blueprint-font-size: 12px !default;
|
||||||
|
|
||||||
// Usage examples:
|
// Usage examples:
|
||||||
// As a top-level mixin, apply to any page that includes the stylesheet:
|
// As a top-level mixin, apply to any page that includes the stylesheet:
|
||||||
@ -20,145 +20,74 @@ $blueprint_font_size: 12px !default;
|
|||||||
// Deprecated:
|
// Deprecated:
|
||||||
// You can pass the body selector as the first argument when used as a top-level mixin
|
// You can pass the body selector as the first argument when used as a top-level mixin
|
||||||
// +blueprint-typography("body#page-1, body#page-2, body.a-special-page-type")
|
// +blueprint-typography("body#page-1, body#page-2, body.a-special-page-type")
|
||||||
@mixin blueprint-typography($body_selector: body) {
|
@mixin blueprint-typography($body-selector: body) {
|
||||||
@if $body_selector == true {
|
@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-selector} {
|
||||||
@include blueprint-typography-body;
|
@include blueprint-typography-body;
|
||||||
@if $body_selector != "body" {
|
@if $body-selector != body {
|
||||||
@warn "[DEPRECATED] To specify a the selector \"#{$body_selector}\" to +blueprint-typography, pass true as the first argument and mix it into #{$body_selector}.";
|
@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; } }
|
@include blueprint-typography-defaults;
|
||||||
@if $body_selector == "body" {
|
}
|
||||||
@include blueprint-typography-defaults; } } }
|
}
|
||||||
|
@if $body-selector == body {
|
||||||
|
@include blueprint-typography-defaults;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@mixin normal-text {
|
@mixin normal-text { font-family: $blueprint-font-family; color: $font-color; }
|
||||||
font-family: $blueprint_font_family;
|
@mixin fixed-width-text { font: 1em $blueprint-fixed-font-family; line-height: 1.5; }
|
||||||
color: $font_color; }
|
@mixin header-text { font-weight: normal; color: $header-color; }
|
||||||
|
@mixin quiet { color: $quiet-color; }
|
||||||
|
@mixin loud { color: $loud-color; }
|
||||||
|
|
||||||
@mixin fixed-width-text {
|
@mixin blueprint-typography-body($font-size: $blueprint-font-size) {
|
||||||
font: 1em $blueprint_fixed_font_family;
|
|
||||||
line-height: 1.5; }
|
|
||||||
|
|
||||||
@mixin header-text {
|
|
||||||
font-weight: normal;
|
|
||||||
color: $header_color; }
|
|
||||||
|
|
||||||
@mixin quiet {
|
|
||||||
color: $quiet_color; }
|
|
||||||
|
|
||||||
@mixin loud {
|
|
||||||
color: $loud_color; }
|
|
||||||
|
|
||||||
@mixin blueprint-typography-body($font_size: $blueprint_font_size) {
|
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
@include normal-text;
|
@include normal-text;
|
||||||
font-size: 100% * $font_size / 16px; }
|
font-size: 100% * $font-size / 16px;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin blueprint-typography-defaults {
|
@mixin blueprint-typography-defaults {
|
||||||
h1 {
|
#{headers(all)} { @include header-text;
|
||||||
@include header-text;
|
img { margin: 0; } }
|
||||||
font-size: 3em;
|
h1 { font-size: 3em; line-height: 1; margin-bottom: 0.5em; }
|
||||||
line-height: 1;
|
h2 { font-size: 2em; margin-bottom: 0.75em; }
|
||||||
margin-bottom: 0.5em;
|
h3 { font-size: 1.5em; line-height: 1; margin-bottom: 1em; }
|
||||||
img {
|
h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
|
||||||
margin: 0; } }
|
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
|
||||||
h2 {
|
h6 { font-size: 1em; font-weight: bold; }
|
||||||
@include header-text;
|
p { margin: 0 0 1.5em;
|
||||||
font-size: 2em;
|
img.left { @include float-left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
|
||||||
margin-bottom: 0.75em; }
|
img.right { @include float-right; margin: 1.5em 0 1.5em 1.5em; padding: 0; } }
|
||||||
h3 {
|
a { text-decoration: underline; @include link-colors($link-color, $link-hover-color, $link-active-color, $link-visited-color, $link-focus-color); }
|
||||||
@include header-text;
|
blockquote { margin: 1.5em; color: #666666; font-style: italic; }
|
||||||
font-size: 1.5em;
|
strong { font-weight: bold; }
|
||||||
line-height: 1;
|
em { font-style: italic; }
|
||||||
margin-bottom: 1em; }
|
dfn { font-style: italic; font-weight: bold; }
|
||||||
h4 {
|
sup, sub { line-height: 0; }
|
||||||
@include header-text;
|
abbr, acronym { border-bottom: 1px dotted #666666; }
|
||||||
font-size: 1.2em;
|
address { margin: 0 0 1.5em; font-style: italic; }
|
||||||
line-height: 1.25;
|
del { color: #666666; }
|
||||||
margin-bottom: 1.25em; }
|
pre { margin: 1.5em 0; white-space: pre; }
|
||||||
h5 {
|
pre, code, tt { @include fixed-width-text; }
|
||||||
@include header-text;
|
li {
|
||||||
font-size: 1em;
|
ul, ol { margin: 0; } }
|
||||||
font-weight: bold;
|
ul, ol { margin: 0 1.5em 1.5em 0; padding-left: 3.333em; }
|
||||||
margin-bottom: 1.5em; }
|
ul { list-style-type: disc; }
|
||||||
h6 {
|
ol { list-style-type: decimal; }
|
||||||
@include header-text;
|
dl { margin: 0 0 1.5em 0;
|
||||||
font-size: 1em;
|
dt { font-weight: bold; } }
|
||||||
font-weight: bold; }
|
dd { margin-left: 1.5em; }
|
||||||
h2 img, h3 img, h4 img, h5 img, h6 img {
|
table { margin-bottom: 1.4em; width: 100%; }
|
||||||
margin: 0; }
|
th { font-weight: bold; }
|
||||||
p {
|
thead th { background: $blueprint-table-header-color; }
|
||||||
margin: 0 0 1.5em;
|
th, td, caption { padding: 4px 10px 4px 5px; }
|
||||||
img.left {
|
tr.even td { background: $blueprint-table-stripe-color; }
|
||||||
@include float-left;
|
tfoot { font-style: italic; }
|
||||||
margin: 1.5em 1.5em 1.5em 0;
|
caption { background: #eeeeee; }
|
||||||
padding: 0; }
|
.quiet { @include quiet; }
|
||||||
img.right {
|
.loud { @include loud; }
|
||||||
@include float-right;
|
}
|
||||||
margin: 1.5em 0 1.5em 1.5em;
|
|
||||||
padding: 0; } }
|
|
||||||
a {
|
|
||||||
text-decoration: underline;
|
|
||||||
@include link-colors($link_color, $link_hover_color, $link_active_color, $link_visited_color, $link_focus_color); }
|
|
||||||
blockquote {
|
|
||||||
margin: 1.5em;
|
|
||||||
color: #666666;
|
|
||||||
font-style: italic; }
|
|
||||||
strong {
|
|
||||||
font-weight: bold; }
|
|
||||||
em {
|
|
||||||
font-style: italic; }
|
|
||||||
dfn {
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold; }
|
|
||||||
sup, sub {
|
|
||||||
line-height: 0; }
|
|
||||||
abbr, acronym {
|
|
||||||
border-bottom: 1px dotted #666666; }
|
|
||||||
address {
|
|
||||||
margin: 0 0 1.5em;
|
|
||||||
font-style: italic; }
|
|
||||||
del {
|
|
||||||
color: #666666; }
|
|
||||||
pre {
|
|
||||||
margin: 1.5em 0;
|
|
||||||
white-space: pre; }
|
|
||||||
pre, code, tt {
|
|
||||||
@include fixed-width-text; }
|
|
||||||
li {
|
|
||||||
ul, ol {
|
|
||||||
margin: 0; } }
|
|
||||||
ul, ol {
|
|
||||||
margin: 0 1.5em 1.5em 0;
|
|
||||||
padding-left: 3.333em; }
|
|
||||||
ul {
|
|
||||||
list-style-type: disc; }
|
|
||||||
ol {
|
|
||||||
list-style-type: decimal; }
|
|
||||||
dl {
|
|
||||||
margin: 0 0 1.5em 0;
|
|
||||||
dt {
|
|
||||||
font-weight: bold; } }
|
|
||||||
dd {
|
|
||||||
margin-left: 1.5em; }
|
|
||||||
table {
|
|
||||||
margin-bottom: 1.4em;
|
|
||||||
width: 100%; }
|
|
||||||
th {
|
|
||||||
font-weight: bold; }
|
|
||||||
thead th {
|
|
||||||
background: $blueprint_table_header_color; }
|
|
||||||
th, td, caption {
|
|
||||||
padding: 4px 10px 4px 5px; }
|
|
||||||
tr.even td {
|
|
||||||
background: $blueprint_table_stripe_color; }
|
|
||||||
tfoot {
|
|
||||||
font-style: italic; }
|
|
||||||
caption {
|
|
||||||
background: #eeeeee; }
|
|
||||||
.quiet {
|
|
||||||
@include quiet; }
|
|
||||||
.loud {
|
|
||||||
@include loud; } }
|
|
||||||
|
Loading…
Reference in New Issue
Block a user