markdown_area.scss 4.6 KB
Newer Older
1 2 3 4 5 6 7 8
.div-dropzone-wrapper {
  .div-dropzone {
    position: relative;

    .div-dropzone-hover {
      position: absolute;
      top: 50%;
      left: 50%;
P
Phil Hughes 已提交
9 10
      margin-top: -11.5px;
      margin-left: -15px;
11
      opacity: 0;
P
Phil Hughes 已提交
12
      font-size: 30px;
13
      transition: opacity 200ms ease-in-out;
14
      pointer-events: none;
15 16 17 18
    }

    .div-dropzone-spinner {
      position: absolute;
P
Phil Hughes 已提交
19 20
      bottom: 10px;
      right: 5px;
21
      opacity: 0;
P
Phil Hughes 已提交
22
      font-size: 20px;
23 24 25 26 27 28 29 30 31
      transition: opacity 200ms ease-in-out;
    }

    .div-dropzone-icon {
      display: block;
      text-align: center;
      font-size: inherit;
    }

N
Nikita Verkhovin 已提交
32 33 34 35 36 37 38 39 40
    .div-dropzone-progress {
      position: absolute;
      top: 7px;
      left: -40px;
      width: 35px;
      font-size: 13px;
      text-align: right;
    }

41 42 43 44 45 46 47 48 49 50 51
    .dz-preview {
      display: none;
    }
  }
}

.div-dropzone-alert {
  margin-top: 5px;
  margin-bottom: 0;
  transition: opacity 200ms ease-in-out;
}
V
Vinnie Okada 已提交
52

53 54 55 56
.md-area {
  position: relative;
}

57 58 59
.md-header {
  .nav-links {
    a {
60
      width: 100%;
61
      padding-top: 0;
F
Filipa Lacerda 已提交
62
      line-height: 19px;
J
Jacob Schatz 已提交
63

F
Filipa Lacerda 已提交
64 65 66 67
      &:focus {
        margin-top: -10px;
        padding-top: 10px;
      }
68 69 70 71
    }
  }
}

72
.md-header-tab {
C
Clement Ho 已提交
73
  @include media-breakpoint-down(xs) {
74
    flex: 1;
75
    flex-direction: column;
76 77 78 79 80 81
    width: 100%;
    border-bottom: 1px solid $border-color;
    text-align: center;
  }
}

82 83 84 85
.nav-links {
  li.md-header-toolbar {
    margin-left: auto;
    display: none;
86

87 88 89
    &.active {
      display: block;

C
Clement Ho 已提交
90
      @include media-breakpoint-down(xs) {
A
Annabel Dunstone Gray 已提交
91 92 93 94 95 96 97
        flex: none;
        display: flex;
        justify-content: center;
        width: 100%;
        padding-top: $gl-padding-top;
        padding-bottom: $gl-padding-top;
      }
98
    }
99 100 101
  }
}

102
.referenced-users {
T
tauriedavis 已提交
103
  color: $gl-text-color;
104
  padding-top: 10px;
105 106
}

107 108 109 110 111 112 113 114 115 116
.referenced-commands {
  background: $blue-50;
  padding: $gl-padding-8 $gl-padding;
  border-radius: $border-radius-default;

  p {
    margin: 0;
  }
}

V
Vinnie Okada 已提交
117
.md-preview-holder {
P
Phil Hughes 已提交
118 119
  min-height: 167px;
  padding: 10px 0;
120
  overflow-x: auto;
V
Vinnie Okada 已提交
121 122
}

123
.markdown-area {
C
Clement Ho 已提交
124
  border-radius: 0;
S
Sam Rose 已提交
125
  background: $white-light;
126
  border: 1px solid $gray-100;
D
Dmitriy Zaporozhets 已提交
127
  min-height: 140px;
128
  max-height: 500px;
129 130 131 132
  padding: 5px;
  box-shadow: none;
  width: 100%;
}
A
Annabel Dunstone 已提交
133

C
Clement Ho 已提交
134
.md:not(.use-csslab) {
A
Annabel Dunstone 已提交
135
  &.md-preview-holder {
136
    // Reset ul style types since we're nested inside a ul already
137
    @include bulleted-list;
A
Annabel Dunstone 已提交
138
  }
139 140 141 142 143 144 145 146 147

  // On diffs code should wrap nicely and not overflow
  code {
    white-space: pre-wrap;
    word-break: keep-all;
  }

  hr {
    // Darken 'whitesmoke' a bit to make it more visible in note bodies
S
Sam Rose 已提交
148
    border-color: darken($gray-normal, 8%);
149 150 151 152 153
    margin: 10px 0;
  }

  // Border around images in issue and MR comments.
  img:not(.emoji) {
A
Annabel Dunstone Gray 已提交
154
    border: 1px solid $white-normal;
155 156 157 158 159
    padding: 5px;
    margin: 5px 0;
    // Ensure that image does not exceed viewport
    max-height: calc(100vh - 100px);
  }
B
blackst0ne 已提交
160 161 162 163

  table {
    @include markdown-table;
  }
A
Annabel Dunstone 已提交
164
}
P
Phil Hughes 已提交
165 166 167

.toolbar-btn {
  float: left;
T
Tim Zallmann 已提交
168
  padding: 0 7px;
P
Phil Hughes 已提交
169 170 171 172
  background: transparent;
  border: 0;
  outline: 0;

T
Tim Zallmann 已提交
173 174 175 176 177 178 179
  svg {
    width: 14px;
    height: 14px;
    margin-top: 3px;
    fill: $gl-text-color-secondary;
  }

180 181
  &:hover,
  &:focus {
T
Tim Zallmann 已提交
182
    svg {
A
Annabel Gray 已提交
183
      fill: $blue-600;
T
Tim Zallmann 已提交
184
    }
P
Phil Hughes 已提交
185 186
  }
}
187

188 189 190 191
.toolbar-fullscreen-btn {
  margin-left: $gl-padding;
  margin-right: -5px;

C
Clement Ho 已提交
192
  @include media-breakpoint-down(xs) {
193 194 195 196 197
    margin-left: 0;
    margin-right: 0;
  }
}

198
.atwho-view {
199 200 201
  overflow-y: auto;
  overflow-x: hidden;

202 203 204 205 206 207 208 209 210 211 212
  .name,
  small.aliases,
  small.params {
    float: left;
  }

  small.aliases,
  small.params {
    padding: 2px 5px;
  }

213 214 215 216 217 218 219 220 221
  small.description {
    float: right;
    padding: 3px 5px;
  }

  .avatar-inline {
    margin-bottom: 0;
  }

222 223 224 225 226 227 228
  .has-warning {
    .name,
    .description {
      color: $orange-700;
    }
  }

229 230
  .cur {
    .avatar {
231
      @include disableAllAnimation;
232
      border: 1px solid $white-light;
233 234
    }
  }
235 236

  ul > li {
237
    @include clearfix;
238 239
    white-space: nowrap;
  }
240

241
  // TODO: fallback to global style
242 243 244 245 246 247 248 249 250 251 252 253 254 255
  .atwho-view-ul {
    padding: 8px 1px;

    li {
      padding: 8px 16px;
      border: 0;

      &.cur {
        background-color: $gray-darker;
        color: $gl-text-color;

        small {
          color: inherit;
        }
256 257 258 259 260

        &.has-warning {
          color: $orange-700;
          background-color: $orange-100;
        }
261 262
      }

263 264 265 266 267 268 269 270 271 272
      div.avatar {
        display: inline-flex;
        justify-content: center;
        align-items: center;

        .center {
          line-height: 14px;
        }
      }

273 274 275 276 277 278
      strong {
        color: $gl-text-color;
      }
    }
  }
}
279

C
Clement Ho 已提交
280
@include media-breakpoint-down(xs) {
281 282 283 284 285 286 287 288 289
  .atwho-view-ul {
    width: 350px;
  }

  .atwho-view ul li {
    overflow: hidden;
    text-overflow: ellipsis;
  }
}