Summary Files Commits Branches @commit @diff @stats
path: root / src / _codes.scss
blob: af7ac904ef3f32ac32e9a0e86ad163641230cbd3 (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
// Codes
code {
  @include label-base();
  @include label-variant($code-color, lighten($code-color, 33%));
  font-size: .65rem;
}

.code {
  border-radius: $border-radius;
  color: $body-font-color;
  line-height: $line-height;
  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;
    color: inherit;
    display: block;
    line-height: inherit;
    overflow-x: auto;
    padding: 1rem;
    width: 100%;
  }
}