YUI's base and fonts. Their reset is already in compass core.
Grid is still to come -- I'm still getting my head around its semantics.
This commit is contained in:
parent
6efe31a066
commit
e62b7942d6
14
examples/yui_default/stylesheets/screen.sass
Normal file
14
examples/yui_default/stylesheets/screen.sass
Normal file
@ -0,0 +1,14 @@
|
||||
@import yui/screen
|
||||
@import compass/reset
|
||||
|
||||
html
|
||||
+reset-html
|
||||
|
||||
body
|
||||
+yui
|
||||
|
||||
#my-small-element
|
||||
+yui-font-size(10px)
|
||||
|
||||
#my-big-element
|
||||
+yui-font-size(24px)
|
5
frameworks/yui/stylesheets/yui/_screen.sass
Normal file
5
frameworks/yui/stylesheets/yui/_screen.sass
Normal file
@ -0,0 +1,5 @@
|
||||
@import modules/base
|
||||
@import modules/fonts
|
||||
=yui
|
||||
+yui-base
|
||||
+yui-fonts
|
60
frameworks/yui/stylesheets/yui/modules/_base.sass
Normal file
60
frameworks/yui/stylesheets/yui/modules/_base.sass
Normal file
@ -0,0 +1,60 @@
|
||||
=yui-base
|
||||
h1
|
||||
:font-size 138.5%
|
||||
|
||||
h2
|
||||
:font-size 123.1%
|
||||
|
||||
h3
|
||||
:font-size 108%
|
||||
|
||||
h1, h2, h3
|
||||
:margin 1em 0
|
||||
|
||||
h1,h2, h3, h4, h5, h6, strong
|
||||
:font-weight bold
|
||||
|
||||
abbr, acronym
|
||||
:border-bottom 1px dotted #000
|
||||
:cursor help
|
||||
|
||||
em
|
||||
:font-style italic
|
||||
|
||||
blockquote
|
||||
:margin 1em
|
||||
|
||||
ul
|
||||
:margin 1em
|
||||
:margin-left 2em
|
||||
li
|
||||
:list-style disc outside
|
||||
|
||||
ol
|
||||
:margin 1em
|
||||
:margin-left 2em
|
||||
li
|
||||
:list-style decimal outside
|
||||
|
||||
dl
|
||||
:margin 1em
|
||||
:margin-left 2em
|
||||
dd
|
||||
:margin-left 1em
|
||||
|
||||
th
|
||||
:border 1px solid #000
|
||||
:padding .5em
|
||||
:font-weight bold
|
||||
:text-align center
|
||||
|
||||
td
|
||||
:border 1px solid #000
|
||||
:padding .5em
|
||||
|
||||
caption
|
||||
:margin-bottom .5em
|
||||
:text-align center
|
||||
|
||||
p, fieldset, table
|
||||
:margin-bottom 1em
|
52
frameworks/yui/stylesheets/yui/modules/_fonts.sass
Normal file
52
frameworks/yui/stylesheets/yui/modules/_fonts.sass
Normal file
@ -0,0 +1,52 @@
|
||||
// Converts pixels to percents according to
|
||||
// the table found at http://developer.yahoo.com/yui/fonts/#fontsize
|
||||
=yui-font-size(!size)
|
||||
@if !size == 10px
|
||||
:font-size 77%
|
||||
@if !size == 11px
|
||||
:font-size 85%
|
||||
@if !size == 12px
|
||||
:font-size 93%
|
||||
@if !size == 13px
|
||||
:font-size 100%
|
||||
@if !size == 14px
|
||||
:font-size 108%
|
||||
@if !size == 15px
|
||||
:font-size 116%
|
||||
@if !size == 16px
|
||||
:font-size 123.1%
|
||||
@if !size == 17px
|
||||
:font-size 131%
|
||||
@if !size == 18px
|
||||
:font-size 138.5%
|
||||
@if !size == 19px
|
||||
:font-size 146.5%
|
||||
@if !size == 20px
|
||||
:font-size 153.9%
|
||||
@if !size == 21px
|
||||
:font-size 161.6%
|
||||
@if !size == 22px
|
||||
:font-size 167%
|
||||
@if !size == 23px
|
||||
:font-size 174%
|
||||
@if !size == 24px
|
||||
:font-size 182%
|
||||
@if !size == 25px
|
||||
:font-size 189%
|
||||
@if !size == 26px
|
||||
:font-size 197%
|
||||
|
||||
=yui-fonts
|
||||
body
|
||||
:font 13px/1.231 arial,helvetica,clean,sans-serif
|
||||
:*font-size small
|
||||
:*font x-small
|
||||
|
||||
table
|
||||
:font-size inherit
|
||||
:font 100%
|
||||
|
||||
pre, code, kbd, samp, tt
|
||||
:font-family monospace
|
||||
:*font-size 108%
|
||||
:line-height 100%
|
8
frameworks/yui/templates/project/screen.sass
Normal file
8
frameworks/yui/templates/project/screen.sass
Normal file
@ -0,0 +1,8 @@
|
||||
@import yui/screen
|
||||
@import compass/reset
|
||||
|
||||
html
|
||||
+reset-html
|
||||
|
||||
body
|
||||
+yui
|
@ -24,3 +24,4 @@ end
|
||||
|
||||
require File.join(File.dirname(__FILE__), 'frameworks', 'compass')
|
||||
require File.join(File.dirname(__FILE__), 'frameworks', 'blueprint')
|
||||
require File.join(File.dirname(__FILE__), 'frameworks', 'yui')
|
||||
|
2
lib/compass/frameworks/yui.rb
Normal file
2
lib/compass/frameworks/yui.rb
Normal file
@ -0,0 +1,2 @@
|
||||
yui_dir = File.join(Compass.base_directory, 'frameworks', 'yui')
|
||||
Compass::Frameworks.register('yui', yui_dir)
|
Loading…
Reference in New Issue
Block a user