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

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

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

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

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

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

      .file-actions {
        right: 0;
      }
    }

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

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

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

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

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

    &.image_file {
S
Sam Rose 已提交
65
      background: $file-image-bg;
66
      text-align: center;
P
Phil Hughes 已提交
67

68
      img {
69
        padding: 20px;
70
        max-width: 80%;
71 72 73
      }
    }

D
Dmitriy Zaporozhets 已提交
74
    &.wiki {
75
      padding: 30px $gl-padding;
D
Dmitriy Zaporozhets 已提交
76 77
    }

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

84 85 86 87
    /**
     *  Blame file
     */
    &.blame {
88
      table {
89 90
        border: none;
        margin: 0;
91
      }
92

93
      tr {
S
Sam Rose 已提交
94
        border-bottom: 1px solid $blame-border;
95
      }
96

97
      td {
98
        &:first-child {
99
          border-left: none;
100
        }
101

102
        &:last-child {
103
          border-right: none;
104
        }
105
      }
106

107
      td.blame-commit {
P
Phil Hughes 已提交
108 109
        padding: 0 10px;
        min-width: 400px;
110
        background: $gray-light;
111
      }
112

113 114
      td.line-numbers {
        float: none;
S
Sam Rose 已提交
115
        border-left: 1px solid $blame-line-numbers-border;
A
Annabel Dunstone 已提交
116 117 118 119 120

        i {
          float: none;
          margin-right: 0;
        }
121
      }
122

123
      td.lines {
124
        padding: 0;
125
      }
126 127 128
    }

    &.logs {
S
Sam Rose 已提交
129
      background: $logs-bg;
130 131 132 133
      max-height: 700px;
      overflow-y: auto;

      ol {
134
        margin-left: 40px;
135
        padding: 10px 0;
136
        border-left: 1px solid $border-color;
137
        margin-bottom: 0;
S
Sam Rose 已提交
138
        background: $white-light;
139

140
        li {
S
Sam Rose 已提交
141
          color: $logs-li-color;
142

143
          p {
144
            margin: 0;
S
Sam Rose 已提交
145
            color: $logs-p-color;
146
            line-height: 24px;
147 148 149 150
            padding-left: 10px;
          }

          &:hover {
P
Phil Hughes 已提交
151
            background: $row-hover;
152 153 154 155 156 157 158 159 160
          }
        }
      }
    }

    /**
     *  Code file
     */
    &.code {
R
Riyad Preukschas 已提交
161
      padding: 0;
162 163 164
    }
  }
}
165 166 167 168 169 170 171 172 173 174 175 176

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

  &.right {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
  }
}
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 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

.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;
    }
  }
}
226 227 228 229

.file-title-flex-parent {
  display: flex;
  align-items: center;
230
  justify-content: space-between;
231 232
  background-color: $gray-light;
  border-bottom: 1px solid $border-color;
233
  padding: 5px $gl-padding;
234 235 236
  margin: 0;
  border-radius: 3px 3px 0 0;

237
  .file-header-content {
238 239 240
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
241 242 243 244 245 246 247 248 249 250
    padding-right: 30px;
    position: relative;
  }

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

  a {
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
    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;
266
      float: none;
267 268 269
    }
  }
}
P
Phil Hughes 已提交
270 271 272 273 274 275

.is-stl-loading {
  .stl-controls {
    display: none;
  }
}
E
Eric Eastwood 已提交
276 277 278 279 280 281 282 283 284 285 286 287 288

.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;
}