|
10 | 10 | /// @param {Map} $map - Sass map of variables |
11 | 11 | /// @param {String} $fallback [null] - Optional fallback override |
12 | 12 | /// @param {Boolean} $use-fallback [true] - Optional hook to return a stack with no fallback value |
13 | | -/// @requires $repo |
| 13 | +/// @requires $custom-prop-prefix |
14 | 14 | /// @return {String} theme stack with fallback value from a sass map |
15 | | -@function pfe-get-from-map($category, $key, $map, $fallback: null, $prefix: to-string($repo"-theme"), $use-fallback: true) { |
| 15 | +@function pfe-get-from-map($category, $key, $map, $fallback: null, $prefix: "#{$custom-prop-prefix}-theme", $use-fallback: true) { |
16 | 16 | // Start building the variable declaration |
17 | 17 | $var-declaration: "--#{$prefix}--"; |
18 | 18 | @if $prefix == "pf-c" { |
|
43 | 43 | /// Returns CSS Var for the local component-scoped variable |
44 | 44 | /// @param {String} $cssvar - Variable identifiers which are postfixed and combined using '--' |
45 | 45 | /// @param {String} $region - Identifies the region or slot to which this is assigned |
46 | | -/// @see $repo |
| 46 | +/// @see $custom-prop-prefix |
47 | 47 | /// @see $LOCAL |
48 | 48 | /// @example |
49 | 49 | /// :host { |
|
70 | 70 | } |
71 | 71 |
|
72 | 72 | // Start building the variable declaration |
73 | | - $var-declaration: "--#{$repo}-#{$LOCAL}#{$region}--#{to-string($cssvar, '--')}"; |
| 73 | + $var-declaration: "--#{$custom-prop-prefix}-#{$LOCAL}#{$region}--#{to-string($cssvar, '--')}"; |
74 | 74 |
|
75 | 75 | @if $fallback != null { |
76 | 76 | $var-declaration: "#{$var-declaration}, #{$fallback}"; |
|
83 | 83 | /// Fetches a CSS variable stack for broadcasted variables, providing a hook for context |
84 | 84 | /// to influence the styles of children elements such as p tags or links. |
85 | 85 | /// @param {String} $broadcast - name of the broadcast variable to apply |
86 | | -/// @requires {String} $repo - Name of repo, which is "pfe" |
| 86 | +/// @requires {String} $custom-prop-prefix - Name of repo, which is "pfe" |
87 | 87 | /// @example - scss |
88 | 88 | /// :host { |
89 | 89 | /// color: pfe-broadcasted(link); |
|
98 | 98 | $fallback: ", #{map-get($pfe-broadcasted, #{to-string($broadcast,'--')})}"; |
99 | 99 | } |
100 | 100 | @if not index($BROADCAST-VARS, first(str-split($broadcast, '--'))) { |
101 | | - @error "--#{$repo}-broadcasted--#{$broadcast} variable is not currently supported."; |
| 101 | + @error "--#{$custom-prop-prefix}-broadcasted--#{$broadcast} variable is not currently supported."; |
102 | 102 | } |
103 | 103 | @else { |
104 | | - @return var(--#{$repo}-broadcasted--#{to-string($broadcast,'--')}#{unquote($fallback)}); |
| 104 | + @return var(--#{$custom-prop-prefix}-broadcasted--#{to-string($broadcast,'--')}#{unquote($fallback)}); |
105 | 105 | } |
106 | 106 | } |
107 | 107 |
|
|
0 commit comments