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

Phil Hughes's avatar
Phil Hughes committed
8 9 10 11
  &.file-holder-no-border {
    border: 0;
  }

12
  &.readme-holder {
13
    margin: $gl-padding-top 0;
14 15
  }

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

20
  .file-title {
21
    position: relative;
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;
Annabel Dunstone's avatar
Annabel Dunstone committed
28
    border-radius: 3px 3px 0 0;
29

Phil Hughes's avatar
Phil Hughes committed
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
    }

Annabel Dunstone's avatar
Annabel Dunstone committed
52
    a:not(.btn) {
53
      color: $gl-text-color;
54 55
    }

skv-headless's avatar
skv-headless committed
56 57 58
    .left-options {
      margin-top: -3px;
    }
59
  }
60

61
  .file-content {
62
    background: $white-light;
63 64

    &.image_file {
65
      background: $file-image-bg;
66
      text-align: center;
67

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

74
    &.wiki {
75
      padding: 30px $gl-padding;
76 77 78 79 80 81 82 83

      .highlight {
        margin-bottom: 9px;

        > pre {
          margin: 0;
        }
      }
84 85
    }

86
    &.blob-no-preview {
87 88
      background: $blob-bg;
      text-shadow: 0 1px 2px $white-light;
89 90 91
      padding: 100px 0;
    }

92 93 94 95
    /**
     *  Blame file
     */
    &.blame {
96
      table {
97 98
        border: none;
        margin: 0;
99
      }
100

101
      tr {
102
        border-bottom: 1px solid $blame-border;
103
      }
104

105
      td {
106
        &:first-child {
107
          border-left: none;
108
        }
109

110
        &:last-child {
111
          border-right: none;
112
        }
113
      }
114

115
      td.blame-commit {
116 117
        padding: 0 10px;
        min-width: 400px;
118
        background: $gray-light;
119
      }
120

121 122
      td.line-numbers {
        float: none;
123
        border-left: 1px solid $blame-line-numbers-border;
Annabel Dunstone's avatar
Annabel Dunstone committed
124 125 126 127 128

        i {
          float: none;
          margin-right: 0;
        }
129
      }
130

131
      td.lines {
132
        padding: 0;
133
      }
134 135 136
    }

    &.logs {
137
      background: $logs-bg;
138 139 140 141
      max-height: 700px;
      overflow-y: auto;

      ol {
142
        margin-left: 40px;
143
        padding: 10px 0;
144
        border-left: 1px solid $border-color;
145
        margin-bottom: 0;
146
        background: $white-light;
147

148
        li {
149
          color: $logs-li-color;
150

151
          p {
152
            margin: 0;
153
            color: $logs-p-color;
154
            line-height: 24px;
155 156 157 158
            padding-left: 10px;
          }

          &:hover {
159
            background: $row-hover;
160 161 162 163 164 165 166 167 168
          }
        }
      }
    }

    /**
     *  Code file
     */
    &.code {
169
      padding: 0;
170 171 172
    }
  }
}
173 174 175 176 177 178 179 180 181 182 183 184

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

  &.right {
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
  }
}
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 228 229 230 231 232 233

.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;
    }
  }
}
234 235 236 237

.file-title-flex-parent {
  display: flex;
  align-items: center;
238
  justify-content: space-between;
239 240
  background-color: $gray-light;
  border-bottom: 1px solid $border-color;
241
  padding: 5px $gl-padding;
242 243 244
  margin: 0;
  border-radius: 3px 3px 0 0;

245
  .file-header-content {
246 247 248
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
249 250 251 252 253 254 255 256 257 258
    padding-right: 30px;
    position: relative;
  }

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

  a {
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273
    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;
274
      float: none;
275 276 277
    }
  }
}
Phil Hughes's avatar
Phil Hughes committed
278 279 280 281 282 283

.is-stl-loading {
  .stl-controls {
    display: none;
  }
}
284 285 286 287 288 289 290 291 292 293 294 295 296

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