Skip to content

Commit 5cd2b3c

Browse files
Oleksandr Khlopiachyiakhlopiachyi
Oleksandr Khlopiachyi
authored andcommitted
Feature: add stylelinter config
1 parent 88e8d08 commit 5cd2b3c

File tree

85 files changed

+2845
-1578
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2845
-1578
lines changed

.stylelintrc.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"plugins": [
4+
"stylelint-order"
5+
],
6+
"rules": {
7+
"at-rule-no-unknown": null,
8+
"order/order": [
9+
"custom-properties",
10+
"declarations"
11+
],
12+
"order/properties-alphabetical-order": true,
13+
"no-descending-specificity": null
14+
}
15+
}

package.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,19 @@
3838
"redux": "^4.0.1",
3939
"redux-saga": "^0.16.2",
4040
"sinon": "^7.2.3",
41+
"stylelint": "^13.2.1",
42+
"stylelint-config-standard": "^20.0.0",
43+
"stylelint-order": "^4.0.0",
4144
"tslint": "^5.13.1",
4245
"ua-parser-js": "^0.7.19",
4346
"ws": "^7.2.0"
4447
},
4548
"scripts": {
4649
"build:css": "postcss src/index.pcss -o src/index.css",
4750
"watch:css": "postcss src/index.pcss -o src/index.css -w",
48-
"lint": "tsc --noEmit && tslint --project .",
51+
"lint": "yarn style:lint && tsc --noEmit && tslint --project .",
4952
"lint:fix": "tslint --project . --fix",
53+
"style:lint": "npx stylelint '**/*.pcss'",
5054
"mockAPI": "node mocks/mockAPI.js",
5155
"mockWS": "node mocks/mockWS.js",
5256
"start": "npm-run-all -p watch:css start-js",

postcss.config.js

-8
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,6 @@ module.exports = {
55
plugins: [
66
require('postcss-import'),
77
require('postcss-nested'),
8-
require('postcss-autoreset')({
9-
reset: {
10-
color: 'var(--base)',
11-
'font-size': 'var(--font-size)',
12-
'font-family': 'var(--font-family)',
13-
'background-color': 'var(--background-dark)',
14-
},
15-
}),
168
require('postcss-hexrgba'),
179
require('autoprefixer'),
1810
],

src/components/Beneficiaries/Beneficiaries.pcss

+39-34
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.pg-beneficiaries {
22
&__title {
33
color: var(--primary-text-color);
4+
font-size: 16px;
45
font-style: normal;
56
font-weight: 500;
6-
font-size: 16px;
77
line-height: 40px;
88
}
99

@@ -16,13 +16,13 @@
1616
height: 50px;
1717
justify-content: space-between;
1818
padding: 13px;
19-
transition: .2s;
19+
transition: 0.2s;
2020

2121
&__label {
2222
color: var(--primary-text-color);
23+
font-size: 12px;
2324
font-style: normal;
2425
font-weight: 500;
25-
font-size: 12px;
2626
line-height: 12px;
2727
}
2828

@@ -45,21 +45,17 @@
4545
min-height: calc(var(--big-gap) * 12);
4646
}
4747

48-
.beneficiaries-fail-modal .cr-email-form {
49-
min-height: calc(var(--big-gap) * 4);
50-
}
51-
5248
.beneficiaries-confirmation-modal .cr-email-form {
5349
min-height: calc(var(--big-gap) * 5.65);
5450
}
5551

5652
.beneficiaries-confirmation-modal {
5753
.confirmation-modal__content {
58-
display: flex;
5954
align-items: center;
60-
width: 100%;
55+
display: flex;
6156
height: 60px;
6257
margin: 10px 0 20px;
58+
width: 100%;
6359

6460
&__icon {
6561
margin: 0 19px 0 10px;
@@ -85,32 +81,33 @@
8581
border-radius: 4px;
8682
cursor: pointer;
8783
display: flex;
88-
transition: .2s;
84+
transition: 0.2s;
8985
width: 100%;
9086

91-
&__select, .select {
87+
&__select,
88+
.select {
9289
align-items: center;
9390
display: flex;
9491
flex-direction: row;
95-
justify-content: space-between;
9692
height: 70px;
93+
justify-content: space-between;
9794
padding: 0 22px 0 13px;
98-
transition: .2s;
95+
transition: 0.2s;
9996
user-select: none;
10097
width: 100%;
10198

10299
&__left {
103100
display: flex;
104101
flex-direction: column;
105-
justify-content: center;
106102
height: 70px;
103+
justify-content: center;
107104
width: 75%;
108105

109106
&__title {
110107
color: var(--secondary-contrast-cta-color);
108+
font-size: 10px;
111109
font-style: normal;
112110
font-weight: 500;
113-
font-size: 10px;
114111
line-height: 12px;
115112
}
116113

@@ -152,16 +149,16 @@
152149

153150
&__select {
154151
color: var(--secondary-contrast-cta-color);
152+
font-size: 12px;
155153
font-style: normal;
156154
font-weight: normal;
157-
font-size: 12px;
158155
line-height: 12px;
159156
margin-right: 12px;
160157
}
161158

162159
&__chevron {
163160
display: flex;
164-
transition: transform .3s;
161+
transition: transform 0.3s;
165162
width: 12px;
166163
}
167164
}
@@ -183,10 +180,11 @@
183180
}
184181
}
185182

186-
&__tip, .tip {
183+
&__tip,
184+
.tip {
187185
background: var(--body-background-color);
188186
border-radius: 4px;
189-
box-shadow: 0px 8px 25px var(--shadow-color-level-3);
187+
box-shadow: 0 8px 25px var(--shadow-color-level-3);
190188
display: flex;
191189
padding: 24px;
192190
position: absolute;
@@ -238,9 +236,9 @@
238236
}
239237

240238
&--open {
239+
background: var(--primary-cta-color);
241240
border-bottom-left-radius: 0;
242241
border-bottom-right-radius: 0;
243-
background: var(--primary-cta-color);
244242

245243
.select__left {
246244
&__title {
@@ -275,11 +273,12 @@
275273
justify-content: space-between;
276274
position: absolute;
277275
top: 110px;
278-
transition: .2s;
276+
transition: 0.2s;
279277
width: 100%;
280278
z-index: 10;
281279

282-
&__item, .item {
280+
&__item,
281+
.item {
283282
align-items: center;
284283
border-top: 1px solid var(--wallets-item-border);
285284
display: flex;
@@ -291,15 +290,15 @@
291290
&__left {
292291
display: flex;
293292
flex-direction: column;
294-
justify-content: center;
295293
height: 70px;
294+
justify-content: center;
296295
width: 75%;
297296

298297
&__title {
299298
color: var(--secondary-contrast-cta-color);
299+
font-size: 10px;
300300
font-style: normal;
301301
font-weight: 500;
302-
font-size: 10px;
303302
line-height: 12px;
304303
}
305304

@@ -346,25 +345,26 @@
346345
}
347346
}
348347

349-
&__add, .add {
348+
&__add,
349+
.add {
350350
align-items: center;
351351
background-color: var(--dropdown-background-color);
352-
border-top: 1px solid var(--wallets-item-border);
353352
border-bottom-left-radius: 4px;
354353
border-bottom-right-radius: 4px;
354+
border-top: 1px solid var(--wallets-item-border);
355355
cursor: pointer;
356356
display: flex;
357357
height: 50px;
358358
justify-content: space-between;
359359
padding: 13px;
360-
transition: .2s;
360+
transition: 0.2s;
361361
width: 100%;
362362

363363
&__label {
364364
color: var(--primary-text-color);
365+
font-size: 12px;
365366
font-style: normal;
366367
font-weight: 500;
367-
font-size: 12px;
368368
line-height: 12px;
369369
}
370370

@@ -395,9 +395,9 @@
395395

396396
.cr-email-form {
397397
background: var(--body-background-color);
398-
box-shadow: 0px 8px 25px var(--shadow-color-level-3);
399398
border-bottom-left-radius: 3px;
400399
border-bottom-right-radius: 3px;
400+
box-shadow: 0 8px 25px var(--shadow-color-level-3);
401401

402402
&__option {
403403
background: var(--subheader-background-color);
@@ -412,7 +412,7 @@
412412
line-height: 60px;
413413
text-transform: lowercase;
414414

415-
&:first-letter {
415+
&::first-letter {
416416
text-transform: uppercase;
417417
}
418418
}
@@ -468,20 +468,23 @@
468468

469469
.beneficiaries-fail-modal {
470470
.cr-email-form {
471+
min-height: calc(var(--big-gap) * 4);
472+
471473
&__form-content {
472-
display: flex;
473474
align-items: center;
475+
display: flex;
474476
justify-content: center;
475477

476478
&__info {
477479
align-items: center;
478480
color: var(--primary-text-color);
479-
font-weight: normal;
480481
font-size: 14px;
482+
font-weight: normal;
481483
position: absolute;
482484
top: 12px;
483485
}
484486
}
487+
485488
&__button-wrapper {
486489
a {
487490
width: 100%;
@@ -496,13 +499,15 @@
496499
}
497500

498501
@media screen and (max-width: 1024px) {
499-
.pg-beneficiaries__dropdown__tip, .tip {
502+
.pg-beneficiaries__dropdown__tip,
503+
.tip {
500504
right: 0 !important;
501505
}
502506
}
503507

504508
@media screen and (max-width: 400px) {
505-
.pg-beneficiaries__dropdown__select, .select {
509+
.pg-beneficiaries__dropdown__select,
510+
.select {
506511
&__left {
507512
width: 55% !important;
508513
}

src/components/CombinedOrderBook/CombinedOrderBook.pcss

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.cr-combined-order-book {
2-
position: relative;
32
height: 100%;
3+
position: relative;
44

55
.cr-table {
66
table-layout: fixed;
@@ -29,15 +29,15 @@
2929
padding-bottom: 5px;
3030

3131
span {
32+
font-size: 12px;
3233
font-weight: normal;
3334
line-height: 12px;
34-
font-size: 12px;
3535
text-align: center;
3636

3737
&:first-child {
38+
font-size: 28px;
3839
font-weight: bold;
3940
line-height: normal;
40-
font-size: 28px;
4141
}
4242
}
4343

@@ -62,39 +62,39 @@
6262

6363
&-market {
6464
border-top: 1px solid var(--order-book-last-market-price-border-color);
65-
position: sticky;
6665
bottom: 0;
67-
right: 0;
6866
left: 0;
67+
position: sticky;
68+
right: 0;
6969
z-index: 25;
7070
}
7171

7272
.cr-order-book {
73-
width: 50%;
7473
padding-right: 1px;
74+
width: 50%;
7575
}
7676

7777
.cr-table-background {
7878
top: 60px;
7979

8080
&__row {
81-
padding-bottom: calc(var(--gap) * 2.5);
8281
margin-bottom: 1px;
82+
padding-bottom: calc(var(--gap) * 2.5);
8383
}
8484
}
8585
}
8686

8787
&__small {
8888
.cr-table-background {
8989
&__row {
90-
padding-bottom: calc(var(--gap) * 2.5);
9190
margin-bottom: 1px;
91+
padding-bottom: calc(var(--gap) * 2.5);
9292
}
9393
}
9494

9595
.cr-order-book {
96-
overflow-y: scroll;
9796
height: 154px;
97+
overflow-y: scroll;
9898

9999
&:first-child {
100100
border-bottom: 1px solid var(--order-book-last-market-price-border-color);
@@ -114,8 +114,8 @@
114114
}
115115

116116
th {
117-
top: 0;
118117
position: sticky;
118+
top: 0;
119119
z-index: 2222;
120120
}
121121
}

0 commit comments

Comments
 (0)