Skip to content

Commit

Permalink
fix(@clayui/css): Mixins Timelines ignore timeline variables and use …
Browse files Browse the repository at this point in the history
…cadmin variables when compiling Cadmin Timelines

fix(@clayui/css): Timelines use $panel-border-left-width instead of $card-border-width for calculating increment position with panel
  • Loading branch information
pat270 committed Aug 23, 2021
1 parent 76670ef commit 2eebd4a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/clay-css/src/scss/components/_timelines.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

.panel {
.timeline-increment {
margin-left: -$card-border-width;
margin-left: math-sign($panel-border-left-width);
}
}
}
Expand Down
24 changes: 24 additions & 0 deletions packages/clay-css/src/scss/mixins/_timelines.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@
/// @group timelines
////

$card-border-width: if(
variable-exists(card-border-width),
$card-border-width,
$cadmin-card-border-width
);

$timeline-inner-spacing: if(
variable-exists(timeline-inner-spacing),
$timeline-inner-spacing,
$cadmin-timeline-inner-spacing
);

$timeline-border-width: if(
variable-exists(timeline-border-width),
$timeline-border-width,
$cadmin-timeline-border-width
);

$timeline-border-modifier: if(
variable-exists(timeline-border-modifier),
$timeline-border-modifier,
$cadmin-timeline-border-modifier
);

/// A mixin that places the `.timeline-item::before` element on the right side. This mixin is used in `.timeline-right`.
/// @todo
/// - Add @link to documentation
Expand Down

0 comments on commit 2eebd4a

Please sign in to comment.