files.scss 4.8 KB
Newer Older
1 2 3 4
/**
 * File content holder
 *
 */
5
.file-holder {
6
  border: 1px solid $border-color;
7
  border-radius: $border-radius-default;
8

P
Phil Hughes 已提交
9 10 11 12
  &.file-holder-no-border {
    border: 0;
  }

D
Douwe Maan 已提交
13
  &.readme-holder {
14
    margin: $gl-padding 0;
D
Douwe Maan 已提交
15 16
  }

17 18 19 20
  table {
    @extend .table;
  }

21
  .file-title {
22
    position: relative;
A
Annabel Dunstone Gray 已提交
23
    background-color: $gray-light;
24
    border-bottom: 1px solid $border-color;
25 26
    margin: 0;
    text-align: left;
27
    padding: 10px $gl-padding;
28
    word-wrap: break-word;
29
    border-radius: $border-radius-default $border-radius-default 0 0;
30

P
Phil Hughes 已提交
31 32 33 34 35 36 37 38 39 40
    &.file-title-clear {
      padding-left: 0;
      padding-right: 0;
      background-color: transparent;

      .file-actions {
        right: 0;
      }
    }

41
    .file-actions {
42 43 44
      position: absolute;
      top: 5px;
      right: 15px;
45 46

      .btn {
47
        padding: 0 10px;
48 49 50
        font-size: 13px;
        line-height: 28px;
      }
51 52
    }

A
Annabel Dunstone 已提交
53
    a:not(.btn) {
54
      color: $gl-text-color;
55 56
    }

S
skv-headless 已提交
57 58 59
    .left-options {
      margin-top: -3px;
    }
60
  }
61

62
  .file-content {
S
Sam Rose 已提交
63
    background: $white-light;
64

65 66
    &.image_file,
    &.video {
S
Sam Rose 已提交
67
      background: $file-image-bg;
68
      text-align: center;
69
      padding: 30px;
P
Phil Hughes 已提交
70

71 72
      img,
      video {
73
        max-width: 80%;
74 75 76
      }
    }

D
Dmitriy Zaporozhets 已提交
77
    &.wiki {
78
      padding: 30px $gl-padding;
D
Dmitriy Zaporozhets 已提交
79 80
    }

81
    &.blob-no-preview {
S
Sam Rose 已提交
82 83
      background: $blob-bg;
      text-shadow: 0 1px 2px $white-light;
84 85 86
      padding: 100px 0;
    }

87 88 89 90
    /**
     *  Blame file
     */
    &.blame {
91
      table {
92 93
        border: none;
        margin: 0;
94
      }
95

96
      tr {
S
Sam Rose 已提交
97
        border-bottom: 1px solid $blame-border;
98 99 100 101

        &:last-child {
          border-bottom: none;
        }
102
      }
103

104
      td {
105 106 107
        border-top: none;
        border-bottom: none;

108
        &:first-child {
109
          border-left: none;
110
        }
111

112
        &:last-child {
113
          border-right: none;
114
        }
115
      }
116

117
      td.blame-commit {
118
        padding: 5px 10px;
P
Phil Hughes 已提交
119
        min-width: 400px;
120
        background: $gray-light;
121
      }
122

123 124
      td.line-numbers {
        float: none;
S
Sam Rose 已提交
125
        border-left: 1px solid $blame-line-numbers-border;
A
Annabel Dunstone 已提交
126 127 128 129 130

        i {
          float: none;
          margin-right: 0;
        }
131
      }
132

133
      td.lines {
134
        padding: 0;
135
      }
136 137 138
    }

    &.logs {
S
Sam Rose 已提交
139
      background: $logs-bg;
140 141 142 143
      max-height: 700px;
      overflow-y: auto;

      ol {
144
        margin-left: 40px;
145
        padding: 10px 0;
146
        border-left: 1px solid $border-color;
147
        margin-bottom: 0;
S
Sam Rose 已提交
148
        background: $white-light;
149

150
        li {
S
Sam Rose 已提交
151
          color: $logs-li-color;
152

153
          p {
154
            margin: 0;
S
Sam Rose 已提交
155
            color: $logs-p-color;
156
            line-height: 24px;
157 158 159 160
            padding-left: 10px;
          }

          &:hover {
P
Phil Hughes 已提交
161
            background: $row-hover;
162 163 164 165 166 167 168 169 170
          }
        }
      }
    }

    /**
     *  Code file
     */
    &.code {
R
Riyad Preukschas 已提交
171
      padding: 0;
172
    }
L
Luke "Jared" Bennett 已提交
173 174

    .list-inline.previews {
175 176 177 178 179
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      align-content: flex-start;
      align-items: baseline;
L
Luke "Jared" Bennett 已提交
180 181

      .preview {
182
        padding: $gl-padding;
L
Luke "Jared" Bennett 已提交
183 184
      }
    }
185 186
  }
}
187 188 189 190 191 192 193 194 195 196 197 198

span.idiff {
  &.left {
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
  }

  &.right {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
  }
}
199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247

.file-stats {
  ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;

    li {
      padding: 3px 0;
      line-height: 20px;
    }
  }

  .new-file {
    a {
      color: $gl-text-green;
    }
  }

  .renamed-file {
    a {
      color: $gl-text-orange;
    }
  }

  .deleted-file {
    a {
      color: $gl-text-red;
    }
  }

  .edit-file {
    a {
      color: $gl-text-color;
    }
  }

  a {
    text-decoration: none;

    .new-file {
      color: $notify-new-file;
    }

    .deleted-file {
      color: $notify-deleted-file;
    }
  }
}
248 249 250 251

.file-title-flex-parent {
  display: flex;
  align-items: center;
252
  justify-content: space-between;
253 254
  background-color: $gray-light;
  border-bottom: 1px solid $border-color;
255
  padding: 5px $gl-padding;
256
  margin: 0;
257
  border-radius: $border-radius-default $border-radius-default 0 0;
258

259
  .file-header-content {
260 261 262
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
263 264 265 266 267 268 269 270 271 272
    padding-right: 30px;
    position: relative;
  }

  .btn-clipboard {
    position: absolute;
    right: 0;
  }

  a {
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287
    color: $gl-text-color;
  }

  small {
    margin: 0 10px 0 0;
  }

  .file-actions {
    white-space: nowrap;

    .btn {
      padding: 0 10px;
      font-size: 13px;
      line-height: 28px;
      display: inline-block;
288
      float: none;
289 290 291
    }
  }
}
P
Phil Hughes 已提交
292 293 294 295 296 297

.is-stl-loading {
  .stl-controls {
    display: none;
  }
}
E
Eric Eastwood 已提交
298 299 300 301 302 303 304 305 306 307 308 309 310

.file-fork-suggestion {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background-color: $gray-light;
  border-bottom: 1px solid $border-color;
  padding: 5px $gl-padding;
}

.file-fork-suggestion-note {
  margin-right: 1.5em;
}