File size: 2,519 Bytes
3fe7ea8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
@mixin overflow-auto($direction: 'both') {
  @if $direction == 'both' {
    overflow: auto;
  } @else {
    overflow-#{$direction}: auto;
  }
  -webkit-overflow-scrolling: touch;
}

.dom {
  padding-bottom: 40px;
  .dom-tree {
    @include overflow-auto(y);
    overflow-x: hidden;
    word-wrap: break-word;
    padding: 10px 10px 10px 25px;
    font-size: 12px;
    height: 100%;
    font-family: Consolas, Lucida Console, Monaco, MonoSpace;
    cursor: default;
    & * {
      user-select: text;
    }
    .tree-item {
      line-height: 16px;
      min-height: 16px;
      position: relative;
      z-index: 10;
      .toggle-btn {
        position: absolute;
        display: block;
        width: 12px;
        height: 12px;
        left: -12px;
        top: 2px;
      }
      .selection {
        position: absolute;
        display: none;
        left: -10000px;
        right: -10000px;
        top: 0;
        bottom: 0;
        z-index: -1;
        background: var(--contrast);
      }
      &.selected {
        &.expandable.expanded:before {
          border-left-color: transparent;
        }
        .selection {
          display: block;
        }
      }
      .html-tag {
        color: var(--tag-name-color);
        .tag-name {
          color: var(--tag-name-color);
        }
        .attribute-name {
          color: var(--attribute-name-color);
        }
        .attribute-value {
          color: var(--string-color);
          &.attribute-underline {
            text-decoration: underline;
          }
        }
      }
      .html-comment {
        color: var(--comment-color);
      }
      &.expandable:before {
        content: '';
        width: 0;
        height: 0;
        border: 4px solid transparent;
        position: absolute;
        border-left-color: var(--foreground);
        left: -10px;
        top: 4px;
      }
      &.expandable.expanded:before {
        border-top-color: var(--foreground);
        border-left-color: transparent;
        left: -12px;
        top: 6px;
      }
    }
    .children {
      padding-left: 15px;
    }
  }
  .inspect {
    position: absolute;
    left: 0;
    bottom: 0;
    color: var(--foreground);
    border-top: 1px solid var(--border);
    width: 100%;
    background: var(--darker-background);
    display: block;
    height: 40px;
    line-height: 40px;
    text-decoration: none;
    text-align: center;
    margin-top: 10px;
    transition: background 0.3s;
    &:active {
      color: var(--select-foreground);
    }
  }
}