Skip to content

Commit

Permalink
Added card-handle and card-type.
Browse files Browse the repository at this point in the history
Added disabled.
Added divider.
  • Loading branch information
sjohnsonaz committed Feb 14, 2019
1 parent 517b998 commit 9856aa0
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 3 deletions.
17 changes: 16 additions & 1 deletion src/styl/card/card-settings.styl
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,19 @@ $card-gap ?= $default-margin-layout;
$card-min-width ?= 300px;
$card-max-width ?= 1fr;

$card-control-margin ?= $default-spacing;
$card-control-margin ?= $default-spacing;

$card-success-background-color ?= $success-color;
$card-success-color ?= $success-color-alt;
$card-success-border-color ?= $success-color;
$card-info-background-color ?= $info-color;
$card-info-color ?= $info-color-alt;
$card-info-border-color ?= $info-color;
$card-warning-background-color ?= $warning-color;
$card-warning-color ?= $warning-color-alt;
$card-warning-border-color ?= $warning-color;
$card-danger-background-color ?= $danger-color;
$card-danger-color ?= $danger-color-alt;
$card-danger-border-color ?= $danger-color;

$card-handle-width ?= 3px;
32 changes: 32 additions & 0 deletions src/styl/card/card.styl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,38 @@ $card-header-margin = -($card-border-width + $card-padding);
}
}

&.card-type-success {
border-color: $card-success-border-color;
}

&.card-type-info {
border-color: $card-info-border-color;
}

&.card-type-warning {
border-color: $card-warning-border-color;
}

&.card-type-danger {
border-color: $card-danger-border-color;
}

&.card-handle-top {
border-top-width: $card-handle-width;
}

&.card-handle-right {
border-right-width: $card-handle-width;
}

&.card-handle-bottom {
border-bottom-width: $card-handle-width;
}

&.card-handle-left {
border-left-width: $card-handle-width;
}

& > header,
& > footer,
.card-title {
Expand Down
18 changes: 18 additions & 0 deletions src/styl/core/mixins.styl
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,22 @@ relative() {
border-left-width: $default-border-width;
border-left-color: $default-border-color;
border-left-style: solid;
}

.divider,
.divider-horizontal {
border-width: $default-border-width 0 0 0;
border-color: $default-border-color;
border-style: solid;
}

.divider-vertical {
border-width: 0 $default-border-width 0 0;
border-color: $default-border-color;
border-style: solid;
}

&.disabled {
filter: contrast(40%) brightness(110%);
cursor: default;
}
4 changes: 2 additions & 2 deletions test/views/card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</nav>
<footer>Card Footer</footer>
</section>
<section class="card" data-closed="true">
<section class="card card-handle-left card-type-success" data-closed="true">
<header>Card Header</header>
<div class="card-content">
<div>Card Content</div>
Expand Down Expand Up @@ -57,7 +57,7 @@
</nav>
<footer class="card-title">Card Footer</footer>
</section>
<section class="card" data-closed="false">
<section class="card disabled" data-closed="false">
<header>Card Header</header>
<div class="card-content space">
<div>Card Content</div>
Expand Down

0 comments on commit 9856aa0

Please sign in to comment.