Polish the table scaffolding mixin and add the table borders mixins.
This commit is contained in:
parent
77e19e512b
commit
79ee96dcf4
@ -38,6 +38,7 @@ h2
|
||||
:border-color -moz-use-text-color
|
||||
:padding 2px
|
||||
:line-height 22px
|
||||
:white-space nowrap
|
||||
|
||||
|
||||
#tag-cloud
|
||||
@ -63,3 +64,6 @@ h2
|
||||
table.alternating
|
||||
:width 100%
|
||||
+alternating-rows-and-columns(#F9E5A7,#CEFBB3,#222)
|
||||
+table-scaffolding
|
||||
+outer-table-borders(2px, #151A99)
|
||||
+inner-table-borders(1px, #151A99)
|
@ -96,10 +96,15 @@
|
||||
The first colors are the even/odd colors respectively
|
||||
and the last argument is a shade that is subtracted from those
|
||||
colors for the even columns.
|
||||
%table.alternating
|
||||
%p
|
||||
The borders are created using
|
||||
%code.mixin +outer-table-borders(2px, #151A99)
|
||||
and
|
||||
%code.mixin +inner-table-borders(1px, #151A99)
|
||||
%table.alternating{:cellspacing => 0, :cellpadding => 0, :border => 0}
|
||||
%thead
|
||||
%tr
|
||||
%td
|
||||
%th
|
||||
%th.even Header #1
|
||||
%th.odd Header #2
|
||||
%th.even Header #3
|
||||
@ -123,7 +128,7 @@
|
||||
%td.numeric.even 4.1
|
||||
%td.numeric.odd 4.2
|
||||
%td.numeric.even 4.3
|
||||
%tr.odd
|
||||
%tr.odd.last
|
||||
%th Row #5
|
||||
%td.numeric.even 5.1
|
||||
%td.numeric.odd 5.2
|
||||
|
@ -1,2 +1,3 @@
|
||||
@import tables/scaffolding.sass
|
||||
@import tables/alternating_rows_and_columns.sass
|
||||
@import tables/borders.sass
|
||||
@import tables/scaffolding.sass
|
||||
|
@ -1,16 +1,20 @@
|
||||
=alternating-rows-and-columns(!even_row_color, !odd_row_color, !dark_intersection)
|
||||
thead
|
||||
th.even
|
||||
:background-color= #fff - !dark_intersection
|
||||
tfoot
|
||||
:font-size .9em
|
||||
td.even
|
||||
:background-color= #fff - !dark_intersection
|
||||
=alternating-rows-and-columns(!even_row_color, !odd_row_color, !dark_intersection, !header_color = #FFF, !footer_color = #FFF)
|
||||
th
|
||||
:background-color= !header_color
|
||||
&.even
|
||||
:background-color= !header_color - !dark_intersection
|
||||
tr.odd
|
||||
td
|
||||
:background-color= !odd_row_color
|
||||
td.even
|
||||
&.even
|
||||
:background-color= !odd_row_color - !dark_intersection
|
||||
tr.even
|
||||
td
|
||||
:background-color= !even_row_color
|
||||
td.even
|
||||
&.even
|
||||
:background-color= !even_row_color - !dark_intersection
|
||||
tfoot
|
||||
th, td
|
||||
:background-color= !footer_color
|
||||
&.even
|
||||
:background-color= !footer_color - !dark_intersection
|
||||
|
@ -0,0 +1,27 @@
|
||||
=outer-table-borders(!width = 2px, !color = black)
|
||||
:border= !width "solid" !color
|
||||
thead
|
||||
th
|
||||
:border-bottom= !width "solid" !color
|
||||
tfoot
|
||||
th, td
|
||||
:border-top= !width "solid" !color
|
||||
th
|
||||
&:first-child
|
||||
:border-right= !width "solid" !color
|
||||
|
||||
=inner-table-borders(!width = 2px, !color = black)
|
||||
th, td
|
||||
:border
|
||||
:right= !width "solid" !color
|
||||
:bottom= !width "solid" !color
|
||||
:left-width 0px
|
||||
:top-width 0px
|
||||
&:last-child,
|
||||
&.last
|
||||
:border-right-width 0px
|
||||
tbody, tfoot
|
||||
tr:last-child,
|
||||
tr.last
|
||||
th, td
|
||||
:border-bottom-width 0px
|
@ -1,11 +1,9 @@
|
||||
=table-scaffolding
|
||||
th
|
||||
:text-align center
|
||||
:font-weight bold
|
||||
td,
|
||||
th
|
||||
:padding 2px
|
||||
&.numeric
|
||||
:text-align right
|
||||
tbody
|
||||
th
|
||||
:text-align center
|
||||
thead
|
||||
:font-size .9em
|
Loading…
Reference in New Issue
Block a user