Skip to content

Commit ae1b645

Browse files
committed
fix(core): remove global styles for accordion from ionic theme
1 parent c45e617 commit ae1b645

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

core/src/css/core.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ body.backdrop-no-scroll {
4747

4848
// Modal - Card Style
4949
// --------------------------------------------------
50+
5051
/**
5152
* Card style modal needs additional padding on the
5253
* top of the header. We accomplish this by targeting
@@ -293,14 +294,19 @@ ion-card-header.ion-color .ion-inherit-color {
293294
}
294295

295296
// Accordion Styles
297+
// --------------------------------------------------
298+
// TODO this is being applied to the ionic theme
299+
296300
ion-accordion-group.accordion-group-expand-inset > ion-accordion:first-of-type {
297301
border-top-left-radius: 8px;
298302
border-top-right-radius: 8px;
299303
}
304+
300305
ion-accordion-group.accordion-group-expand-inset > ion-accordion:last-of-type {
301306
border-bottom-left-radius: 8px;
302307
border-bottom-right-radius: 8px;
303308
}
309+
304310
ion-accordion-group > ion-accordion:last-of-type ion-item[slot="header"] {
305311
--border-width: 0px;
306312
}
@@ -315,6 +321,7 @@ ion-accordion.accordion-animated > [slot="header"] .ion-accordion-toggle-icon {
315321
transition: none !important;
316322
}
317323
}
324+
318325
/**
319326
* The > [slot="header"] selector ensures that we do
320327
* not modify toggle icons for any nested accordions. The state
@@ -336,6 +343,9 @@ ion-accordion-group.accordion-group-expand-inset.md > ion-accordion.accordion-ex
336343
margin-top: 0;
337344
}
338345

346+
// Datetime Styles
347+
// --------------------------------------------------
348+
339349
// Safari/iOS 15 changes the appearance of input[type="date"].
340350
// For backwards compatibility from Ionic 5/Safari 14 designs,
341351
// we override the appearance only when using within an ion-input.
@@ -383,6 +393,9 @@ h1[tabindex="-1"]:focus,
383393
outline: none;
384394
}
385395

396+
// Popover Styles
397+
// --------------------------------------------------
398+
386399
/*
387400
* If a popover has a child ion-content (or class equivalent) then the .popover-viewport element
388401
* should not be scrollable to ensure the inner content does scroll. However, if the popover

core/src/css/ionic/core.ionic.scss

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ body.backdrop-no-scroll {
3636

3737
// Modal - Card Style
3838
// --------------------------------------------------
39+
3940
html.ionic ion-modal ion-header {
4041
box-shadow: none;
4142
}
@@ -301,14 +302,7 @@ ion-card-header.ion-color .ion-inherit-color {
301302
}
302303

303304
// Accordion Styles
304-
ion-accordion-group.accordion-group-expand-inset > ion-accordion:first-of-type {
305-
border-top-left-radius: globals.$ion-border-radius-200;
306-
border-top-right-radius: globals.$ion-border-radius-200;
307-
}
308-
ion-accordion-group.accordion-group-expand-inset > ion-accordion:last-of-type {
309-
border-bottom-left-radius: globals.$ion-border-radius-200;
310-
border-bottom-right-radius: globals.$ion-border-radius-200;
311-
}
305+
// --------------------------------------------------
312306

313307
// The toggle icon is nested in the accordion item so we need to
314308
// style it from a global level.
@@ -327,6 +321,7 @@ ion-accordion.accordion-animated > [slot="header"] .ion-accordion-toggle-icon {
327321
transition: none !important;
328322
}
329323
}
324+
330325
/**
331326
* The > [slot="header"] selector ensures that we do
332327
* not modify toggle icons for any nested accordions. The state
@@ -352,6 +347,9 @@ ion-accordion > [slot="content"] ion-item {
352347
--min-height: #{globals.$ion-scale-700};
353348
}
354349

350+
// Datetime Styles
351+
// --------------------------------------------------
352+
355353
// Safari/iOS 15 changes the appearance of input[type="date"].
356354
// For backwards compatibility from Ionic 5/Safari 14 designs,
357355
// we override the appearance only when using within an ion-input.
@@ -382,6 +380,9 @@ ion-input input::-webkit-date-and-time-value {
382380
min-height: 320px;
383381
}
384382

383+
// Popover Styles
384+
// --------------------------------------------------
385+
385386
/**
386387
* If a popover has a child ion-content (or class equivalent) then the .popover-viewport element
387388
* should not be scrollable to ensure the inner content does scroll. However, if the popover

0 commit comments

Comments
 (0)