summaryrefslogtreecommitdiff
path: root/assets/sass/_table.sass
blob: 9b7581e4d22737464a0df13554232e7c38bdfafe (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
@import variables
@import mixins

table
  width: 100%
  border-collapse: collapse
  border-spacing: 0
  margin-bottom: 20px

  &.table-fixed
    table-layout: fixed
    white-space: nowrap
    th
      overflow: hidden
    td
      white-space: nowrap
      overflow: hidden
      text-overflow: ellipsis

  &.table-small
    font-size: size('small')

  &.table-striped tr:nth-child(odd)
    background: bg-color('lighter')

  &.table-hover tr:hover
    background: map-get($highlight-colors, 'background')
    td
      border: 2px solid map-get($highlight-colors, 'border')

  &.table-scrolling
    @include sm-device
      overflow-x: auto
      display: inline-block
      vertical-align: top
      max-width: 100%
      white-space: nowrap

  th
    text-align: left
    padding: 0.5em 3px
    border: 1px solid #eee
    background: bg-color('primary')

    a
      text-decoration: none
      color: color('primary')
      &:focus, &:hover
        text-decoration: underline

  td
    border: 1px solid #eee
    padding: 0.5em 3px
    vertical-align: top

    li
      margin-left: 20px

@include col-x(100)