common.scss 10.2 KB
Newer Older
1
/** COLORS **/
2
.cgray { color: $gl-text-color; }
3
.clgray { color: $common-gray-light; }
4 5
.cred { color: $red-500; }
.cgreen { color: $green-600; }
6
.cdark { color: $common-gray-dark; }
7

8 9 10
.fwhite { fill: $white-light; }
.fgray { fill: $gray-700; }

11 12 13 14
.text-plain,
.text-plain:hover {
  color: $gl-text-color;
}
15

16 17 18
.text-secondary {
  color: $gl-text-color-secondary;
}
19

20 21 22 23
.text-tertiary {
  color: $gl-text-color-tertiary;
}

24 25 26 27 28
.text-primary,
.text-primary:hover {
  color: $brand-primary;
}

29 30 31 32 33 34 35 36 37 38
.text-success,
.text-success:hover {
  color: $brand-success;
}

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

39 40 41 42 43
.text-danger-muted,
.text-danger-muted:hover {
  color: $red-300;
}

44 45 46 47 48 49 50 51 52 53
.text-warning,
.text-warning:hover {
  color: $brand-warning;
}

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

54 55 56 57
.bg-gray-light {
  background-color: $gray-light;
}

58 59 60 61
.bg-line-target-blue {
  background: $line-target-blue;
}

62
.text-break-word {
63
  word-break: break-all;
64 65
}

66 67 68 69 70
.text-underline,
.text-underline:hover {
  text-decoration: underline;
}

Tim Zallmann's avatar
Tim Zallmann committed
71 72 73 74 75
.hint {
  font-style: italic;
  color: $gl-gray-400;
}

76
.light { color: $gl-text-color; }
77

78
.slead {
79
  color: $gl-text-color;
80
  font-size: 14px;
81
  margin-bottom: 12px;
82
  font-weight: $gl-font-weight-normal;
83 84
  line-height: 24px;
}
85

86
.bold {
87
  font-weight: $gl-font-weight-bold;
88 89
}

90 91 92
.tab-content {
  overflow: visible;
}
93

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
94 95 96
pre {
  &.clean {
    background: none;
97
    border: 0;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
98 99
    margin: 0;
    padding: 0;
100 101
  }

102 103 104 105
  &.wrap {
    word-break: break-word;
    white-space: pre-wrap;
  }
106
}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
107

108
hr {
109
  margin: 24px 0;
110
  border-top: 1px solid darken($gray-normal, 8%);
111 112
}

113
.str-truncated {
114
  @include str-truncated;
115

116 117 118 119
  &-30 {
    @include str-truncated(30%);
  }

120 121 122 123 124 125 126
  &-60 {
    @include str-truncated(60%);
  }

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

129 130 131 132 133
.block-truncated {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

134
  > div:not(.block),
135 136 137 138 139
  .str-truncated {
    display: inline;
  }
}

140
.item-title { font-weight: $gl-font-weight-bold; }
141

Fatih Acet's avatar
Fatih Acet committed
142
.author-link {
143
  color: $blue-600;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
144 145
}

146 147 148 149
.author-link:hover {
  text-decoration: none;
}

150 151 152 153 154 155
table {
  a code {
    position: relative;
    top: -2px;
    margin-right: 3px;
  }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
156 157 158 159 160
}

.loading {
  margin: 20px auto;
  height: 40px;
161
  color: $gl-gray-700;
162 163
  font-size: 32px;
  text-align: center;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
164 165 166
}

p.time {
167
  color: $gl-gray-400;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
168 169 170 171 172 173 174 175
  font-size: 90%;
  margin: 30px 3px 3px 2px;
}

.highlight {
  text-shadow: none;
}

Tim Zallmann's avatar
Tim Zallmann committed
176
.thin-area {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
177 178 179 180 181
  height: 150px;
}

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

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
184 185
  .note-title {
    li {
186
      border-bottom: 0 !important;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
187 188 189 190 191 192 193 194 195 196
    }
  }
}

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

197 198
.wiki_content code,
.readme code {
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
199 200 201 202 203
  background-color: inherit;
}

.error-message {
  padding: 10px;
204
  background: $red-400;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
205
  margin: 0;
206
  color: $white-light;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
207 208

  a {
209
    color: $white-light;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
210 211 212 213
    text-decoration: underline;
  }
}

214 215 216
@mixin message($background-color, $border-color, $text-color) {
  border-left: 4px solid $border-color;
  color: $text-color;
217 218 219
  padding: $gl-padding $gl-padding-24;
  margin-bottom: $gl-padding-12;
  background-color: $background-color;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
220 221 222 223

  &.centered {
    text-align: center;
  }
224 225 226 227 228 229 230 231 232

  .close {
    svg {
      width: $gl-font-size-large;
      height: $gl-font-size-large;
    }

    color: inherit;
  }
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
233 234
}

235
.warning_message {
236
  @include message($orange-100, $orange-200, $orange-800);
237 238 239 240 241 242
}

.danger_message {
  @include message($red-100, $red-200, $red-900);
}

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
243 244
.gitlab-promo {
  a {
245
    color: $gl-gray-350;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
246 247 248 249 250 251 252
    margin-right: 30px;
  }
}

.milestone {
  .progress {
    margin-top: 4px;
253 254
    box-shadow: none;
    background-color: $border-gray-light;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
255 256 257 258 259
  }
}

img.emoji {
  height: 20px;
260
  vertical-align: top;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
261
  width: 20px;
262
  margin-top: 1px;
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
263 264 265 266 267 268 269 270 271 272 273 274 275
}

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

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

276 277
.footer-links {
  margin-bottom: 20px;
278

279 280 281
  a {
    margin-right: 15px;
  }
282
}
Robert Schilling's avatar
Robert Schilling committed
283

Clement Ho's avatar
Clement Ho committed
284
.card.card-body {
285
  margin-bottom: $gl-padding;
286 287 288 289

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

Robert Schilling's avatar
Robert Schilling committed
292
.search_box {
Clement Ho's avatar
Clement Ho committed
293
  @extend .card.card-body;
Robert Schilling's avatar
Robert Schilling committed
294 295 296
  text-align: center;
}

297 298 299
.dropzone .dz-preview .dz-progress {
  border-color: $border-color !important;

300
  .dz-upload {
301
    background: $green-500 !important;
302 303
  }

304
}
305

306 307 308 309
.dz-message {
  margin: 0;
}

310 311 312
.space-right {
  margin-right: 10px;
}
313

314
.alert {
315 316
  margin-bottom: $gl-padding;
}
317

318 319 320 321
.progress {
  height: 4px;
}

322
.project-item-select-holder {
323
  display: inline-block;
324 325
  position: relative;

326
  .project-item-select {
327 328 329
    position: absolute;
    top: 0;
    right: 0;
330
    min-width: 250px;
331 332 333
    visibility: hidden;
  }
}
334

335
.gl-accessibility {
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
336
  &:focus {
337 338
    display: flex;
    align-items: center;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
339 340 341 342 343 344 345
    top: 1px;
    left: 1px;
    width: auto;
    height: 100%;
    padding: 0 10px;
    clip: auto;
    text-decoration: none;
346
    color: $gl-text-color;
Annabel Dunstone Gray's avatar
Annabel Dunstone Gray committed
347 348 349
    background: $gray-light;
    z-index: 1;
  }
350
}
351

352 353 354 355 356
.bordered-box {
  border: 1px solid $border-color;
  border-radius: $border-radius-default;
}

357 358 359 360 361
.tooltip {
  .tooltip-inner {
    word-wrap: break-word;
  }
}
362 363 364

.disabled-content {
  pointer-events: none;
Tim Zallmann's avatar
Tim Zallmann committed
365
  opacity: 0.5;
366
}
367

368
.break-word {
369 370 371
  word-wrap: break-word;
}

372 373 374 375 376 377 378 379 380 381
.checkbox-icon-inline-wrapper {
  .checkbox {
    display: inline;

    label {
      display: inline;
    }
  }
}

382 383 384 385 386 387 388 389
.outline-0 {
  outline: 0;

  &:focus {
    outline: 0;
  }
}

390 391
/** COMMON CLASSES **/
.prepend-top-0 { margin-top: 0; }
392
.prepend-top-2 { margin-top: 2px; }
393
.prepend-top-4 { margin-top: $gl-padding-4; }
394
.prepend-top-5 { margin-top: 5px; }
395
.prepend-top-8 { margin-top: $grid-size; }
396 397 398
.prepend-top-10 { margin-top: 10px; }
.prepend-top-15 { margin-top: 15px; }
.prepend-top-default { margin-top: $gl-padding !important; }
399
.prepend-top-16 { margin-top: 16px; }
400
.prepend-top-20 { margin-top: 20px; }
401
.prepend-top-32 { margin-top: 32px; }
402
.prepend-left-2 { margin-left: 2px; }
403 404
.prepend-left-4 { margin-left: 4px; }
.prepend-left-5 { margin-left: 5px; }
405
.prepend-left-8 { margin-left: 8px; }
406
.prepend-left-10 { margin-left: 10px; }
407
.prepend-left-15 { margin-left: 15px; }
408 409
.prepend-left-default { margin-left: $gl-padding; }
.prepend-left-20 { margin-left: 20px; }
410
.prepend-left-32 { margin-left: 32px; }
411
.prepend-left-64 { margin-left: 64px; }
412
.append-right-4 { margin-right: 4px; }
413 414 415
.append-right-5 { margin-right: 5px; }
.append-right-8 { margin-right: 8px; }
.append-right-10 { margin-right: 10px; }
416
.append-right-15 { margin-right: 15px; }
417 418
.append-right-default { margin-right: $gl-padding; }
.append-right-20 { margin-right: 20px; }
419 420
.append-right-32 { margin-right: 32px; }
.append-right-48 { margin-right: 48px; }
421
.prepend-right-32 { margin-right: 32px; }
422
.append-bottom-0 { margin-bottom: 0; }
423
.append-bottom-4 { margin-bottom: $gl-padding-4; }
424
.append-bottom-5 { margin-bottom: 5px; }
425
.append-bottom-8 { margin-bottom: $grid-size; }
426 427 428 429
.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; }
430
.prepend-bottom-32 { margin-bottom: 32px; }
431 432
.inline { display: inline-block; }
.center { text-align: center; }
433 434
.block { display: block; }
.flex { display: flex; }
435
.vertical-align-top { vertical-align: top; }
436
.vertical-align-middle { vertical-align: middle; }
437
.vertical-align-sub { vertical-align: sub; }
Filipa Lacerda's avatar
Filipa Lacerda committed
438
.flex-align-self-center { align-self: center; }
439 440
.flex-grow { flex-grow: 1; }
.flex-no-shrink { flex-shrink: 0; }
441
.ws-initial { white-space: initial; }
442
.ws-normal { white-space: normal; }
443
.ws-pre-wrap { white-space: pre-wrap; }
444
.overflow-auto { overflow: auto; }
Tim Zallmann's avatar
Tim Zallmann committed
445

446 447 448 449 450 451
.d-flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

452 453
/** COMMON SIZING CLASSES **/
.w-0 { width: 0; }
454
.w-8em { width: 8em; }
455
.w-3rem { width: 3rem; }
456 457
.w-15p { width: 15%; }
.w-70p { width: 70%; }
458 459

.h-12em { height: 12em; }
460
.h-32-px { height: 32px;}
461

462 463
.mw-460 { max-width: 460px; }
.mw-6em { max-width: 6em; }
464
.mw-70p { max-width: 70%; }
465
.mw-90p { max-width: 90%; }
466

467
.min-height-0 { min-height: 0; }
468

469 470 471 472 473 474
.svg-w-100 {
  svg {
    width: 100%;
  }
}

475
/** COMMON SPACING CLASSES **/
476 477 478 479 480 481 482
@each $index, $padding in $spacing-scale {
  #{'.gl-p-#{$index}'} { padding: $padding; }
  #{'.gl-pl-#{$index}'} { padding-left: $padding; }
  #{'.gl-pr-#{$index}'} { padding-right: $padding; }
  #{'.gl-pt-#{$index}'} { padding-top: $padding; }
  #{'.gl-pb-#{$index}'} { padding-bottom: $padding; }
}
483 484 485 486 487 488 489 490 491 492 493

/**
 * 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;
}
494 495

/** COMMON POSITIONING CLASSES */
496 497 498 499
.position-bottom-0 { bottom: 0 !important; }
.position-left-0 { left: 0 !important; }
.position-right-0 { right: 0 !important; }
.position-top-0 { top: 0 !important; }
500 501 502 503 504 505 506 507 508 509 510 511

.drag-handle {
  width: 4px;

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

  &.is-dragging {
    background-color: $gray-600;
  }
}
512 513 514 515

.cursor-pointer {
  cursor: pointer;
}
516 517 518 519 520 521 522 523 524 525 526 527

// Make buttons/dropdowns full-width on mobile
.full-width-mobile {
  @include media-breakpoint-down(xs) {
    width: 100%;

    > .dropdown-menu,
    > .btn {
      width: 100%;
    }
  }
}
528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562

.onboarding-helper-container {
  bottom: 40px;
  right: 40px;
  font-size: $gl-font-size-small;
  background: $gray-100;
  width: 200px;
  border-radius: 24px;
  box-shadow: 0 2px 4px $issue-boards-card-shadow;
  z-index: 10000;

  .collapsible {
    max-height: 0;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
  }

  &.expanded {
    border-bottom-right-radius: $border-radius-default;
    border-bottom-left-radius: $border-radius-default;

    .collapsible {
      max-height: 1000px;
      transition: max-height 1s ease-in-out;
    }
  }

  .avatar {
    border-color: darken($gray-normal, 10%);

    img {
      width: 32px;
      height: 32px;
    }
  }
}
563 564

.gl-font-size-small { font-size: $gl-font-size-small; }
565 566
.gl-font-size-large { font-size: $gl-font-size-large; }

567
.gl-line-height-24 { line-height: $gl-line-height-24; }
568 569 570 571 572 573 574

.gl-font-size-12 { font-size: $gl-font-size-12; }
.gl-font-size-14 { font-size: $gl-font-size-14; }
.gl-font-size-16 { font-size: $gl-font-size-16; }
.gl-font-size-20 { font-size: $gl-font-size-20; }
.gl-font-size-28 { font-size: $gl-font-size-28; }
.gl-font-size-42 { font-size: $gl-font-size-42; }