Skip to content

Commit

Permalink
Add columns and cards
Browse files Browse the repository at this point in the history
  • Loading branch information
samwilson authored May 18, 2021
1 parent 240ec31 commit 8ada141
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 0 deletions.
42 changes: 42 additions & 0 deletions resources/less/cards.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@skin-wmau-card-space: 12px;

.card {
display: flex;
flex-direction: column;
border: 1px solid #c0c0c0;
border-radius: 4px;
width: 100%;
max-width: 100%;
margin: 0;
position: relative;

& > * {
margin: 0;
line-height: 1;
}

.card-body {
margin: @skin-wmau-card-space;

& > * {
margin: 0;
}
}

.card-title {
display: block;
font-size: larger;
font-weight: bolder;
margin-bottom: @skin-wmau-card-space;
}

img {
display: block;
width: 100%;
height: auto;
}

a {
color: inherit;
}
}
41 changes: 41 additions & 0 deletions resources/less/columns.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.row {
display: flex;
flex-wrap: wrap;

.col {
width: 100%;
max-width: 100%;
flex: 1 0 0;
padding: 1em;
}

.col-1 {
.col;
flex: 1;
}

.col-2 {
.col;
flex: 2;
}

.col-3 {
.col;
flex: 3;
}
}

@media screen and ( max-width: 750px ) {
.row {
display: block;

.col,
.col-1,
.col-2,
.col-3 {
flex: none;
padding: 0;
margin: 1em 0;
}
}
}
2 changes: 2 additions & 0 deletions resources/less/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
@import 'action-drawer';
@import 'feathericons';
@import 'searchform';
@import 'columns';
@import 'cards';
// @TODO This shouldn't be necessary. Why is it not working the proper way?
@import 'ext-wikidata-page-banner';

Expand Down

0 comments on commit 8ada141

Please sign in to comment.