Skip to content
This repository has been archived by the owner on Oct 31, 2018. It is now read-only.

Commit

Permalink
Merge pull request #92 from TheRockman/003
Browse files Browse the repository at this point in the history
refactor card grids
  • Loading branch information
gademuu authored Jul 19, 2016
2 parents 0c4f19b + 7347ca9 commit 262463c
Showing 1 changed file with 129 additions and 16 deletions.
145 changes: 129 additions & 16 deletions css/_cards.scss
Original file line number Diff line number Diff line change
@@ -1,27 +1,140 @@


//Cards
//Card grid
//
//Cards are used to show a large number of same size content. Providing filters or ways to sort cards is good.
// Cards are used to show a large number of similar content. Providing filters or ways to sort cards is appreciated.
// Card actions should be triggered on click of the whole card.
//
//Markup:
// <div class="card-group">
// <div class="wfm-card" tabindex="0"><h2>Title</h2></div>
// <div class="wfm-card wfm-card-disabled" tabindex="0"><h2>Title</h2></div>
// <div class="wfm-card" tabindex="0"><h2>Title</h2></div>
// <div class="wfm-card" tabindex="0"><h2>Title</h2></div>
// <div class="wfm-card" tabindex="0"><h2>Title</h2></div>
// <div class="wfm-card" tabindex="0"><h2>Title</h2></div>
// <div class="wfm-card" tabindex="0"><h2>Title</h2></div>
// </div>
//<div class="wfm-grid">
// <div class="grid-card">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
// <div class="grid-card">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
// <div class="grid-card">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
//</div>
//
//Styleguide 1.18
//
.card-group {
display: inline-block;
width: 100%;
transition: 1s all ease-in-out;
}

//Mini card grid
//
//Smaller cards that provide more items on screen at once.
//
//Markup:
//<div class="wfm-grid">
// <div class="grid-card-mini">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
// <div class="grid-card-mini">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
// <div class="grid-card-mini">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
// <div class="grid-card-mini">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
// <div class="grid-card-mini">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
// <div class="grid-card-mini">
// <div class="list-content">
// <h2>Card header</h2>
// <span>Short card tag line</span>
// </div>
// </div>
//</div>
//
//Styleguide 1.18.1
//

.wfm-grid {
display: flex;
flex-wrap: wrap;

.grid-card-disabled{
background: $gray012;
pointer-events: none;
cursor: not-allowed!important;
}

.grid-card, .grid-card-mini {
display: flex;
padding: $full-padding;
width: 100%;
}

@media all and (min-width: 768px) {
.grid-card {
width: 50%;
}

.grid-card-mini{
width:25%;
}
}

@media all and (min-width: 960px) {
.grid-card {
width: 33.33%;
}

.grid-card-mini{
width:16.66%;
}
}

.list-content {
background-color: $white;
display: flex;
flex-direction: column;
padding:$full-padding;
width: 100%;

@extend .material-depth-1;
@extend .raise;
}

.list-content span {
flex: 1 0 auto;
padding-bottom: $full-padding;
}
}

.card-group {
display: inline-block;
width: 100%;
transition: 1s all ease-in-out;
}

.wfm-card {
display: block;
Expand Down

0 comments on commit 262463c

Please sign in to comment.