Welcome to mirror list, hosted at ThFree Co, Russian Federation.

source_editor.scss « framework « stylesheets « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0d235e17191328128467e6b0e845a1297fa1adc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[data-editor-loading] {
  position: relative;
  display: flex;
  @include gl-justify-content-center;
  align-items: center;
  z-index: 0;

  > * {
    filter: blur(5px);
  }

  &::before {
    content: '';
    @include spinner-deprecated(32px, 3px);
    position: absolute;
    z-index: 1;
  }

  pre {
    opacity: 0;
  }
}

[id^='source-editor-'] {
  height: 500px;
}

.source-editor-preview {
  display: flex;

  .md {
    @include gl-overflow-scroll;
    padding-left: $gl-spacing-scale-6;
    padding-right: $gl-spacing-scale-6;
    padding-top: $gl-spacing-scale-4;
    padding-bottom: $gl-spacing-scale-4;
    width: 100%;
  }

  .gl-source-editor {
    @include gl-order-n1;
    border-radius: 0 0 $border-radius-default $border-radius-default;
  }
}

.monaco-editor.gl-source-editor {
  // Fix unreadable headings in tooltips for syntax highlighting themes that don't match general theme
  &.vs-dark .markdown-hover {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      color: $source-editor-hover-light-text-color;
    }
  }

  &.vs .markdown-hover {
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
      color: $source-editor-hover-dark-text-color;
    }
  }

  .margin-view-overlays {
    .line-numbers {
      display: flex;
      @include gl-justify-content-end;
      position: relative;

      &::before {
        @include gl-visibility-hidden;
        align-self: center;
        background-color: $gray-400;
        margin-right: $gl-spacing-scale-2;
        width: $gl-spacing-scale-4;
        height: $gl-spacing-scale-4;
        mask-image: url('icons-stacked.svg#link');
        mask-repeat: no-repeat;
        mask-size: cover;
        mask-position: center;
        content: '';
      }

      &:hover {
        @include gl-text-decoration-underline;
        cursor: pointer !important;
      }

      &:hover::before {
        @include gl-visibility-visible;
      }

      &:focus::before {
        @include gl-visibility-visible;
        outline: auto;
      }

      .link-anchor {
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
      }
    }
  }

  // Remove custom focus from element
  .inputarea {
    @include gl-shadow-none;
  }
}

.active-line-text {
  background-color: $orange-600;
  @include gl-opacity-3;
}