176176 }
177177}
178178
179-
180- /// RH Define Vars
181- /// Helps define the CSS Var madness, making it easier for devs!
182- /// @param {String} $this-component-var - Component specific variable name
183- /// @param {String} $this-theme-var - Theme variable name
184- /// @param {String} $this-fallback - Fallback color
185- ///
186- /// ---------------------------------------------------------------------------
187- ///
188- /// SASS fallback based on PFElements style
189- /// $pfe-global[--context][--state][--PropertyCamelCase]
190-
191- /// Theme level Var
192- /// --pfe-theme[--context][--state][--PropertyCamelCase]
193- /// --pfe-theme--heading--hover--BackgroundColor
194-
195- /// Component Var for theming specific cases
196- /// --pfe-[component-block][__element][--context][--state][--PropertyCamelCase]
197- /// --pfe-teaser__title--link-color--visited
198- /// --pfe-teaser__subtitle--link-color--visited
199-
200- /// Defined locally for sanity
201- /// --pfe-local-[component-block][__element][--context][--state][--PropertyCamelCase]
202- /// --pfe-local-cta--link-color--inverted
203- ///
204- /// ---------------------------------------------------------------------------
205- ///
206- /// ↓ component, ↓ theme, ↓ fallback
207- @mixin pfe-define-vars ($this-component-var , $this-theme-var , $this-fallback ) {
208- --pfe-local -#{$this-component-var } : var (--pfe - #{$this-component-var } , var (--pfe-theme --#{$this-theme-var} , #{$this-fallback } ));
209- }
210-
211179// Mixin for building slot selectors
212180@mixin pfe-slot ($slot-name , $selector : " " ) {
213181 // This logic makes it much easier to style default slots in a loop
227195/// ===========================================================================
228196/// Accordion Specific SASS Vars
229197/// ===========================================================================
230- $pfe-expand-button --LineHeight : 1.5 ;
231- $pfe-expand_chevron--size : 0.4 em ;
232- $pfe-expand_chevron--weight : 0.1 em ;
233- $pfe-expand_chevron--placement : ( $pfe-expand_button--LineHeight / 2 ) - ( $pfe-expand_chevron--size / 2 );
234- $pfe-expand_button--Padding--factor : 0.75 ;
235- $pfe-expand_button--Padding : #{ pfe-var ( container-spacer )} ;
236- $pfe-expand_button--Padding--wide : calc ( #{ pfe-var ( container-spacer )} * 1.5 ) ;
198+ $pfe-expand_button --LineHeight : 1.5 ;
199+ $pfe-expand_button--Padding--factor : .75 ;
200+ $pfe-expand_button--Padding--wide : calc ( #{ pfe-var ( container-spacer )} * 1.5 ) ;
201+
202+ $pfe-expand_chevron--size : .4 em ;
203+ $pfe-expand_chevron--weight : .1 em ;
204+ $pfe-expand_chevron--placement : #{ $ pfe-expand_button--LineHeight / 2 - $pfe-expand_chevron--size / 2 } ;
237205
238206@mixin pfe-accordion-header {
239207 display : block ;
@@ -242,7 +210,7 @@ $pfe-expand_button--Padding--wide: calc(#{pfe-var(container-spacer)} * 1.5);
242210 }
243211}
244212
245- @mixin pfe-trigger-button ($theme : light , $align : left , $component-name ) {
213+ @mixin pfe-trigger-button ($component-name , $ theme : light , $align : left ) {
246214 --pfe -#{$component-name } --main : transparent ;
247215 --pfe -#{$component-name } --aux : #{pfe-color (surface--lightest--text )} ;
248216 --pfe -#{$component-name } --focus : #{pfe-color (surface--lightest--link )} ;
@@ -286,9 +254,9 @@ $pfe-expand_button--Padding--wide: calc(#{pfe-var(container-spacer)} * 1.5);
286254 border : 0 ;
287255 }
288256 @if $align == right {
289- padding : $ pfe-expand_button--Padding $pfe-expand_button--Padding--wide $ pfe-expand_button--Padding 50px ;
257+ padding : #{ pfe-var ( container-spacer )} $pfe-expand_button--Padding--wide #{ pfe-var ( container-spacer )} 50px ;
290258 } @else {
291- padding : $ pfe-expand_button--Padding 50px $ pfe-expand_button--Padding $pfe-expand_button--Padding--wide ;
259+ padding : #{ pfe-var ( container-spacer )} 50px #{ pfe-var ( container-spacer )} $pfe-expand_button--Padding--wide ;
292260 }
293261 // @TODO later, type scale support
294262 // [scale="large"] & {
@@ -324,7 +292,7 @@ $pfe-expand_button--Padding--wide: calc(#{pfe-var(container-spacer)} * 1.5);
324292 border-bottom : 0 ;
325293}
326294
327- @mixin pfe-trigger-color ($theme : light , $component-name ) {
295+ @mixin pfe-trigger-color ($component-name , $ theme : light ) {
328296 @if $theme == dark {
329297 --pfe -#{$component-name } --main : transparent ;
330298 --pfe -#{$component-name } --aux : #{pfe-color (surface--darkest--text )} ;
@@ -338,7 +306,7 @@ $pfe-expand_button--Padding--wide: calc(#{pfe-var(container-spacer)} * 1.5);
338306 }
339307}
340308
341- @mixin pfe-trigger-color-expanded ($theme : light , $component-name ) {
309+ @mixin pfe-trigger-color-expanded ($component-name , $ theme : light ) {
342310 @if $theme == dark {
343311 --pfe -#{$component-name } --main : #{pfe-color (surface--darker )} ;
344312 --pfe -#{$component-name } --aux : #{pfe-color (surface--darkest--text )} ;
@@ -413,7 +381,6 @@ $pfe-expand_button--Padding--wide: calc(#{pfe-var(container-spacer)} * 1.5);
413381 overflow : hidden ;
414382 will-change : height ;
415383 border-color : transparent ;
416- overflow : hidden ;
417384}
418385
419386@mixin pfe-accordion-panel-expanded {
@@ -441,6 +408,6 @@ $pfe-expand_button--Padding--wide: calc(#{pfe-var(container-spacer)} * 1.5);
441408
442409@mixin pfe-accordion-panel-container-inset {
443410 box-sizing : border-box ;
444- padding : 0 #{$pfe-expand_button--Padding--wide } #{$ pfe-expand_button--Padding } ;
411+ padding : 0 #{$pfe-expand_button--Padding--wide } #{pfe-var ( container-spacer ) } ;
445412 width : 100% ;
446413}
0 commit comments