summaryrefslogtreecommitdiff
path: root/source/bower_components/foundation/scss/foundation/components/_tables.scss
blob: ba3e42e62ff8a999babb527d5105548bd6cbd69b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
// Foundation by ZURB
// foundation.zurb.com
// Licensed under MIT Open Source

@import "global";

//
// @name _tables.scss
// @dependencies _global.scss
//

//
// @variables
//

$include-html-table-classes: $include-html-classes !default;

// These control the background color for the table and even rows
$table-bg: $white !default;
$table-even-row-bg: $snow !default;

// These control the table cell border style
$table-border-style: solid !default;
$table-border-size: 1px !default;
$table-border-color: $gainsboro !default;

// These control the table head styles
$table-head-bg: $white-smoke !default;
$table-head-font-size: rem-calc(14) !default;
$table-head-font-color: $jet !default;
$table-head-font-weight: $font-weight-bold !default;
$table-head-padding: rem-calc(8 10 10) !default;

// These control the table foot styles
$table-foot-bg: $table-head-bg !default;
$table-foot-font-size: $table-head-font-size !default;
$table-foot-font-color: $table-head-font-color !default;
$table-foot-font-weight: $table-head-font-weight !default;
$table-foot-padding: $table-head-padding !default;

// These control the caption
$table-caption-bg: transparent !default;
$table-caption-font-color: $table-head-font-color !default;
$table-caption-font-size: rem-calc(16) !default;
$table-caption-font-weight: bold !default;

// These control the row padding and font styles
$table-row-padding: rem-calc(9 10) !default;
$table-row-font-size: rem-calc(14) !default;
$table-row-font-color: $jet !default;
$table-line-height: rem-calc(18) !default;

// These are for controlling the layout, display and margin of tables
$table-layout: auto !default;
$table-display: table-cell !default;
$table-margin-bottom: rem-calc(20) !default;


//
// @mixins
//

@mixin table {
  background: $table-bg;
  margin-bottom: $table-margin-bottom;
  border: $table-border-style $table-border-size $table-border-color;
  table-layout: $table-layout;

  caption {
    background: $table-caption-bg;
    color: $table-caption-font-color;
    font: {
      size: $table-caption-font-size;
      weight: $table-caption-font-weight;
    }
  }

  thead {
    background: $table-head-bg;

    tr {
      th,
      td {
        padding: $table-head-padding;
        font-size: $table-head-font-size;
        font-weight: $table-head-font-weight;
        color: $table-head-font-color;
      }
    }
  }

  tfoot {
    background: $table-foot-bg;

    tr {
      th,
      td {
        padding: $table-foot-padding;
        font-size: $table-foot-font-size;
        font-weight: $table-foot-font-weight;
        color: $table-foot-font-color;
      }
    }
  }

  tr {
    th,
    td {
      padding: $table-row-padding;
      font-size: $table-row-font-size;
      color: $table-row-font-color;
      text-align: $default-float;
    }

    &.even,
    &.alt,
    &:nth-of-type(even) { background: $table-even-row-bg; }
  }

  thead tr th,
  tfoot tr th,
  tfoot tr td,
  tbody tr th,
  tbody tr td,
  tr td { display: $table-display; line-height: $table-line-height; }
}


@include exports("table") {
  @if $include-html-table-classes {
    table {
      @include table;
    }
  }
}