summaryrefslogtreecommitdiff
path: root/app/assets/stylesheets/snippets.scss
blob: 93a12cf28a20589cc5de166eb830bd311962f5bd (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
@import "framework/variables";

.gitlab-embed-snippets {
  @import "highlight/embedded";
  @import "framework/images";

  $border-style: 1px solid $border-color;

  font-family: $regular-font;
  font-size: $gl-font-size;
  line-height: $code-line-height;
  color: $gl-text-color;
  margin: 20px;
  font-weight: $gl-font-weight-normal;

  .gl-snippet-icon {
    display: inline-block;
    background: url(asset_path('ext_snippet_icons/ext_snippet_icons.png')) no-repeat;
    overflow: hidden;
    text-align: left;
    width: 16px;
    height: 16px;
    background-size: cover;

    &.gl-snippet-icon-doc-code { background-position: 0 0;  }
    &.gl-snippet-icon-doc-text {  background-position: 0 -16px; }
    &.gl-snippet-icon-download {  background-position: 0 -32px; }
  }

  .blob-viewer {
    background-color: $white;
    text-align: left;
  }

  .file-content.code {
    border: $border-style;
    border-radius: 0 0 $border-radius-default $border-radius-default;
    display: flex;
    box-shadow: none;
    margin: 0;
    padding: 0;
    table-layout: fixed;

    .blob-content {
      overflow-x: auto;

      pre {
        height: 100%;
        padding: 10px;
        border: 0;
        border-radius: 0;
        margin: 0;
        overflow: auto;
        overflow-y: hidden;
        white-space: pre;
        word-wrap: normal;
        border-left: $border-style;
      }

      code {
        font-family: $monospace-font;
        font-size: $code-font-size;
        line-height: $code-line-height;
      }
    }

    .line-numbers {
      padding: 10px;
      text-align: right;
      float: left;

      .diff-line-num {
        font-family: $monospace-font;
        display: block;
        font-size: $code-font-size;
        min-height: $code-line-height;
        white-space: nowrap;
        color: $black-transparent;
        min-width: 30px;
      }

      .diff-line-num:hover {
        color: $almost-black;
        cursor: pointer;
      }
    }
  }

  .file-title-flex-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: $gray-light;
    border: $border-style;
    border-bottom: 0;
    padding: $gl-padding-top $gl-padding;
    margin: 0;
    border-radius: $border-radius-default $border-radius-default 0 0;

    .file-header-content {
      .file-title-name {
        font-weight: $gl-font-weight-bold;
      }

      .gitlab-embedded-snippets-title {
        text-decoration: none;
        color: $gl-text-color;

        &:hover {
          text-decoration: underline;
        }
      }

      .gitlab-logo-wrapper {
        padding-left: $gl-padding-8;
        position: relative;
        top: 2px;

        .gitlab-logo {
          height: 18px;
        }
      }
    }

    img,
    .gl-snippet-icon {
      display: inline-block;
      vertical-align: text-bottom;
    }
  }

  .btn-group {
    a.btn {
      background-color: $white;
      text-decoration: none;
      padding: 8px 9px;
      border: $border-style;
      border-right: 0;

      &:hover {
        background-color: $white-normal;
        border-color: $border-white-normal;
        text-decoration: none;
      }

      &:first-child {
        border-radius: $border-radius-default 0 0 $border-radius-default;
      }

      &:last-child {
        border-radius: 0 $border-radius-default $border-radius-default 0;
        border-right: $border-style;
      }
    }
  }
}