common.scss 7.89 KB
Newer Older
1
/** COLORS **/
2
.cgray { color: $gl-text-color; }
Sam Rose's avatar
Sam Rose committed
3
.clgray { color: $common-gray-light; }
4 5
.cred { color: $red-500; }
.cgreen { color: $green-600; }
Sam Rose's avatar
Sam Rose committed
6
.cdark { color: $common-gray-dark; }
7 8 9 10 11

.text-plain,
.text-plain:hover {
  color: $gl-text-color;
}
12

13 14 15
.text-secondary {
  color: $gl-text-color-secondary;
}
16

17 18 19 20
.text-tertiary {
  color: $gl-text-color-tertiary;
}

21 22 23 24 25
.text-primary,
.text-primary:hover {
  color: $brand-primary;
}

26 27 28 29 30 31 32 33 34 35
.text-success,
.text-success:hover {
  color: $brand-success;
}

.text-danger,
.text-danger:hover {
  color: $brand-danger;
}

36 37 38 39 40
.text-danger-muted,
.text-danger-muted:hover {
  color: $red-300;
}

41 42 43 44 45 46 47 48 49 50
.text-warning,
.text-warning:hover {
  color: $brand-warning;
}

.text-info,
.text-info:hover {
  color: $brand-info;
}

51
.text-break-word {
Fernando Arias's avatar
Fernando Arias committed
52
  word-break: break-all;
53 54
}

55 56 57 58 59
.text-underline,
.text-underline:hover {
  text-decoration: underline;
}

Tim Zallmann's avatar
Tim Zallmann committed
60 61 62 63 64
.hint {
  font-style: italic;
  color: $gl-gray-400;
}

65
.light { color: $gl-text-color; }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
66

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
67
.slead {
68
  color: $gl-text-color;
69
  font-size: 14px;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
70
  margin-bottom: 12px;
71
  font-weight: $gl-font-weight-normal;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
72 73
  line-height: 24px;
}
74

75
.bold {
76
  font-weight: $gl-font-weight-bold;
77 78
}

79 80 81
.tab-content {
  overflow: visible;
}
82

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
83 84 85
pre {
  &.clean {
    background: none;
86
    border: 0;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
87 88
    margin: 0;
    padding: 0;
89 90
  }

91 92 93 94
  &.wrap {
    word-break: break-word;
    white-space: pre-wrap;
  }
95
}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
96

97
hr {
98
  margin: 24px 0;
99
  border-top: 1px solid darken($gray-normal, 8%);
100 101
}

102
.str-truncated {
103
  @include str-truncated;
104

105 106 107 108
  &-30 {
    @include str-truncated(30%);
  }

109 110 111 112 113 114 115
  &-60 {
    @include str-truncated(60%);
  }

  &-100 {
    @include str-truncated(100%);
  }
116
}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
117

118 119 120 121 122 123 124 125 126 127 128
.block-truncated {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  > div,
  .str-truncated {
    display: inline;
  }
}

129
.item-title { font-weight: $gl-font-weight-bold; }
130

Fatih Acet's avatar
Fatih Acet committed
131
.author-link {
Annabel Gray's avatar
Annabel Gray committed
132
  color: $blue-600;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
133 134
}

135 136 137 138
.author-link:hover {
  text-decoration: none;
}

139 140 141 142 143 144
table {
  a code {
    position: relative;
    top: -2px;
    margin-right: 3px;
  }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
145 146 147 148 149
}

.loading {
  margin: 20px auto;
  height: 40px;
150
  color: $gl-gray-700;
151 152
  font-size: 32px;
  text-align: center;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
153 154 155
}

p.time {
156
  color: $gl-gray-400;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
157 158 159 160 161 162 163 164
  font-size: 90%;
  margin: 30px 3px 3px 2px;
}

.highlight {
  text-shadow: none;
}

Tim Zallmann's avatar
Tim Zallmann committed
165
.thin-area {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
166 167 168 169 170
  height: 150px;
}

// Fix issue with notes & lists creating a bunch of bottom borders.
li.note {
171
  img { max-width: 100%; }
Tim Zallmann's avatar
Tim Zallmann committed
172

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
173 174
  .note-title {
    li {
175
      border-bottom: 0 !important;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
176 177 178 179 180 181 182 183 184 185
    }
  }
}

.markdown {
  img {
    max-width: 100%;
  }
}

186 187
.wiki_content code,
.readme code {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
188 189 190
  background-color: inherit;
}

191
.show-suppressed-diff,
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
192 193 194 195 196 197
.show-all-commits {
  cursor: pointer;
}

.error-message {
  padding: 10px;
198
  background: $red-400;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
199
  margin: 0;
Sam Rose's avatar
Sam Rose committed
200
  color: $white-light;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
201 202

  a {
Sam Rose's avatar
Sam Rose committed
203
    color: $white-light;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
204 205 206 207 208
    text-decoration: underline;
  }
}

.warning_message {
209 210
  border-left: 4px solid $orange-200;
  color: $orange-700;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
211 212
  padding: 10px;
  margin-bottom: 10px;
213
  background: $orange-100;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
214 215 216 217 218 219 220 221 222
  padding-left: 20px;

  &.centered {
    text-align: center;
  }
}

.gitlab-promo {
  a {
223
    color: $gl-gray-350;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
224 225 226 227 228 229 230
    margin-right: 30px;
  }
}

.milestone {
  .progress {
    margin-top: 4px;
231 232
    box-shadow: none;
    background-color: $border-gray-light;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
233 234 235 236 237
  }
}

img.emoji {
  height: 20px;
Clement Ho's avatar
Clement Ho committed
238
  vertical-align: top;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
239
  width: 20px;
240
  margin-top: 1px;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
241 242 243 244 245 246 247 248 249 250 251 252 253
}

.chart {
  overflow: hidden;
  height: 220px;
}

.description-block {
  @extend .light-well;
  @extend .light;
  margin-bottom: 10px;
}

254 255
.footer-links {
  margin-bottom: 20px;
256

257 258 259
  a {
    margin-right: 15px;
  }
260
}
Robert Schilling's avatar
Robert Schilling committed
261

Clement Ho's avatar
Clement Ho committed
262
.card.card-body {
263
  margin-bottom: $gl-padding;
264 265 266 267

  hr {
    border-color: $gray-darker;
  }
Douwe Maan's avatar
Douwe Maan committed
268 269
}

Robert Schilling's avatar
Robert Schilling committed
270
.search_box {
Clement Ho's avatar
Clement Ho committed
271
  @extend .card.card-body;
Robert Schilling's avatar
Robert Schilling committed
272 273 274
  text-align: center;
}

275 276 277
.dropzone .dz-preview .dz-progress {
  border-color: $border-color !important;

278
  .dz-upload {
279
    background: $green-500 !important;
280 281
  }

282
}
283

284 285 286 287
.dz-message {
  margin: 0;
}

288 289 290
.space-right {
  margin-right: 10px;
}
291

292
.alert {
293 294
  margin-bottom: $gl-padding;
}
295

296 297 298 299
.progress {
  height: 4px;
}

Phil Hughes's avatar
Phil Hughes committed
300
.project-item-select-holder {
301
  display: inline-block;
302 303
  position: relative;

Phil Hughes's avatar
Phil Hughes committed
304
  .project-item-select {
305 306 307
    position: absolute;
    top: 0;
    right: 0;
308
    min-width: 250px;
309 310 311
    visibility: hidden;
  }
}
312

313
.gl-accessibility {
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
314
  &:focus {
315 316
    display: flex;
    align-items: center;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
317 318 319 320 321 322 323
    top: 1px;
    left: 1px;
    width: auto;
    height: 100%;
    padding: 0 10px;
    clip: auto;
    text-decoration: none;
tauriedavis's avatar
tauriedavis committed
324
    color: $gl-text-color;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
325 326 327
    background: $gray-light;
    z-index: 1;
  }
328
}
329

330 331 332 333 334
.bordered-box {
  border: 1px solid $border-color;
  border-radius: $border-radius-default;
}

335 336 337 338 339
.tooltip {
  .tooltip-inner {
    word-wrap: break-word;
  }
}
340 341 342

.disabled-content {
  pointer-events: none;
Tim Zallmann's avatar
Tim Zallmann committed
343
  opacity: 0.5;
344
}
345

346
.break-word {
347 348 349
  word-wrap: break-word;
}

350 351 352 353 354 355 356 357 358 359
.checkbox-icon-inline-wrapper {
  .checkbox {
    display: inline;

    label {
      display: inline;
    }
  }
}

360 361 362 363 364 365 366 367
.outline-0 {
  outline: 0;

  &:focus {
    outline: 0;
  }
}

368 369
/** COMMON CLASSES **/
.prepend-top-0 { margin-top: 0; }
370
.prepend-top-2 { margin-top: 2px; }
371
.prepend-top-4 { margin-top: $gl-padding-4; }
372
.prepend-top-5 { margin-top: 5px; }
373
.prepend-top-8 { margin-top: $grid-size; }
374 375 376
.prepend-top-10 { margin-top: 10px; }
.prepend-top-15 { margin-top: 15px; }
.prepend-top-default { margin-top: $gl-padding !important; }
377
.prepend-top-16 { margin-top: 16px; }
378 379 380
.prepend-top-20 { margin-top: 20px; }
.prepend-left-4 { margin-left: 4px; }
.prepend-left-5 { margin-left: 5px; }
381
.prepend-left-8 { margin-left: 8px; }
382 383 384
.prepend-left-10 { margin-left: 10px; }
.prepend-left-default { margin-left: $gl-padding; }
.prepend-left-20 { margin-left: 20px; }
385
.append-right-4 { margin-right: 4px; }
386 387 388 389 390 391
.append-right-5 { margin-right: 5px; }
.append-right-8 { margin-right: 8px; }
.append-right-10 { margin-right: 10px; }
.append-right-default { margin-right: $gl-padding; }
.append-right-20 { margin-right: 20px; }
.append-bottom-0 { margin-bottom: 0; }
392
.append-bottom-4 { margin-bottom: $gl-padding-4; }
393
.append-bottom-5 { margin-bottom: 5px; }
394
.append-bottom-8 { margin-bottom: $grid-size; }
395 396 397 398 399 400 401
.append-bottom-10 { margin-bottom: 10px; }
.append-bottom-15 { margin-bottom: 15px; }
.append-bottom-20 { margin-bottom: 20px; }
.append-bottom-default { margin-bottom: $gl-padding; }
.inline { display: inline-block; }
.center { text-align: center; }
.vertical-align-middle { vertical-align: middle; }
402
.vertical-align-sub { vertical-align: sub; }
Filipa Lacerda's avatar
Filipa Lacerda committed
403
.flex-align-self-center { align-self: center; }
404 405
.flex-grow { flex-grow: 1; }
.flex-no-shrink { flex-shrink: 0; }
406
.ws-initial { white-space: initial; }
407
.ws-normal { white-space: normal; }
408
.overflow-auto { overflow: auto; }
Tim Zallmann's avatar
Tim Zallmann committed
409

410 411 412 413 414
.d-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
415 416 417

/** COMMON SIZING CLASSES **/
.w-0 { width: 0; }
Paul Slaughter's avatar
Paul Slaughter committed
418 419 420

.h-12em { height: 12em; }

421 422
.mw-460 { max-width: 460px; }
.mw-6em { max-width: 6em; }
Paul Slaughter's avatar
Paul Slaughter committed
423

Paul Slaughter's avatar
Paul Slaughter committed
424
.min-height-0 { min-height: 0; }
425

426 427 428 429
.w-3 { width: #{3 * $grid-size}; }

.h-3 { width: #{3 * $grid-size}; }

430
/** COMMON SPACING CLASSES **/
431 432 433 434 435 436 437 438 439 440 441 442 443
.gl-pl-0 { padding-left: 0; }
.gl-pl-1 { padding-left: #{0.5 * $grid-size}; }
.gl-pl-2 { padding-left: $grid-size; }
.gl-pl-3 { padding-left: #{2 * $grid-size}; }
.gl-pl-4 { padding-left: #{3 * $grid-size}; }
.gl-pl-5 { padding-left: #{4 * $grid-size}; }

.gl-pr-0 { padding-right: 0; }
.gl-pr-1 { padding-right: #{0.5 * $grid-size}; }
.gl-pr-2 { padding-right: $grid-size; }
.gl-pr-3 { padding-right: #{2 * $grid-size}; }
.gl-pr-4 { padding-right: #{3 * $grid-size}; }
.gl-pr-5 { padding-right: #{4 * $grid-size}; }
444 445 446 447 448 449 450 451 452 453 454

/**
 * Removes browser specific clear icon from input fields in
 * Internet Explorer 10, Internet Explorer 11, and Microsoft Edge.
 * This is intended for elements which add a customized clear icon.
 *
 * see also https://developer.mozilla.org/en-US/docs/Web/CSS/::-ms-clear
 */
.ms-no-clear ::-ms-clear {
  display: none;
}
455 456 457 458 459 460

/** COMMON POSITIONING CLASSES */
.position-bottom-0 { bottom: 0; }
.position-left-0 { left: 0; }
.position-right-0 { right: 0; }
.position-top-0 { top: 0; }
461 462 463 464 465 466 467 468 469 470 471 472

.drag-handle {
  width: 4px;

  &:hover {
    background-color: $white-normal;
  }

  &.is-dragging {
    background-color: $gray-600;
  }
}
473 474 475 476

.cursor-pointer {
  cursor: pointer;
}