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 65
    &.image_file,
    &.video {
S
Sam Rose 已提交
66
      background: $file-image-bg;
67
      text-align: center;
P
Phil Hughes 已提交
68

69 70
      img,
      video {
71
        padding: 20px;
72
        max-width: 80%;
73 74 75
      }
    }

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

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

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

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

99
      td {
100
        &:first-child {
101
          border-left: none;
102
        }
103

104
        &:last-child {
105
          border-right: none;
106
        }
107
      }
108

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

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

        i {
          float: none;
          margin-right: 0;
        }
123
      }
124

125
      td.lines {
126
        padding: 0;
127
      }
128 129 130
    }

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

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

142
        li {
S
Sam Rose 已提交
143
          color: $logs-li-color;
144

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

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

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

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

  &.right {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
  }
}
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 226 227

.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;
    }
  }
}
228 229 230 231

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

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

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

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

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

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