Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/styles/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

@each $breakpoint in map.keys(breakpoint-settings.$values) {
@include breakpoint.up($breakpoint) {
$infix: if(map.get(breakpoint-settings.$values, $breakpoint) == 0, "", "-#{$breakpoint}");
$infix: "";

@if map.get(breakpoint-settings.$values, $breakpoint) != 0 {
$infix: "-#{$breakpoint}";
}

@each $key, $utility in utility-settings.$map {
@if meta.type-of($utility) == "map" and (map.get($utility, responsive) == true or $infix == "") {
Expand Down
56 changes: 34 additions & 22 deletions src/styles/tools/_collections.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,29 @@
$properties,
) {
@each $property in $properties {
$modifier: if($modifier-value, "--" + $modifier-value, "");
$state: if($interaction-state, "--" + $interaction-state, "");
$fallback-custom-property: "";
$modifier: "";
$state: "";

@if $modifier-value {
$modifier: "--" + $modifier-value;
}

@if $interaction-state {
$state: "--" + $interaction-state;
}

@if $interaction-state == "disabled" {
$fallback-custom-property: ", var(--"
+ $prefix
+ $component-name
+ $modifier
+ "--"
+ $variant-value
+ "--default__"
+ $property
+ ")";
}

// 1.
--#{$prefix}local-#{$property}:
Expand All @@ -80,19 +101,7 @@
+ "__"
+ $property
}
#{if(
$interaction-state and $interaction-state == "disabled",
", var(--"
+ $prefix
+ $component-name
+ $modifier
+ "--"
+ $variant-value
+ "--default__"
+ $property
+ ")",
""
)}
#{$fallback-custom-property}
); // 2.
}
}
Expand Down Expand Up @@ -202,13 +211,16 @@
$inherit-link-color: false,
$properties,
) {
$modifier-class-name:
if(
$modifier-name and $modifier-value,
".isRoot#{rui-string.capitalize($modifier-name)}#{rui-string.capitalize($modifier-value)}",
""
);
$variant-class-name: ".isRoot#{rui-string.capitalize($variant-name)}#{rui-string.capitalize($variant-value)}";
$modifier-class-name: "";
$variant-class-name: ".isRoot"
+ rui-string.capitalize($variant-name)
+ rui-string.capitalize($variant-value);

@if $modifier-name and $modifier-value {
$modifier-class-name: ".isRoot"
+ rui-string.capitalize($modifier-name)
+ rui-string.capitalize($modifier-value);
}

#{$modifier-class-name}#{$variant-class-name} {
@if $generate-interaction-states {
Expand Down
6 changes: 4 additions & 2 deletions src/styles/tools/_utilities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
@each $key, $value in $values {
$properties: map.get($utility, property);
$property-class: map.get($utility, class);
$property-class-modifier: "";

// Don't prefix if value key is null (e.g. with shadow class)
$property-class-modifier: if($key, "-" + $key, "");
@if $key {
$property-class-modifier: "-" + $key;
}

.#{$property-class + $infix + $property-class-modifier} {
@each $property in $properties {
Expand Down
5 changes: 4 additions & 1 deletion tests/playwright/env/parseDotEnvFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const PLAYWRIGHT_ENV_FILE = '.env.playwright';
* Load and parse Playwright environment file into an object.
*/
export const parseDotEnvFile = () => {
const dotEnvConfigOutput = dotenv.config({ path: PLAYWRIGHT_ENV_FILE });
const dotEnvConfigOutput = dotenv.config({
path: PLAYWRIGHT_ENV_FILE,
quiet: true,
});

if (dotEnvConfigOutput.error) {
// eslint-disable-next-line no-console
Expand Down
Loading