Summary Files Commits Branches @commit @diff @stats
path: root / src / _codes.scss
blob: 23ebad2c6d507aa69e2e5fb7b5e66b45104687a0 (plain) (blame)
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
// Codes
code {
  @include label-base();
  @include label-variant($code-color, lighten($dark-color, 4%));
  border: 1px solid lighten($dark-color, 10%);
  font-size: 85%;
}

code.bright {
  @include label-base();
  @include label-variant($code-color, lighten($code-color, 42.5%));
  font-size: 85%;
}

.code {
  border-radius: $border-radius;
  color: $body-font-color;
  position: relative;

  &::before {
    color: $gray-color;
    content: attr(data-lang);
    font-size: $font-size-sm;
    position: absolute;
    right: $layout-spacing;
    top: $unit-h;
  }

  code {
    background: $bg-color;
    border: none;
    color: inherit;
    display: block;
    line-height: 1.5;
    overflow-x: auto;
    padding: 1rem;
    width: 100%;
  }
}