forked from palantir/tslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
_base.scss
175 lines (146 loc) · 3.4 KB
/
_base.scss
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
/**
* Reset some basic elements
*/
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0;
}
/**
* Set `margin-bottom` to maintain vertical rhythm
*/
h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
%vertical-rhythm {
margin-bottom: 1rem;
}
/**
* Images
*/
img {
max-width: 100%;
vertical-align: middle;
}
/**
* Figures
*/
figure > img {
display: block;
}
figcaption {
font-size: $small-font-size;
}
/**
* Clearfix
*/
%clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
/**
* Icons
*/
.icon {
> svg {
display: inline-block;
width: 16px;
height: 16px;
vertical-align: middle;
path {
fill: $text-color;
}
}
}
/**
* Rules & Feature Badges
*/
.rules-list {
list-style: none;
margin: 0 !important; //need to override the `main-content ul` selector
> li {
&:nth-child(odd) {
a {
background-color: rgba(0, 0, 0, .03);
}
}
a {
display: block;
border-left: 3px solid transparent;
text-decoration: none;
padding: .75rem;
&:hover {
background-color: rgba(0, 0, 0,.075);
border-left-color: #159957;
}
}
}
}
.rule-features {
//This is the container for a list of feature badges
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
.feature {
//This is the setup for the a feature badge
display: inline-block;
margin-right: 2px;
padding: 2px 4px;
font-weight: 700;
line-height: 1;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border: 1px solid transparent;
border-radius: .25rem;
cursor: help;
&:before {
//This is the setup for the icon that appears inside the badge
display: inline-block;
margin-right: 2px;
}
&.feature-sm {
//This class is added to make the feature badge smaller. This is used on the rules list
padding: 1px 3px;
font-size: 75%;
}
&.feature-ts-only {
//This feature badge is added to rules that are "TypeScript Only"
background-color: #FCF8E3;
border-color: #FAF2CC;
color: #8A6D3B;
&:before {
content: "\1F4C4"; //"page facing up" icon - http://www.fileformat.info/info/unicode/char/1F4C4/index.htm
}
}
&.feature-fixer {
//This feature badge is added to rules that have an auto-fixer
background-color: #DFF0D8;
border-color: #D0E9C6;
color: #3C763D;
&:before {
content: "\1f527"; //"wrench" icon - http://www.fileformat.info/info/unicode/char/1f527/index.htm
}
}
&.feature-requires-type-info {
//This feature badge is added to rules that require type information
background-color: #F2DEDE;
border-color: #EBCCCC;
color: #A94442;
&:before {
content: "\2139"; //"information source" icon - http://www.fileformat.info/info/unicode/char/2139/index.htm
//Surround it with a blue circle
border-radius: 50%;
background: #0078D7;
color: #FFF;
width: 1em;
}
}
}