|
1 | 1 | @import "../../pfe-sass/pfe-sass"; |
2 | 2 |
|
| 3 | +$LOCAL: accordion; |
| 4 | + |
3 | 5 | /// =========================================================================== |
4 | 6 | /// DEFAULT ACCORDION HEADING |
5 | 7 | /// =========================================================================== |
|
8 | 10 | @include pfe-accordion-header; |
9 | 11 |
|
10 | 12 | button { |
11 | | - @include pfe-trigger-button($type: accordion); // border 3px |
12 | | - @include pfe-trigger-color-light($type: accordion); |
| 13 | + @include pfe-trigger-color($component-name: accordion); |
| 14 | + @include pfe-trigger-button; |
13 | 15 |
|
14 | 16 | &[aria-expanded="true"] { |
15 | | - @include pfe-trigger-color-light-expanded($type: accordion); |
16 | | - @include pfe-trigger-expanded; |
17 | | - } |
18 | | - |
19 | | - &[aria-expanded="true"]::after { |
20 | | - @include pfe-chevron-expanded-true; |
| 17 | + @include pfe-trigger-color-expanded($component-name: accordion); |
| 18 | + @include pfe-trigger-expanded; |
| 19 | + &::after { |
| 20 | + @include pfe-chevron-expanded; |
| 21 | + } |
21 | 22 | } |
22 | 23 |
|
23 | 24 | &[aria-expanded="false"]::after { |
24 | | - @include pfe-chevron-expanded-false; |
| 25 | + @include pfe-chevron-expanded($state: false); |
25 | 26 | } |
26 | 27 | } |
27 | 28 | } |
28 | 29 |
|
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 | | - |
54 | | -:host(:first-child), |
55 | | -:host([color="lighter"]:first-child), |
56 | | -:host([color="lightest"]:first-child) { |
| 30 | +:host(:first-child) { |
57 | 31 | button { |
58 | 32 | @include pfe-trigger-button-first($theme: light); |
59 | 33 | } |
|
72 | 46 | } |
73 | 47 |
|
74 | 48 | /// =========================================================================== |
75 | | -/// COLOR OVERRIDES |
| 49 | +/// CONTEXT STYLES, ON=DARK |
76 | 50 | /// =========================================================================== |
77 | 51 |
|
78 | 52 | :host([on="dark"]) { |
79 | 53 | button { |
80 | | - @include pfe-trigger-color-dark($type: accordion); |
| 54 | + @include pfe-trigger-color($theme: dark, $component-name: accordion); |
81 | 55 |
|
82 | 56 | &[aria-expanded="true"] { |
83 | | - @include pfe-trigger-color-dark-expanded($type: accordion); |
| 57 | + @include pfe-trigger-color-expanded($theme: dark, $component-name: accordion); |
84 | 58 | } |
85 | 59 | } |
86 | 60 | } |
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 | | -// } |
0 commit comments