Skip to content

Commit

Permalink
Transition mixin: enable multiple property as string
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlaki committed Nov 23, 2023
1 parent 853534c commit 70e6035
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions preview/assets/scss/config/_config.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ $spacer: 1.25rem;
'border-radius': 0.25em,
'text-transform': uppercase,
),
$form-fieldset: (
'legend-font-family': serif,
),
$form-range: (
'thumb-block-size': 2rem,
'thumb-inline-size': 2rem,
Expand All @@ -56,4 +59,7 @@ $spacer: 1.25rem;
$layout: (
'container-inline-size': 70rem,
),
$typography: (
'letter-spacing-heading': 0.05em,
),
);
2 changes: 1 addition & 1 deletion preview/pug/page/form.pug
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ block content
legend Inputs
div(class='form-group')
label(for='email-address' class='form-label') Email address
input(class='form-control' id='email-address' type='email')
input(class='form-control' id='email-address' type='email' placeholder='[email protected]')
div(class='form-group')
label(for='number' class='form-label') Number
input(class='form-control' id='number' type='number')
Expand Down
3 changes: 2 additions & 1 deletion scss/mixin/_transition.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use 'sass:string';
@use '../function' as *;

/// Generates transition related declarations.
Expand All @@ -16,7 +17,7 @@
} @else {
transition-duration: $duration;
}
transition-property: $property;
transition-property: string.unquote($property);
@if $timing-function == timing-function {
transition-timing-function: transition($timing-function);
} @else {
Expand Down

0 comments on commit 70e6035

Please sign in to comment.