Summary Files Commits Branches @commit @diff @stats
path: root / src / utilities / _divider.scss
blob: f233ed728f8b14e63ffc9f0a0876f72dac95e10a (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
40
41
42
43
44
45
46
47
48
49
50
// Divider
.divider,
.divider-vert {
  display: block;
  position: relative;

  &[data-content]::after {
    background: $bg-color-light;
    color: $gray-color;
    content: attr(data-content);
    display: inline-block;
    font-size: $font-size-sm;
    padding: 0 $unit-2;
    transform: translateY(-$font-size-sm + $border-width);
  }
}

.divider {
  border-top: $border-width solid darken($border-color-light, 60%);
  height: $border-width;
  margin: $unit-2 0;

  &[data-content] {
    margin: $unit-4 0;
  }
}

.divider-vert {
  display: block;
  padding: $unit-4;

  &::before {
    border-left: $border-width solid darken($border-color-light, 60%);
    bottom: $unit-2;
    content: "";
    display: block;
    left: 50%;
    position: absolute;
    top: $unit-2;
    transform: translateX(-50%);
  }

  &[data-content]::after {
    left: 50%;
    padding: $unit-1 0;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
  }
}