forked from mohsen1/json-formatter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjson-formatter.less
111 lines (97 loc) · 2.12 KB
/
json-formatter.less
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
.theme(
@default-color: black,
@string-color: green,
@number-color: blue,
@boolean-color: red,
@null-color: #855A00,
@undefined-color: rgb(202, 11, 105),
@function-color: #FF20ED,
@rotate-time: 100ms,
@toggler-opacity: 0.6,
@toggler-color: #45376F,
@bracket-color: blue,
@key-color: #00008B,
@url-color: blue ){
font-family: monospace;
&, a, a:hover {
color: @default-color;
text-decoration: none;
}
.json-formatter-row {
margin-left: 1em;
}
.children {
&.empty {
opacity: 0.5;
margin-left: 1em;
&.object:after { content: "No properties"; }
&.array:after { content: "[]"; }
}
}
.string {
color: @string-color;
white-space: pre;
word-wrap: break-word;
}
.number { color: @number-color; }
.boolean { color: @boolean-color; }
.null { color: @null-color; }
.undefined { color: @undefined-color; }
.function { color: @function-color; }
.date { background-color: fade(@default-color, 5%); }
.url {
text-decoration: underline;
color: @url-color;
cursor: pointer;
}
.bracket { color: @bracket-color; }
.key {
color: @key-color;
cursor: pointer;
}
.constructor-name {
cursor: pointer;
}
.toggler {
font-size: 0.8em;
line-height: 1.2em;
vertical-align: middle;
opacity: 0.6;
cursor: pointer;
&:after {
display: inline-block;
transition: transform @rotate-time ease-in;
content: "►";
}
&.open:after{
transform: rotate(90deg);
}
}
> a >.thumbnail-text {
opacity: 0;
transition: opacity .15s ease-in;
font-style: italic;
}
&:hover > a > .thumbnail-text {
opacity: 0.6;
}
}
.json-formatter-row {
.theme();
}
.json-formatter-dark.json-formatter-row {
.theme(
@default-color: white,
@string-color: #31F031,
@number-color: #66C2FF,
@boolean-color: #EC4242,
@null-color: #EEC97D,
@undefined-color: rgb(239, 143, 190),
@function-color: #FD48CB,
@rotate-time: 100ms,
@toggler-opacity: 0.6,
@toggler-color: #45376F,
@bracket-color: #9494FF,
@key-color: #23A0DB,
@url-color: #027BFF);
}