Skip to content

Commit 6e8bf49

Browse files
chore(theming): remove Sass default flags (#29401)
Issue number: N/A --------- ## What is the current behavior? Currently, every Sass variable in Ionic has the `!default` flag added to the end. From the [Sass variables documentation](https://sass-lang.com/documentation/variables/): > Normally when you assign a value to a variable, if that variable already had a value, its old value is overwritten. But if you’re writing a Sass library, you might want to allow your users to configure your library’s variables before you use them to generate CSS. > > To make this possible, Sass provides the `!default` flag. This assigns a value to a variable only if that variable isn’t defined or its value is [null](https://sass-lang.com/documentation/values/null). Otherwise, the existing value will be used. In past versions of Ionic Framework, developers wrote Sass variables to rebuild Ionic Framework using their own values. In the latest versions of Ionic Framework, this is not possible. ## What is the new behavior? Removes the `!default` flag from all Sass variables. ## Does this introduce a breaking change? - [ ] Yes - [x] No ------- Co-authored-by: brandyscarney <[email protected]>
1 parent 0873dc2 commit 6e8bf49

File tree

127 files changed

+1301
-1301
lines changed

Some content is hidden

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

127 files changed

+1301
-1301
lines changed

core/src/components/accordion/accordion.md.vars.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
// --------------------------------------------------
55

66
/// @prop - Border radius applied to the accordion
7-
$accordion-md-border-radius: 6px !default;
7+
$accordion-md-border-radius: 6px;
88

99
/// @prop - Box shadow of the accordion
10-
$accordion-md-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12) !default;
10+
$accordion-md-box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
1111

1212
/// @prop - Margin of the expanded accordion
13-
$accordion-md-expanded-margin: 16px !default;
13+
$accordion-md-expanded-margin: 16px;

core/src/components/accordion/accordion.vars.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
// --------------------------------------------------
55

66
/// @prop - Background color of the accordion
7-
$accordion-background-color: var(--ion-background-color, #ffffff) !default;
7+
$accordion-background-color: var(--ion-background-color, #ffffff);
88

99
/// @prop - Duration of the accordion transition
10-
$accordion-transition-duration: 300ms !default;
10+
$accordion-transition-duration: 300ms;
1111

1212
/// @prop - Timing function of the accordion transition
13-
$accordion-transition-easing: cubic-bezier(0.25, 0.8, 0.5, 1) !default;
13+
$accordion-transition-easing: cubic-bezier(0.25, 0.8, 0.5, 1);
1414

1515
/// @prop - Opacity of the disabled accordion
16-
$accordion-disabled-opacity: 0.4 !default;
16+
$accordion-disabled-opacity: 0.4;
1717

1818
/// @prop - Margin of the inset accordion
19-
$accordion-inset-margin: 16px !default;
19+
$accordion-inset-margin: 16px;

core/src/components/action-sheet/action-sheet.ios.vars.scss

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,145 +4,145 @@
44
// --------------------------------------------------
55

66
/// @prop - Text align of the action sheet
7-
$action-sheet-ios-text-align: center !default;
7+
$action-sheet-ios-text-align: center;
88

99
/// @prop - Padding top of the action sheet
10-
$action-sheet-ios-padding-top: 0 !default;
10+
$action-sheet-ios-padding-top: 0;
1111

1212
/// @prop - Padding end of the action sheet
13-
$action-sheet-ios-padding-end: 8px !default;
13+
$action-sheet-ios-padding-end: 8px;
1414

1515
/// @prop - Padding bottom of the action sheet
16-
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top !default;
16+
$action-sheet-ios-padding-bottom: $action-sheet-ios-padding-top;
1717

1818
/// @prop - Padding start of the action sheet
19-
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end !default;
19+
$action-sheet-ios-padding-start: $action-sheet-ios-padding-end;
2020

2121
/// @prop - Top margin of the action sheet button group
22-
$action-sheet-ios-group-margin-top: 10px !default;
22+
$action-sheet-ios-group-margin-top: 10px;
2323

2424
/// @prop - Bottom margin of the action sheet button group
25-
$action-sheet-ios-group-margin-bottom: 10px !default;
25+
$action-sheet-ios-group-margin-bottom: 10px;
2626

2727
/// @prop - Background color of the action sheet
28-
$action-sheet-ios-background-color: $overlay-ios-background-color !default;
28+
$action-sheet-ios-background-color: $overlay-ios-background-color;
2929

3030
/// @prop - Border radius of the action sheet
31-
$action-sheet-ios-border-radius: 13px !default;
31+
$action-sheet-ios-border-radius: 13px;
3232

3333

3434
// Action Sheet Title
3535
// --------------------------------------------------
3636

3737
/// @prop - Padding top of the action sheet title
38-
$action-sheet-ios-title-padding-top: 14px !default;
38+
$action-sheet-ios-title-padding-top: 14px;
3939

4040
/// @prop - Padding end of the action sheet title
41-
$action-sheet-ios-title-padding-end: 10px !default;
41+
$action-sheet-ios-title-padding-end: 10px;
4242

4343
/// @prop - Padding bottom of the action sheet title
44-
$action-sheet-ios-title-padding-bottom: 13px !default;
44+
$action-sheet-ios-title-padding-bottom: 13px;
4545

4646
/// @prop - Padding start of the action sheet title
47-
$action-sheet-ios-title-padding-start: $action-sheet-ios-title-padding-end !default;
47+
$action-sheet-ios-title-padding-start: $action-sheet-ios-title-padding-end;
4848

4949
/// @prop - Color of the action sheet title
50-
$action-sheet-ios-title-color: $text-color-step-600 !default;
50+
$action-sheet-ios-title-color: $text-color-step-600;
5151

5252
/// @prop - Font size of the action sheet title
53-
$action-sheet-ios-title-font-size: dynamic-font-min(1, 13px) !default;
53+
$action-sheet-ios-title-font-size: dynamic-font-min(1, 13px);
5454

5555
/// @prop - Font weight of the action sheet title
56-
$action-sheet-ios-title-font-weight: 400 !default;
56+
$action-sheet-ios-title-font-weight: 400;
5757

5858
/// @prop - Font weight of the action sheet title when it has a sub title
59-
$action-sheet-ios-title-with-sub-title-font-weight: 600 !default;
59+
$action-sheet-ios-title-with-sub-title-font-weight: 600;
6060

6161
// Action Sheet Subtitle
6262
// --------------------------------------------------
6363

6464
/// @prop - Font size of the action sheet sub title
65-
$action-sheet-ios-sub-title-font-size: dynamic-font-min(1, 13px) !default;
65+
$action-sheet-ios-sub-title-font-size: dynamic-font-min(1, 13px);
6666

6767
/// @prop - Padding top of the action sheet sub title
68-
$action-sheet-ios-sub-title-padding-top: 6px !default;
68+
$action-sheet-ios-sub-title-padding-top: 6px;
6969

7070
/// @prop - Padding end of the action sheet sub title
71-
$action-sheet-ios-sub-title-padding-end: 0 !default;
71+
$action-sheet-ios-sub-title-padding-end: 0;
7272

7373
/// @prop - Padding bottom of the action sheet sub title
74-
$action-sheet-ios-sub-title-padding-bottom: 0 !default;
74+
$action-sheet-ios-sub-title-padding-bottom: 0;
7575

7676
/// @prop - Padding start of the action sheet sub title
77-
$action-sheet-ios-sub-title-padding-start: $action-sheet-ios-sub-title-padding-end !default;
77+
$action-sheet-ios-sub-title-padding-start: $action-sheet-ios-sub-title-padding-end;
7878

7979

8080
// Action Sheet Button
8181
// --------------------------------------------------
8282

8383
/// @prop - Minimum height of the action sheet button
84-
$action-sheet-ios-button-height: 56px !default;
84+
$action-sheet-ios-button-height: 56px;
8585

8686
/// @prop - Padding of the action sheet button
87-
$action-sheet-ios-button-padding: 14px !default;
87+
$action-sheet-ios-button-padding: 14px;
8888

8989
/// @prop - Text color of the action sheet button
90-
$action-sheet-ios-button-text-color: ion-color(primary, base) !default;
90+
$action-sheet-ios-button-text-color: ion-color(primary, base);
9191

9292
/// @prop - Font size of the action sheet button icon
93-
$action-sheet-ios-button-icon-font-size: dynamic-font-min(1, 28px) !default;
93+
$action-sheet-ios-button-icon-font-size: dynamic-font-min(1, 28px);
9494

9595
/// @prop - Padding right of the action sheet button icon
96-
$action-sheet-ios-button-icon-padding-right: .3em !default;
96+
$action-sheet-ios-button-icon-padding-right: .3em;
9797

9898
/// @prop - Font size of the action sheet button
99-
$action-sheet-ios-button-font-size: dynamic-font-min(1, 20px) !default;
99+
$action-sheet-ios-button-font-size: dynamic-font-min(1, 20px);
100100

101101
/// @prop - Border color alpha of the action sheet button
102-
$action-sheet-ios-button-border-color-alpha: .08 !default;
102+
$action-sheet-ios-button-border-color-alpha: .08;
103103

104104
/// @prop - Border color of the action sheet button
105-
$action-sheet-ios-button-border-color: rgba($text-color-rgb, $action-sheet-ios-button-border-color-alpha) !default;
105+
$action-sheet-ios-button-border-color: rgba($text-color-rgb, $action-sheet-ios-button-border-color-alpha);
106106

107107
/// @prop - Background color of the action sheet button
108-
$action-sheet-ios-button-background: linear-gradient(0deg, $action-sheet-ios-button-border-color, $action-sheet-ios-button-border-color 50%, transparent 50%) bottom / 100% 1px no-repeat transparent !default;
108+
$action-sheet-ios-button-background: linear-gradient(0deg, $action-sheet-ios-button-border-color, $action-sheet-ios-button-border-color 50%, transparent 50%) bottom / 100% 1px no-repeat transparent;
109109

110110
/// @prop - Background color of the activated action sheet button
111-
$action-sheet-ios-button-background-activated: $text-color !default;
111+
$action-sheet-ios-button-background-activated: $text-color;
112112

113113
/// @prop - Background color of the selected action sheet button
114-
$action-sheet-ios-button-background-selected: var(--ion-color-step-150, var(--ion-background-color-step-150, $background-color)) !default;
114+
$action-sheet-ios-button-background-selected: var(--ion-color-step-150, var(--ion-background-color-step-150, $background-color));
115115

116116
/// @prop - Destructive text color of the action sheet button
117-
$action-sheet-ios-button-destructive-text-color: ion-color(danger, base) !default;
117+
$action-sheet-ios-button-destructive-text-color: ion-color(danger, base);
118118

119119
/// @prop - Font weight of the action sheet cancel button
120-
$action-sheet-ios-button-cancel-font-weight: 600 !default;
120+
$action-sheet-ios-button-cancel-font-weight: 600;
121121

122122

123123
// Action Sheet Translucent
124124
// --------------------------------------------------
125125

126126
/// @prop - Background color alpha of the action sheet when translucent
127-
$action-sheet-ios-translucent-background-color-alpha: .8 !default;
127+
$action-sheet-ios-translucent-background-color-alpha: .8;
128128

129129
/// @prop - Background color of the action sheet when translucent
130-
$action-sheet-ios-translucent-background-color: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-alpha) !default;
130+
$action-sheet-ios-translucent-background-color: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-alpha);
131131

132132
/// @prop - Border color alpha of the action sheet when translucent
133-
$action-sheet-ios-translucent-border-color-alpha: .4 !default;
133+
$action-sheet-ios-translucent-border-color-alpha: .4;
134134

135135
/// @prop - Border color of the action sheet when translucent
136-
$action-sheet-ios-translucent-border-color: rgba($background-color-rgb, $action-sheet-ios-translucent-border-color-alpha) !default;
136+
$action-sheet-ios-translucent-border-color: rgba($background-color-rgb, $action-sheet-ios-translucent-border-color-alpha);
137137

138138
/// @prop - Background color alpha of the activated action sheet when translucent
139-
$action-sheet-ios-translucent-background-color-activated-alpha: .7 !default;
139+
$action-sheet-ios-translucent-background-color-activated-alpha: .7;
140140

141141
/// @prop - Background color of the activated action sheet when translucent
142-
$action-sheet-ios-translucent-background-color-activated: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-activated-alpha) !default;
142+
$action-sheet-ios-translucent-background-color-activated: rgba($background-color-rgb, $action-sheet-ios-translucent-background-color-activated-alpha);
143143

144144
/// @prop - Filter of the translucent action-sheet group
145-
$action-sheet-ios-group-translucent-filter: saturate(280%) blur(20px) !default;
145+
$action-sheet-ios-group-translucent-filter: saturate(280%) blur(20px);
146146

147147
/// @prop - Filter of the translucent action-sheet button
148-
$action-sheet-ios-button-translucent-filter: saturate(120%) !default;
148+
$action-sheet-ios-button-translucent-filter: saturate(120%);

core/src/components/action-sheet/action-sheet.md.vars.scss

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -4,100 +4,100 @@
44
// --------------------------------------------------
55

66
/// @prop - Text align of the action sheet
7-
$action-sheet-md-text-align: start !default;
7+
$action-sheet-md-text-align: start;
88

99
/// @prop - Background color of the action sheet
10-
$action-sheet-md-background-color: $overlay-md-background-color !default;
10+
$action-sheet-md-background-color: $overlay-md-background-color;
1111

1212
/// @prop - Padding top of the action sheet
13-
$action-sheet-md-padding-top: 0 !default;
13+
$action-sheet-md-padding-top: 0;
1414

1515
/// @prop - Padding bottom of the action sheet
16-
$action-sheet-md-padding-bottom: var(--ion-safe-area-bottom) !default;
16+
$action-sheet-md-padding-bottom: var(--ion-safe-area-bottom);
1717

1818

1919
// Action Sheet Title
2020
// --------------------------------------------------
2121

2222
/// @prop - Height of the action sheet title
23-
$action-sheet-md-title-height: 60px !default;
23+
$action-sheet-md-title-height: 60px;
2424

2525
/// @prop - Color of the action sheet title
26-
$action-sheet-md-title-color: rgba($text-color-rgb, 0.54) !default;
26+
$action-sheet-md-title-color: rgba($text-color-rgb, 0.54);
2727

2828
/// @prop - Font size of the action sheet title
29-
$action-sheet-md-title-font-size: dynamic-font(16px) !default;
29+
$action-sheet-md-title-font-size: dynamic-font(16px);
3030

3131
/// @prop - Padding top of the action sheet title
32-
$action-sheet-md-title-padding-top: 20px !default;
32+
$action-sheet-md-title-padding-top: 20px;
3333

3434
/// @prop - Padding end of the action sheet title
35-
$action-sheet-md-title-padding-end: 16px !default;
35+
$action-sheet-md-title-padding-end: 16px;
3636

3737
/// @prop - Padding bottom of the action sheet title
38-
$action-sheet-md-title-padding-bottom: 17px !default;
38+
$action-sheet-md-title-padding-bottom: 17px;
3939

4040
/// @prop - Padding start of the action sheet title
41-
$action-sheet-md-title-padding-start: $action-sheet-md-title-padding-end !default;
41+
$action-sheet-md-title-padding-start: $action-sheet-md-title-padding-end;
4242

4343

4444
// Action Sheet Subtitle
4545
// --------------------------------------------------
4646

4747
/// @prop - Font size of the action sheet sub title
48-
$action-sheet-md-sub-title-font-size: dynamic-font(14px) !default;
48+
$action-sheet-md-sub-title-font-size: dynamic-font(14px);
4949

5050
/// @prop - Padding top of the action sheet sub title
51-
$action-sheet-md-sub-title-padding-top: 16px !default;
51+
$action-sheet-md-sub-title-padding-top: 16px;
5252

5353
/// @prop - Padding end of the action sheet sub title
54-
$action-sheet-md-sub-title-padding-end: 0 !default;
54+
$action-sheet-md-sub-title-padding-end: 0;
5555

5656
/// @prop - Padding bottom of the action sheet sub title
57-
$action-sheet-md-sub-title-padding-bottom: 0 !default;
57+
$action-sheet-md-sub-title-padding-bottom: 0;
5858

5959
/// @prop - Padding start of the action sheet sub title
60-
$action-sheet-md-sub-title-padding-start: $action-sheet-md-sub-title-padding-end !default;
60+
$action-sheet-md-sub-title-padding-start: $action-sheet-md-sub-title-padding-end;
6161

6262

6363
// Action Sheet Button
6464
// --------------------------------------------------
6565

6666
/// @prop - Minimum height of the action sheet button
67-
$action-sheet-md-button-height: 52px !default;
67+
$action-sheet-md-button-height: 52px;
6868

6969
/// @prop - Text color of the action sheet button
70-
$action-sheet-md-button-text-color: $text-color-step-150 !default;
70+
$action-sheet-md-button-text-color: $text-color-step-150;
7171

7272
/// @prop - Font size of the action sheet button
73-
$action-sheet-md-button-font-size: dynamic-font(16px) !default;
73+
$action-sheet-md-button-font-size: dynamic-font(16px);
7474

7575
/// @prop - Padding top of the action sheet button
76-
$action-sheet-md-button-padding-top: 12px !default;
76+
$action-sheet-md-button-padding-top: 12px;
7777

7878
/// @prop - Padding end of the action sheet button
79-
$action-sheet-md-button-padding-end: 16px !default;
79+
$action-sheet-md-button-padding-end: 16px;
8080

8181
/// @prop - Padding bottom of the action sheet button
82-
$action-sheet-md-button-padding-bottom: $action-sheet-md-button-padding-top !default;
82+
$action-sheet-md-button-padding-bottom: $action-sheet-md-button-padding-top;
8383

8484
/// @prop - Padding start of the action sheet button
85-
$action-sheet-md-button-padding-start: $action-sheet-md-button-padding-end !default;
85+
$action-sheet-md-button-padding-start: $action-sheet-md-button-padding-end;
8686

8787
// Action Sheet Icon
8888
// --------------------------------------------------
8989

9090
/// @prop - Font size of the icon in the action sheet button
91-
$action-sheet-md-icon-font-size: dynamic-font(24px) !default;
91+
$action-sheet-md-icon-font-size: dynamic-font(24px);
9292

9393
/// @prop - Margin top of the icon in the action sheet button
94-
$action-sheet-md-icon-margin-top: 0 !default;
94+
$action-sheet-md-icon-margin-top: 0;
9595

9696
/// @prop - Margin end of the icon in the action sheet button
97-
$action-sheet-md-icon-margin-end: 32px !default;
97+
$action-sheet-md-icon-margin-end: 32px;
9898

9999
/// @prop - Margin bottom of the icon in the action sheet button
100-
$action-sheet-md-icon-margin-bottom: 0 !default;
100+
$action-sheet-md-icon-margin-bottom: 0;
101101

102102
/// @prop - Margin start of the icon in the action sheet button
103-
$action-sheet-md-icon-margin-start: 0 !default;
103+
$action-sheet-md-icon-margin-start: 0;

core/src/components/action-sheet/action-sheet.vars.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// --------------------------------------------------
55

66
/// @prop - Width of the action sheet
7-
$action-sheet-width: 100% !default;
7+
$action-sheet-width: 100%;
88

99
/// @prop - Maximum width of the action sheet
10-
$action-sheet-max-width: 500px !default;
10+
$action-sheet-max-width: 500px;

0 commit comments

Comments
 (0)