Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Grid and widget fixes for the admin area

  • Loading branch information...
commit 60ecf5f9c9e3828e16f39445a90c57da48c2fb6d 1 parent 97ab13a
@ewinslow ewinslow authored
Showing with 26 additions and 40 deletions.
  1. +25 −40 views/default/css/admin.php
  2. +1 −0  views/default/css/elements/core.php
View
65 views/default/css/admin.php
@@ -132,6 +132,7 @@
.elgg-head:after,
.elgg-foot:after,
.elgg-col:after,
+.elgg-col-alt:after,
.elgg-image-block:after {
content: ".";
display: block;
@@ -1130,7 +1131,7 @@
.elgg-module-widget {
background-color: #dedede;
padding: 1px;
- margin: 0 5px 15px;
+ margin: 0 0 15px;
position: relative;
}
.elgg-module-widget:hover {
@@ -1188,47 +1189,31 @@
/* ***************************************
GRID
*************************************** */
-.elgg-grid {}
-.elgg-col {
- float: left;
-}
-.elgg-col-1of1 {
- float: none;
-}
-.elgg-col-1of2 {
- width: 50%;
-}
-.elgg-col-1of3 {
- width: 33.33%;
-}
-.elgg-col-2of3 {
- width: 66.66%;
-}
-.elgg-col-1of4 {
- width: 25%;
-}
-.elgg-col-3of4 {
- width: 75%;
-}
-.elgg-col-1of5 {
- width: 20%;
-}
-.elgg-col-2of5 {
- width: 40%;
-}
-.elgg-col-3of5 {
- width: 60%;
-}
-.elgg-col-4of5 {
- width: 80%;
-}
-.elgg-col-1of6 {
- width: 16.66%;
-}
-.elgg-col-5of6 {
- width: 83.33%;
+<?php $gutterWidthPercent = 1.6; /* 16px on a 1000px grid */ ?>
+
+.elgg-grid + .elgg-grid { margin-top: <?php echo $gutterWidthPercent; ?>%; }
+.elgg-col { float: left; margin-right: <?php echo $gutterWidthPercent; ?>%; }
+.elgg-col-alt { float: right; margin-left: <?php echo $gutterWidthPercent; ?>%; margin-right: 0; }
+.elgg-col-1of1 { float: none; margin: 0; }
+.elgg-col:last-child, .elgg-col-last { float: none; overflow: hidden; margin: 0; width: auto; }
+
+<?php
+
+for ($i = 2; $i <= 6; $i++) {
+ $gutters = $i - 1;
+ $columnWidthPercent = (100 - $gutters * $gutterWidthPercent)/$i;
+ for ($j = 1; $j < $i; $j++) {
+ if ($j > 1 && ($i/$j) === (int)($i/$j)) {
+ continue;
+ }
+
+ $widthPercent = $j * $columnWidthPercent + ($j - 1) * $gutterWidthPercent;
+ echo ".elgg-col-{$j}of{$i} { width: $widthPercent%; }\n";
+ }
}
+?>
+
/* ***************************************
ICONS
*************************************** */
View
1  views/default/css/elements/core.php
@@ -25,6 +25,7 @@
.elgg-head:after,
.elgg-foot:after,
.elgg-col:after,
+.elgg-col-alt:after,
.elgg-image-block:after {
content: ".";
display: block;
Please sign in to comment.
Something went wrong with that request. Please try again.