chrome.scss 3.1 KB
Newer Older
1 2 3 4 5 6
// Copyright 2015 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
B
bryk 已提交
7
//     http://www.apache.org/licenses/LICENSE-2.0
8 9 10 11 12 13 14
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

15
@import '../variables';
16

17 18
.kd-toolbar-logo {
  height: 42px;
B
bryk 已提交
19
  margin-right: 1em;
B
bryk 已提交
20
  width: 42px;
21
}
B
bryk 已提交
22 23

.kd-toolbar {
24
  box-shadow: $whiteframe-shadow-1dp;
M
Marcin Maciaszczyk 已提交
25
  height: $toolbar-height-size-base;
26
  position: fixed !important;
27 28 29 30 31 32 33 34
}

.kd-chrome-content {
  padding-top: $toolbar-height-size-base;
}

.kd-chrome-has-actionbar {
  padding-top: 2 * $toolbar-height-size-base;
35 36 37 38

  @media only screen and (max-width: $layout-breakpoint-sm) {
    padding-top: $toolbar-height-size-base + $toolbar-height-size-base-sm;
  }
B
bryk 已提交
39
}
B
bryk 已提交
40

41 42
body {
  background-color: $body;
43
  height: 100%;
B
bryk 已提交
44
}
45 46

a {
B
bryk 已提交
47
  color: $primary;
48
  text-decoration: inherit;
B
bryk 已提交
49 50 51 52

  &:visited {
    color: $primary;
  }
53
}
54

P
Piotr Bryk 已提交
55 56 57 58 59 60 61 62
.kd-success {
  color: $success-color;
}

.kd-error {
  color: $error-color;
}

M
Marcin Maciaszczyk 已提交
63
.kd-toolbar-tools {
64
  margin: auto;
65 66 67
}

.kd-app-content {
68
  background-color: $body;
69 70
  position: relative;
}
B
bryk 已提交
71

B
bryk 已提交
72
.kd-center-fixed {
B
bryk 已提交
73 74 75 76 77 78 79 80 81 82
  align-items: center;
  bottom: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
}
B
bryk 已提交
83 84 85 86 87 88 89

.kd-text-icon {
  font-size: inherit;
  height: inherit;
  vertical-align: middle;
}

90
.kd-comma-separated-item {
91
  &:not(:last-child) {
92
    &:after {
93
      content: ',';
94
    }
95

96 97
  }
}
98 99 100 101 102

// Disables animation on md-tab switch. Avoids some flickering and is simpler.
[role='tabpanel'] {
  transition: none;
}
103 104 105 106

// Responsive table style.
@media only screen and (max-width: $layout-breakpoint-xs) {
  .kd-responsive-table {
107
    table-layout: fixed;
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
    width: 100%;

    // Switches table to blocks.
    thead,
    tbody,
    tr,
    th {
      display: block;
    }

    // Removes table headers.
    thead {
      tr,
      th {
        display: none;
      }
    }

    // Adds border between records.
    tr {
      &:not(:last-child) {
        border-bottom: $baseline-grid / 2 solid $border;
      }
    }

    // Row data style.
    td {
M
Marcin Maciaszczyk 已提交
135 136
      align-items: center;
      display: flex;
137
      height: auto;
M
Marcin Maciaszczyk 已提交
138
      min-height: $table-cell-height - 2 * $baseline-grid;
139
      padding: $baseline-grid $baseline-grid $baseline-grid 12 * $baseline-grid;
140 141
      position: relative;

M
Marcin Maciaszczyk 已提交
142 143 144 145 146
      // Adds border between rows.
      &:not(:last-child) {
        border-bottom: 1px solid $border;
      }

147 148
      // Row title style.
      &::before {
M
Marcin Maciaszczyk 已提交
149 150
        align-items: center;
        bottom: 0;
151
        content: attr(kd-responsive-header);
M
Marcin Maciaszczyk 已提交
152
        display: flex;
153 154 155 156
        font-weight: $bold-font-weight;
        left: $baseline-grid * 2;
        padding-right: $baseline-grid * 2;
        position: absolute;
M
Marcin Maciaszczyk 已提交
157
        top: 0;
158 159 160 161 162
        word-wrap: break-word;
      }
    }
  }
}