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
|
:border-color -moz-use-text-color
|
||||||
:padding 2px
|
:padding 2px
|
||||||
:line-height 22px
|
:line-height 22px
|
||||||
|
:white-space nowrap
|
||||||
|
|
||||||
|
|
||||||
#tag-cloud
|
#tag-cloud
|
||||||
@ -62,4 +63,7 @@ h2
|
|||||||
+column(16)
|
+column(16)
|
||||||
table.alternating
|
table.alternating
|
||||||
:width 100%
|
:width 100%
|
||||||
+alternating-rows-and-columns(#F9E5A7,#CEFBB3,#222)
|
+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
|
The first colors are the even/odd colors respectively
|
||||||
and the last argument is a shade that is subtracted from those
|
and the last argument is a shade that is subtracted from those
|
||||||
colors for the even columns.
|
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
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%td
|
%th
|
||||||
%th.even Header #1
|
%th.even Header #1
|
||||||
%th.odd Header #2
|
%th.odd Header #2
|
||||||
%th.even Header #3
|
%th.even Header #3
|
||||||
@ -123,7 +128,7 @@
|
|||||||
%td.numeric.even 4.1
|
%td.numeric.even 4.1
|
||||||
%td.numeric.odd 4.2
|
%td.numeric.odd 4.2
|
||||||
%td.numeric.even 4.3
|
%td.numeric.even 4.3
|
||||||
%tr.odd
|
%tr.odd.last
|
||||||
%th Row #5
|
%th Row #5
|
||||||
%td.numeric.even 5.1
|
%td.numeric.even 5.1
|
||||||
%td.numeric.odd 5.2
|
%td.numeric.odd 5.2
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
|
@import tables/alternating_rows_and_columns.sass
|
||||||
|
@import tables/borders.sass
|
||||||
@import tables/scaffolding.sass
|
@import tables/scaffolding.sass
|
||||||
@import tables/alternating_rows_and_columns.sass
|
|
@ -1,16 +1,20 @@
|
|||||||
=alternating-rows-and-columns(!even_row_color, !odd_row_color, !dark_intersection)
|
=alternating-rows-and-columns(!even_row_color, !odd_row_color, !dark_intersection, !header_color = #FFF, !footer_color = #FFF)
|
||||||
thead
|
th
|
||||||
th.even
|
:background-color= !header_color
|
||||||
:background-color= #fff - !dark_intersection
|
&.even
|
||||||
tfoot
|
:background-color= !header_color - !dark_intersection
|
||||||
:font-size .9em
|
|
||||||
td.even
|
|
||||||
:background-color= #fff - !dark_intersection
|
|
||||||
tr.odd
|
tr.odd
|
||||||
:background-color= !odd_row_color
|
td
|
||||||
td.even
|
:background-color= !odd_row_color
|
||||||
:background-color= !odd_row_color - !dark_intersection
|
&.even
|
||||||
|
:background-color= !odd_row_color - !dark_intersection
|
||||||
tr.even
|
tr.even
|
||||||
:background-color= !even_row_color
|
td
|
||||||
td.even
|
:background-color= !even_row_color
|
||||||
:background-color= !even_row_color - !dark_intersection
|
&.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
|
=table-scaffolding
|
||||||
|
th
|
||||||
|
:text-align center
|
||||||
|
:font-weight bold
|
||||||
td,
|
td,
|
||||||
th
|
th
|
||||||
:padding 2px
|
:padding 2px
|
||||||
&.numeric
|
&.numeric
|
||||||
:text-align right
|
:text-align right
|
||||||
tbody
|
|
||||||
th
|
|
||||||
:text-align center
|
|
||||||
thead
|
|
||||||
:font-size .9em
|
|
Loading…
Reference in New Issue
Block a user