Skip to content

Commit f10cdee

Browse files
author
castastrophe
committed
Suggested mixin updates
1 parent a30c762 commit f10cdee

File tree

4 files changed

+104
-212
lines changed

4 files changed

+104
-212
lines changed

elements/pfe-accordion/src/pfe-accordion-header.scss

Lines changed: 7 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,24 @@
88
@include pfe-accordion-header;
99

1010
button {
11-
@include pfe-trigger-button; // border 3px
12-
@include pfe-trigger-color-light;
11+
@include pfe-trigger-button($component-name: accordion); // border 3px
12+
@include pfe-trigger-color($component-name: accordion);
1313

1414
&[aria-expanded="true"] {
15-
@include pfe-trigger-color-light-expanded;
15+
@include pfe-trigger-color-expanded($component-name: accordion);
1616
@include pfe-trigger-expanded;
1717
}
1818

1919
&[aria-expanded="true"]::after {
20-
@include pfe-chevron-expanded-true;
20+
@include pfe-chevron-expanded;
2121
}
2222

2323
&[aria-expanded="false"]::after {
24-
@include pfe-chevron-expanded-false;
24+
@include pfe-chevron-expanded($state: false);
2525
}
2626
}
2727
}
2828

29-
////////// last child
30-
31-
// @TODO: add lighter/lightest and darker/darkest colors.
32-
33-
// :host([color="darker"]:last-of-type),
34-
// :host([color="darkest"]:last-of-type) {
35-
// button[aria-expanded="false"] {
36-
// @include pfe-trigger-button-last($theme: dark);
37-
// }
38-
// }
39-
40-
// :host([color="lighter"]:last-of-type),
41-
// :host([color="lightest"]:last-of-type) {
42-
// button[aria-expanded="false"] {
43-
// @include pfe-trigger-button-last($theme: light);
44-
// }
45-
// }
46-
47-
// :host([color="darker"]:first-child),
48-
// :host([color="darkest"]:first-child) {
49-
// button {
50-
// @include pfe-trigger-button-first($theme: dark);
51-
// }
52-
// }
53-
5429
:host(:first-child),
5530
:host([color="lighter"]:first-child),
5631
:host([color="lightest"]:first-child) {
@@ -77,34 +52,10 @@
7752

7853
:host([on="dark"]) {
7954
button {
80-
@include pfe-trigger-color-dark;
55+
@include pfe-trigger-color($theme: dark, $component-name: accordion);
8156

8257
&[aria-expanded="true"] {
83-
@include pfe-trigger-color-dark-expanded;
58+
@include pfe-trigger-color-expanded($theme: dark, $component-name: accordion);
8459
}
8560
}
8661
}
87-
88-
// @TODO: add lighter/lightest and darker/darkest colors.
89-
90-
// :host([color="lighter"]),
91-
// :host([color="lightest"]) {
92-
// button {
93-
// @include pfe-trigger-color-lightest;
94-
95-
// &[aria-expanded="true"] {
96-
// @include pfe-trigger-color-light-expanded;
97-
// }
98-
// }
99-
// }
100-
101-
// :host([color="darker"]),
102-
// :host([color="darkest"]) {
103-
// button {
104-
// @include pfe-trigger-color-darkest;
105-
106-
// &[aria-expanded="true"] {
107-
// @include pfe-trigger-color-darkest-expanded;
108-
// }
109-
// }
110-
// }

elements/pfe-accordion/src/pfe-accordion-panel.scss

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,8 @@
2929
:host(:last-of-type[expanded]) {
3030
@include pfe-accordion-panel-expanded-last;
3131
}
32-
33-
// @TODO: add lighter/lightest and darker/darkest colors.
34-
35-
// :host([color="lighter"][expanded]),
36-
// :host([color="lightest"][expanded]) {
37-
// @include pfe-accordion-panel-expanded-style;
38-
// @include pfe-accordion-panel-expanded-style-lightest;
39-
// }
40-
41-
// :host([color="darker"][expanded]),
42-
// :host([color="darkest"][expanded]) {
43-
// @include pfe-accordion-panel-expanded-style($theme: dark);
44-
// @include pfe-accordion-panel-expanded-style-darkest;
45-
// }
46-
47-
// :host(:last-of-type[color="darker"][expanded]),
48-
// :host(:last-of-type[color="darkest"][expanded]) {
49-
// @include pfe-accordion-panel-expanded-last-dark;
50-
// }
32+
33+
:host(:last-of-type[expanded][on="dark"]) {
34+
@include pfe-accordion-panel-expanded-last($theme: dark);
35+
}
5136

0 commit comments

Comments
 (0)