Skip to content

Commit 48ae00c

Browse files
committed
Fix Sass mixed-declaration warning using stylelint-order
1 parent d22f1cc commit 48ae00c

File tree

88 files changed

+474
-428
lines changed

Some content is hidden

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

88 files changed

+474
-428
lines changed

.stylelintrc

+22-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"plugins": ["stylelint-order"],
23
"extends": ["stylelint-config-standard-scss", "stylelint-config-css-modules"],
34
"rules": {
45
"alpha-value-notation": "number",
@@ -47,6 +48,26 @@
4748
"^dim-([a-z][a-z0-9]*)(-[a-z0-9]+)*$",
4849
{ "message": "Expected function name to be kebab-case and prefixed with 'dim-'" }
4950
],
50-
"scss/load-partial-extension": null
51+
"scss/load-partial-extension": null,
52+
"order/order": [
53+
"custom-properties",
54+
"dollar-variables",
55+
"declarations",
56+
{
57+
"type": "at-rule",
58+
"name": "include",
59+
"hasBlock": false
60+
},
61+
{
62+
"type": "at-rule",
63+
"name": "include",
64+
"hasBlock": true
65+
},
66+
{
67+
"type": "at-rule"
68+
},
69+
"rules"
70+
],
71+
"declaration-block-no-shorthand-property-overrides": true
5172
}
5273
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@
179179
"stylelint": "^16.8.2",
180180
"stylelint-config-css-modules": "^4.4.0",
181181
"stylelint-config-standard-scss": "^13.1.0",
182+
"stylelint-order": "^6.0.4",
182183
"svgo": "^3.3.2",
183184
"svgo-loader": "^4.0.0",
184185
"terser-webpack-plugin": "^5.3.10",

pnpm-lock.yaml

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/App.m.scss

+10-9
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,16 @@
44
padding-left: env(safe-area-inset-left);
55
padding-right: env(safe-area-inset-right);
66

7+
@include phone-portrait {
8+
--inventory-column-padding: 12px;
9+
}
10+
11+
@media (min-width: 1440px) {
12+
--inventory-column-padding: 24px;
13+
--column-padding: calc(2 * var(--inventory-column-padding) - var(--item-margin));
14+
}
15+
716
&::before {
8-
@include below-header;
917
background: var(--theme-app-bg);
1018
background-position: center top;
1119
background-repeat: no-repeat;
@@ -16,14 +24,7 @@
1624
position: fixed;
1725
will-change: transform;
1826
z-index: -1;
19-
}
2027

21-
@media (min-width: 1440px) {
22-
--inventory-column-padding: 24px;
23-
--column-padding: calc(2 * var(--inventory-column-padding) - var(--item-margin));
24-
}
25-
26-
@include phone-portrait {
27-
--inventory-column-padding: 12px;
28+
@include below-header;
2829
}
2930
}

src/app/accounts/SelectAccount.m.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@
2020
border: 1px solid white;
2121
text-decoration: none;
2222

23-
&:focus,
24-
&:active {
25-
outline: none;
26-
}
27-
2823
@include interactive($hover: true, $focus: true) {
2924
border-color: var(--theme-accent-primary);
3025
color: var(--theme-accent-primary);
3126
background-color: rgba(255, 255, 255, 0.1);
3227
}
28+
29+
&:focus,
30+
&:active {
31+
outline: none;
32+
}
3333
}
3434

3535
.accountDetails {

src/app/armory/Armory.m.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@
6666

6767
h1 {
6868
grid-area: title;
69+
margin: 0 0 4px 0;
6970

7071
@include destiny-header;
71-
margin: 0 0 4px 0;
7272
}
7373

7474
:global(.item) {
@@ -94,10 +94,10 @@
9494
flex-wrap: wrap;
9595
align-items: center;
9696
margin-bottom: 4px;
97+
gap: 4px;
9798
> * {
9899
margin: 0;
99100
}
100-
gap: 4px;
101101
}
102102

103103
.element {

src/app/armory/Links.m.scss

+8-8
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@
99
list-style: none;
1010
gap: 4px;
1111

12-
li {
13-
white-space: nowrap;
14-
img {
15-
vertical-align: text-bottom;
16-
margin-right: 0.2em;
17-
}
12+
@include phone-portrait {
13+
margin-right: 38px;
1814
}
1915

2016
@media (max-width: 675px) {
@@ -27,7 +23,11 @@
2723
}
2824
}
2925

30-
@include phone-portrait {
31-
margin-right: 38px;
26+
li {
27+
white-space: nowrap;
28+
img {
29+
vertical-align: text-bottom;
30+
margin-right: 0.2em;
31+
}
3232
}
3333
}

src/app/character-tile/CharacterTile.m.scss

+9-9
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
gap: 0 6px;
2929
padding: 0 6px;
3030

31+
// Use the emblem as a background
32+
background-size: $emblem-width $emblem-height;
33+
background-position: left center;
34+
background-repeat: no-repeat;
35+
3136
@include phone-portrait {
3237
grid-template-areas:
3338
'emblem class power'
3439
'emblem bottom maxTotalPower';
3540
}
36-
37-
// Use the emblem as a background
38-
background-size: $emblem-width $emblem-height;
39-
background-position: left center;
40-
background-repeat: no-repeat;
4141
}
4242

4343
.vaultTile {
@@ -50,10 +50,6 @@
5050
box-sizing: border-box;
5151
gap: 0 6px;
5252
padding: 0 6px;
53-
54-
@include phone-portrait {
55-
grid-template-areas: 'emblem class vaultCapacity' !important;
56-
}
5753
// The vault needs a little border to stand out against some backgrounds
5854
border: 1px solid rgba(0, 0, 0, 0.3);
5955
border-right: none;
@@ -62,6 +58,10 @@
6258

6359
background-color: rgb(49, 50, 51);
6460
background-image: url('images/vault-background.svg');
61+
62+
@include phone-portrait {
63+
grid-template-areas: 'emblem class vaultCapacity' !important;
64+
}
6565
}
6666

6767
// The "current character" triangle

src/app/character-tile/StoreHeading.m.scss

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@
2222
background-color: var(--theme-dropdown-menu-bg);
2323
will-change: transform;
2424

25-
[role='button'] {
26-
outline: none;
27-
}
28-
2925
// The phone layout version
3026
@include phone-portrait {
3127
position: fixed;
@@ -35,6 +31,10 @@
3531
var(--viewport-height) - 54px - var(--header-height) - env(safe-area-inset-bottom)
3632
);
3733
}
34+
35+
[role='button'] {
36+
outline: none;
37+
}
3838
}
3939

4040
.characterHeader {

src/app/compare/Compare.m.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
font-size: 12px;
6767
// button's children's spacing margin
6868
gap: 4px;
69-
img {
70-
margin: 0;
71-
}
7269

7370
@include interactive($hover: true) {
7471
img {
7572
filter: drop-shadow(0 0 1px black);
7673
}
7774
}
75+
img {
76+
margin: 0;
77+
}
7878
}
7979
}
8080

src/app/destiny1/loadout-builder/loadout-builder.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ $and-color: #814bcf;
172172
font-size: 12px;
173173
}
174174
.currency {
175-
img {
176-
vertical-align: text-bottom;
177-
height: 16px;
178-
width: 16px;
179-
}
180175
position: absolute;
181176
top: 4px;
182177
right: 40px;
183178
font-weight: 200;
184179
font-size: 14px;
180+
img {
181+
vertical-align: text-bottom;
182+
height: 16px;
183+
width: 16px;
184+
}
185185
}
186186
.legendaryMarks {
187187
position: absolute;

src/app/destiny1/loadout-drawer/LoadoutDrawerOptions.m.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
@use '../../variables.scss' as *;
22

33
.loadoutOptions {
4+
display: flex;
5+
flex-flow: row wrap;
6+
47
@include phone-portrait {
58
font-size: 14px;
69
}
710

8-
display: flex;
9-
flex-flow: row wrap;
10-
1111
input {
1212
vertical-align: middle;
1313
}
@@ -19,11 +19,11 @@
1919
align-items: center;
2020
margin-right: 4px;
2121
margin-bottom: 4px;
22+
23+
gap: 4px;
2224
&:last-child {
2325
margin-bottom: 0;
2426
}
25-
26-
gap: 4px;
2727
}
2828

2929
.loadoutName {

src/app/destiny1/loadout-drawer/loadout-drawer.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@
5757
display: flex;
5858
box-sizing: border-box;
5959
margin-right: 16px;
60+
flex-direction: column;
61+
flex: 0;
6062

6163
@include phone-portrait {
6264
margin-right: 0;
6365
}
64-
flex-direction: column;
65-
flex: 0;
6666

6767
.loadout-bucket-name {
6868
text-transform: uppercase;

src/app/dim-ui/CharacterSelect.m.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525

2626
.frame {
2727
max-width: 250px;
28+
margin: 8px auto;
29+
overflow: visible !important;
30+
position: relative;
2831

2932
@include phone-portrait {
3033
max-width: 260px;
3134
}
32-
margin: 8px auto;
33-
overflow: visible !important;
34-
position: relative;
3535
}
3636

3737
.track {

src/app/dim-ui/CheckButton.m.scss

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@
1313
padding: 6px 10px 6px 16px;
1414
}
1515

16+
// Don't do hover
17+
@include interactive($hover: true, $active: true) {
18+
background-color: rgba(255, 255, 255, 0.2) !important;
19+
color: var(--theme-text) !important;
20+
}
21+
1622
> *:nth-last-child(n + 2) {
1723
margin-right: auto;
1824
}
1925
> *:last-child {
2026
margin-left: 6px;
2127
flex-shrink: 0;
2228
}
23-
24-
// Don't do hover
25-
@include interactive($hover: true, $active: true) {
26-
background-color: rgba(255, 255, 255, 0.2) !important;
27-
color: var(--theme-text) !important;
28-
}
2929
}

0 commit comments

Comments
 (0)