Skip to content

Commit cb62306

Browse files
author
castastrophe
committed
Updates to the styles to resolve compilation error
1 parent f10cdee commit cb62306

File tree

3 files changed

+15
-68
lines changed

3 files changed

+15
-68
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@
2727
}
2828

2929
:host(:last-of-type[expanded]) {
30-
@include pfe-accordion-panel-expanded-last;
31-
}
32-
33-
:host(:last-of-type[expanded][on="dark"]) {
34-
@include pfe-accordion-panel-expanded-last($theme: dark);
30+
margin-bottom: 0;
3531
}
3632

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

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
position: relative;
66
overflow: hidden;
77
margin: 0;
8-
color: var(--pfe-broadcasted--color--text);
8+
color: #{pfe-radio(color--text)};
99
}
1010

1111
:host([on="dark"]) {
@@ -16,19 +16,3 @@
1616
@include pfe-theme($theme: "light");
1717
}
1818

19-
// @TODO: add lighter/lightest and darker/darkest colors.
20-
21-
// :host([color="darker"]) {
22-
// @include pfe-theme($theme: "darker");
23-
// }
24-
// :host([color="darkest"]) {
25-
// @include pfe-theme($theme: "darkest");
26-
// }
27-
28-
// :host([color="lighter"]) {
29-
// @include pfe-theme($theme: "lighter");
30-
// }
31-
// :host([color="lightest"]) {
32-
// @include pfe-theme($theme: "lightest");
33-
// }
34-

elements/pfe-sass/mixins/_mixins.scss

Lines changed: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -176,38 +176,6 @@
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
@@ -227,13 +195,13 @@
227195
/// ===========================================================================
228196
/// Accordion Specific SASS Vars
229197
/// ===========================================================================
230-
$pfe-expand-button--LineHeight: 1.5;
231-
$pfe-expand_chevron--size: 0.4em;
232-
$pfe-expand_chevron--weight: 0.1em;
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: .4em;
203+
$pfe-expand_chevron--weight: .1em;
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

Comments
 (0)