From 99f797127fd5b5c53c79754ab2eac6c78b08dcb4 Mon Sep 17 00:00:00 2001 From: Chris Eppstein Date: Thu, 22 Apr 2010 08:30:50 -0700 Subject: [PATCH] clean up the reference documentation with new layout and after sass3 upgrade. --- doc-src/content/stylesheets/_reference.scss | 50 +++++++++++++++++++ doc-src/content/stylesheets/screen.sass | 3 ++ doc-src/lib/stylesheets/sass_extensions.rb | 4 +- .../stylesheets/compass/css3/_font-face.scss | 2 +- .../utilities/lists/_horizontal-list.scss | 4 -- 5 files changed, 57 insertions(+), 6 deletions(-) create mode 100644 doc-src/content/stylesheets/_reference.scss diff --git a/doc-src/content/stylesheets/_reference.scss b/doc-src/content/stylesheets/_reference.scss new file mode 100644 index 00000000..e0407b6d --- /dev/null +++ b/doc-src/content/stylesheets/_reference.scss @@ -0,0 +1,50 @@ +// Reference + +body.reference { + h3 { + &.mixin, &.constant { + font-family: Monaco, courier; + font-weight: 200; + @include text-shadow; + background-color: #eeeeee; + border: 1px solid #aaaaaa; + padding: 0.75em; + margin-bottom: 0; + a.permalink { + @include hover-link; + @include link-colors(inherit, inherit); } } + .arg[data-default-value] { + color: #666666; + &:before { + content: "["; } + &:after { + content: "]"; } } } + .source-documentation { + background-color: #eeeeee; + border: 1px solid #aaaaaa; + border-top-width: 0; + padding: 0.75em; } + dl.source-documentation { + margin-top: 0; + dt { + font-weight: bold; + float: left; + margin-right: 15px; } + dt:not(:first-child) { + margin-top: 1em; } } + a.view-source { + float: right; + margin: 1.25em; } + span.color + span.swatch { margin: 0 3px 3px; border: 1px solid #333333; width: 1em; height: 1em; @include inline-block; } + .color-snippet { width: 100px; height: 20px; @include border-radius(3px); } + a.help { font-size: 75%; } + p code { border: 1px solid #ccc; padding: 2px; background-color: #e7e7e7;} +} + +table.constants { + width: 100%; + @include alternating-rows-and-columns(#eeeeee, #bbbbbb, #191919); + @include outer-table-borders(1px); + @include inner-table-borders(1px); + td, th { + padding: 0.25em 0.5em; } } diff --git a/doc-src/content/stylesheets/screen.sass b/doc-src/content/stylesheets/screen.sass index 02887c9c..ea1a9660 100644 --- a/doc-src/content/stylesheets/screen.sass +++ b/doc-src/content/stylesheets/screen.sass @@ -142,6 +142,7 @@ footer[role="contentinfo"] article text-align: left + +prefix(3) article > nav @@ -268,6 +269,8 @@ article /* @end +@import "reference" + /* @group OVERRIDES by page diff --git a/doc-src/lib/stylesheets/sass_extensions.rb b/doc-src/lib/stylesheets/sass_extensions.rb index fe89cb67..010dcd2c 100644 --- a/doc-src/lib/stylesheets/sass_extensions.rb +++ b/doc-src/lib/stylesheets/sass_extensions.rb @@ -61,11 +61,13 @@ module Sass attr_accessor :imported_filename unless method_defined? :imported_filename end class CommentNode < Node + PRE_COMMENT = %r{(^ */*\**(\s*\|)?( |$))} + POST_COMMENT = %r{ *\*/$} def self.clean(docstring) docstring.gsub(/@doc off(.*?)@doc on/m, '') end def docstring - value.gsub(/(^\| )|(^\|$)/, '') + value.gsub(PRE_COMMENT, '').gsub(POST_COMMENT, '') end def doc if value == "@doc off" diff --git a/frameworks/compass/stylesheets/compass/css3/_font-face.scss b/frameworks/compass/stylesheets/compass/css3/_font-face.scss index da4d364d..06a947f3 100644 --- a/frameworks/compass/stylesheets/compass/css3/_font-face.scss +++ b/frameworks/compass/stylesheets/compass/css3/_font-face.scss @@ -2,7 +2,7 @@ // // * $name is required, arbitrary, and what you will use in font stacks. // * $font-files is required using font-files('relative/location', 'format'). -// * for best results use this order: woff, opentype/truetype, svg +// for best results use this order: woff, opentype/truetype, svg // * $eot is required by IE, and is a relative location of the eot file. // * postscript name is required by some browsers to look for local fonts. diff --git a/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss b/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss index d4bf4d2b..a1c9d99f 100644 --- a/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss +++ b/frameworks/compass/stylesheets/compass/utilities/lists/_horizontal-list.scss @@ -1,4 +1,3 @@ -//**\\ // Horizontal list layout module. // // Easy mode using simple descendant li selectors: @@ -20,14 +19,12 @@ @import "compass/utilities/general/reset"; @import "compass/utilities/general/float"; -//** // Can be mixed into any selector that target a ul or ol that is meant // to have a horizontal layout. Used to implement +horizontal-list. @mixin horizontal-list-container { @include reset-box-model; @include clearfix; } -//** // Can be mixed into any li selector that is meant to participate in a horizontal layout. // Used to implement +horizontal-list. // @@ -46,7 +43,6 @@ &:last-child, &.last { padding-right: 0px; } } -//** // A list(ol,ul) that is layed out such that the elements are floated left and won't wrap. // This is not an inline list. @mixin horizontal-list($padding: 4px) {