Skip to content

Commit bcc1268

Browse files
committed
Fixing more lint problems
1 parent 30a0ce6 commit bcc1268

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

core/src/components/col/col.scss

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @prop --col-unit-size: The size of each Column unit.
99
*/
1010
--col-unit-size: calc((100% - (var(--ion-grid-columns) - 1) * var(--ion-grid-gap)) / var(--ion-grid-columns));
11-
11+
1212
/**
1313
* @prop --ion-grid-columns: The number of total Columns in the Grid
1414
* @prop --ion-grid-column-padding: Padding for the Column
@@ -33,35 +33,33 @@
3333
min-height: 1px; // Prevent columns from collapsing when empty
3434
}
3535

36-
:host(.ion-grid-col-auto){
36+
:host(.ion-grid-col-auto) {
3737
flex: 0 0 auto;
3838
}
3939

40-
:host(
41-
[class^="ion-grid-col-"],
42-
[class*=" ion-grid-col-"]) {
43-
flex: 0 0
44-
calc(var(--ion-grid-col-span) * var(--col-unit-size) +
45-
(var(--ion-grid-col-span) - 1) * var(--ion-grid-gap));
40+
:host([class^="ion-grid-col-"], [class*=" ion-grid-col-"]) {
41+
flex: 0 0 calc(var(--ion-grid-col-span) * var(--col-unit-size) + (var(--ion-grid-col-span) - 1) * var(--ion-grid-gap));
4642
}
4743

48-
:host(
49-
[class^="ion-grid-offset-col-"],
50-
[class*=" ion-grid-offset-col-"]) {
51-
--margin-calc: calc(var(--col-unit-size) * var(--ion-grid-col-margin) + (var(--ion-grid-gap) * var(--ion-grid-col-margin)));
52-
53-
@include margin-horizontal(var(--margin-calc), 0);
44+
:host([class^="ion-grid-offset-col-"], [class*=" ion-grid-offset-col-"]) {
45+
--margin-calc: calc(
46+
var(--col-unit-size) * var(--ion-grid-col-margin) + (var(--ion-grid-gap) * var(--ion-grid-col-margin))
47+
);
48+
49+
@include margin-horizontal(var(--margin-calc), 0);
5450
}
5551

5652
$max: 12;
5753

5854
@for $i from 1 through $max {
5955
.ion-grid-col-#{$i} {
60-
--ion-grid-col-span: #{$i};
56+
--ion-grid-col-span: #{$i};
6157
}
58+
6259
.ion-grid-order-col-#{$i} {
63-
order: #{$i};
60+
order: #{$i};
6461
}
62+
6563
.ion-grid-offset-col-#{$i} {
6664
--ion-grid-col-margin: #{$i};
6765
}

core/src/components/col/col.tsx

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { matchBreakpoint } from '@utils/media';
55

66
import { getIonTheme } from '../../global/ionic-global';
77

8-
98
// eslint-disable-next-line @typescript-eslint/prefer-optional-chain
109
const BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl'];
1110

@@ -19,7 +18,6 @@ const BREAKPOINTS = ['', 'xs', 'sm', 'md', 'lg', 'xl'];
1918
shadow: true,
2019
})
2120
export class Col implements ComponentInterface {
22-
2321
@Element() el!: HTMLIonColElement;
2422
/**
2523
* The amount to offset the column, in terms of how many columns it should shift to the end
@@ -57,7 +55,7 @@ export class Col implements ComponentInterface {
5755
*/
5856
@Prop() offsetXl?: string;
5957

60-
/**
58+
/**
6159
* The order of the column, in terms of where the column should position itself in the columns renderer.
6260
* If no value is passed, the column order implicit value will be the order in the html structure.
6361
*/
@@ -266,9 +264,19 @@ export class Col implements ComponentInterface {
266264
}
267265

268266
componentDidLoad() {
269-
if(
270-
this.pull || this.pullLg || this.pullMd || this.pullSm || this.pullXl || this.pullXs ||
271-
this.push || this.pushLg || this.pushMd || this.pushSm || this.pushXl || this.pushXs
267+
if (
268+
this.pull ||
269+
this.pullLg ||
270+
this.pullMd ||
271+
this.pullSm ||
272+
this.pullXl ||
273+
this.pullXs ||
274+
this.push ||
275+
this.pushLg ||
276+
this.pushMd ||
277+
this.pushSm ||
278+
this.pushXl ||
279+
this.pushXs
272280
) {
273281
printIonWarning(
274282
'[ion-col] - The pull and push properties are deprecated and no longer work, in favor of the order and size properties.',
@@ -290,7 +298,7 @@ export class Col implements ComponentInterface {
290298
[theme]: true,
291299
[`${colSize}`]: colSize !== undefined,
292300
[`${colOrder}`]: colOrder !== undefined,
293-
[`${colOffset}`]: colOffset !== undefined
301+
[`${colOffset}`]: colOffset !== undefined,
294302
}}
295303
>
296304
<slot></slot>

0 commit comments

Comments
 (0)