Skip to content

Commit

Permalink
Merge pull request #2110 from mehul0810/css_grid
Browse files Browse the repository at this point in the history
Grid CSS for Admin
  • Loading branch information
Devin Walker committed Sep 25, 2017
2 parents abfb507 + f6614be commit f943945
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 3 deletions.
52 changes: 52 additions & 0 deletions assets/css/give-admin-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,58 @@ x:-o-prefocus, .qtip .qtip-tip {
width: 14px;
line-height: 20px; }

.give-grid-row {
position: relative;
width: 100%; }
.give-grid-row [class^="give-grid-col"] {
float: right;
margin: 0.5rem 1%;
min-height: 0.125rem; }
.give-grid-row::after {
content: "";
display: table;
clear: both; }

.give-grid-col-1 {
width: 6.33333%; }

.give-grid-col-2 {
width: 14.66667%; }

.give-grid-col-3 {
width: 23%; }

.give-grid-col-4 {
width: 31.33333%; }

.give-grid-col-5 {
width: 39.66667%; }

.give-grid-col-6 {
width: 48%; }

.give-grid-col-7 {
width: 56.33333%; }

.give-grid-col-8 {
width: 64.66667%; }

.give-grid-col-9 {
width: 73%; }

.give-grid-col-10 {
width: 81.33333%; }

.give-grid-col-11 {
width: 89.66667%; }

.give-grid-col-12 {
width: 98%; }

@media only screen and (max-width: 33.75em) {
.give-grid-row [class^="give-grid-col"] {
width: 98%; } }

/**
* Give Forms SCSS
*
Expand Down
2 changes: 1 addition & 1 deletion assets/css/give-admin-rtl.min.css

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions assets/css/give-admin.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/css/give-admin.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/scss/admin/give-admin.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import '../plugins/qtip';
@import '../frontend/fonts';
@import 'fonts';
@import 'grids';
@import 'forms';
@import 'addons';
@import 'reports';
Expand Down
44 changes: 44 additions & 0 deletions assets/scss/admin/grids.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
$width: 98%;
$gutter: 2%;
$breakpoint-small: 33.75em; // 540px
$breakpoint-medium: 45em; // 720px
$breakpoint-large: 60em; // 960px

.give-grid-row {
position: relative;
width: 100%;

[class^="give-grid-col"] {
float: left;
margin: 0.5rem 1%;
min-height: 0.125rem;
}

&::after {
content: "";
display: table;
clear: both;
}
}


.give-grid-col-1 { width:($width / 12) - ($gutter * 11 / 12); }
.give-grid-col-2 { width: ($width / 6) - ($gutter * 10 / 12); }
.give-grid-col-3 { width: ($width / 4) - ($gutter * 9 / 12); }
.give-grid-col-4 { width: ($width / 3) - ($gutter * 8 / 12); }
.give-grid-col-5 { width: ($width / (12 / 5)) - ($gutter * 7 / 12); }
.give-grid-col-6 { width: ($width / 2) - ($gutter * 6 / 12); }
.give-grid-col-7 { width: ($width / (12 / 7)) - ($gutter * 5 / 12); }
.give-grid-col-8 { width: ($width / (12 / 8)) - ($gutter * 4 / 12); }
.give-grid-col-9 { width: ($width / (12 / 9)) - ($gutter * 3 / 12); }
.give-grid-col-10 { width: ($width / (12 / 10)) - ($gutter * 2 / 12); }
.give-grid-col-11 { width: ($width / (12 / 11)) - ($gutter * 1 / 12); }
.give-grid-col-12 { width: $width; }

@media only screen and (max-width: $breakpoint-small) {
.give-grid-row {
[class^="give-grid-col"] {
width: $width;
}
}
}
2 changes: 1 addition & 1 deletion assets/sourcemaps/give-admin.css.map

Large diffs are not rendered by default.

0 comments on commit f943945

Please sign in to comment.