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

.code {
  border-radius: @border-radius;
  color: @body-font-color;
  line-height: @line-height;
  position: relative;

  &::before {
    content: attr(data-lang);
    color: @gray-color;
    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%;
  }
}