Added conditional assignment to the yui constants and prefixed them with "yui_".

This commit is contained in:
Chris Eppstein 2008-11-29 19:28:42 -08:00
parent b5034a917e
commit 562b417197
2 changed files with 11 additions and 11 deletions

View File

@ -1,6 +1,6 @@
!default_base_font_size = 13px !yui_default_base_font_size ||= 13px
!default_base_line_height = 1.231 !yui_default_base_line_height ||= 1.231
!default_font_family = arial,helvetica,clean,sans-serif !yui_default_font_family ||= arial,helvetica,clean,sans-serif
// Sets the font size specified in pixels using percents so that the base // Sets the font size specified in pixels using percents so that the base
// font size changes and 1em has the correct value. When nesting font size // font size changes and 1em has the correct value. When nesting font size
@ -15,11 +15,11 @@
// +font-size(18px, 16px) // +font-size(18px, 16px)
// //
// For more information see the table found at http://developer.yahoo.com/yui/fonts/#fontsize // For more information see the table found at http://developer.yahoo.com/yui/fonts/#fontsize
=font-size(!size, !base_font_size = !default_base_font_size) =font-size(!size, !base_font_size = !yui_default_base_font_size)
:font-size= percentage(!size / !base_font_size) :font-size= percentage(!size / !base_font_size)
// Sets the base fonts for a page, this should be mixed into the top level of a stylesheet. // Sets the base fonts for a page, this should be mixed into the top level of a stylesheet.
=yui-base-fonts(!family = !default_font_family, !size = !default_base_font_size, !line_height = !default_base_line_height) =yui-base-fonts(!family = !yui_default_font_family, !size = !yui_default_base_font_size, !line_height = !yui_default_base_line_height)
body body
:font :font
:size= !size :size= !size

View File

@ -35,10 +35,10 @@
body body
:text-align center :text-align center
=em-size(!style, !px_size, !base_font_size = !default_base_font_size) =em-size(!style, !px_size, !base_font_size = !yui_default_base_font_size)
:#{!style}= 1em * !px_size / !base_font_size :#{!style}= 1em * !px_size / !base_font_size
=em-size-hacked(!style, !px_size, !base_font_size = !default_base_font_size) =em-size-hacked(!style, !px_size, !base_font_size = !yui_default_base_font_size)
+em-size(!style, !px_size, !base_font_size) +em-size(!style, !px_size, !base_font_size)
+em-size("*"+!style, !px_size * 39 / 40, !base_font_size) +em-size("*"+!style, !px_size * 39 / 40, !base_font_size)
@ -61,7 +61,7 @@
// Creates a fixed width document container // Creates a fixed width document container
// Pass "fluid" for the width to create a document that grows with the width of the browser. // Pass "fluid" for the width to create a document that grows with the width of the browser.
=yui-document(!width, !min_width = 750px, !base_font_size = !default_base_font_size) =yui-document(!width, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
+yui-document-base(!min_width) +yui-document-base(!min_width)
@if !width == "fluid" @if !width == "fluid"
:margin auto 10px :margin auto 10px
@ -69,7 +69,7 @@
@else @else
+em-size-hacked("width", !width, !base_font_size) +em-size-hacked("width", !width, !base_font_size)
=yui-two-column-left-template(!column_width, !main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !default_base_font_size) =yui-two-column-left-template(!column_width, !main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
+yui-document(!document_width, !min_width, !base_font_size) +yui-document(!document_width, !min_width, !base_font_size)
#{!main_selector} #{!main_selector}
:width 100% :width 100%
@ -83,7 +83,7 @@
:float left :float left
+em-size-hacked("width", !column_width, !base_font_size) +em-size-hacked("width", !column_width, !base_font_size)
=yui-two-column-right-template(!column_width, !main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !default_base_font_size) =yui-two-column-right-template(!column_width, !main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
+yui-document(!document_width, !min_width, !base_font_size) +yui-document(!document_width, !min_width, !base_font_size)
#{!main_selector} #{!main_selector}
:width 100% :width 100%
@ -97,7 +97,7 @@
:float right :float right
+em-size-hacked("width", !column_width, !base_font_size) +em-size-hacked("width", !column_width, !base_font_size)
=yui-one-column-template(!main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !default_base_font_size) =yui-one-column-template(!main_selector = "#yui-main", !block_selector = ".yui-b", !document_width = 750px, !min_width = 750px, !base_font_size = !yui_default_base_font_size)
+yui-document(!document_width, !min_width, !base_font_size) +yui-document(!document_width, !min_width, !base_font_size)
#{!main_selector} #{!main_selector}
:width 100% :width 100%