This repository has been archived by the owner on Jan 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.less
200 lines (162 loc) · 4 KB
/
index.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
@import "./styles/base.less";
@brownish: #cc7833;
@redish: #da4939;
@lightgreen: #a5c261;
@darkgreen: #429965;
@lightblue: #6e9cbe;
@yellowish: #e8bf6a;
@greenish: #519f50;
@purpleish: saturate(darken(rgb(204,206,255), 1), 3);
.syntax--comment {
font-style: italic;
}
.syntax--entity {
// Ruby Slim : classes of div like .column
&.syntax--name.syntax--tag,
&.syntax--other.syntax--attribute-name {
color: @yellowish;
}
&.syntax--name.syntax--tag,
// Class name in "class TheClass" definition
&.syntax--name.syntax--type {
text-decoration: none;
}
&.syntax--other.syntax--inherited-class {
color: darken(@yellowish, 15)
}
}
.syntax--keyword {
color: @brownish;
&.syntax--control {
color: @brownish;
}
&.syntax--operator {
color: #999;
}
// Language keywords : initialize raise private attr_reader etc.
&.syntax--other.syntax--special-method {
color: @brownish;
}
// &.syntax--other.syntax--unit {
// color: @orange;
// }
}
.syntax--string {
// Text inside strings
color: @lightgreen;
// All text inside the regexps
&.syntax--regexp {
color: @darkgreen;
}
&.syntax--other.syntax--link {
color: @red;
}
// Ruby code inside a string
.syntax--source {
color: @darkgreen;
}
}
// In ruby that is "true" or "false" or "nil"
// Also ":" for hashes keys, symbols
.syntax--constant {
color: darken(@lightblue, 10);
&.syntax--numeric {
color: @lightgreen;
}
// Ruby symbols (only the text inside)
&.syntax--other.syntax--symbol {
color: @lightblue;
}
// CAPS constants
// Also, classes names passed as arguments.syntax-- Ex: include ThisClass
&.syntax--other.syntax--variable {
color: lighten(@redish, 20);
}
&.syntax--character.syntax--escape {
color: purple;
}
&.syntax--other.syntax--color {
color: @lightblue;
}
}
// Comments ! Of course ! :-)
.syntax--comment {
color: darken(@syntax-text-color, 32);
font-style: italic;
// The signs before comments : # or // or /*
&.syntax--punctuation.syntax--definition {
color: darken(@syntax-text-color, 42);
}
}
.syntax--punctuation {
// Ruby < symbol class inheritance
&.syntax--inheritance {
&.syntax--variable {
color: @brownish;
}
}
&.syntax--definition {
// Quotes surrounding a string
&.syntax--string {
color: darken(@lightgreen, 15);
}
// Parenthesis surrounding a function's params
&.syntax--parameters {
color: darken(@syntax-text-color, 20);
}
// Ruby << symbol for inheritance like in "class << self"
&.syntax--variable {
color: @brownish;
}
}
// Ruby embed code in a Slim template
// Example : #id This embed #{ ruby_code(42) } informations !
&.syntax--section.syntax--embedded {
color: @redish;
}
}
// The | character in a lambda's params for instance
.syntax--variable {
color: @redish;
// The instance variable name
&.syntax--instance,
// The @ sign before the instance variable name
.syntax--punctuation.syntax--variable {
color: @purpleish;
}
// The | character in lambda's params
&.syntax--punctuation.syntax--separator {
color: darken(@syntax-text-color, 20);
}
// Block params, between the two pipes, like |variable|
&.syntax--other.syntax--block {
color: @syntax-text-color;
}
&.syntax--interpolation {
color: @purpleish;
}
&.syntax--parameter.syntax--function {
color: @syntax-text-color;
}
&.syntax--language.syntax--self {
color: darken(@syntax-text-color, 20);
}
}
.syntax--support {
// Ruby constants in caps
// Class names
&.syntax--class {
color: lighten(@redish, 15);
}
// Method calls like "render", "content_for", etc. in rails' views
// or select gsub etc. in ruby code
//
// Somewhere in the CSS there is an !important on .syntax--support.syntax--function
// I can't find it but it overwrite this rule
&.syntax--function {
color: @syntax-text-color !important;
}
}
.syntax--support.syntax--function.syntax--kernel.syntax--ruby {
color: @purpleish;
}