summaryrefslogtreecommitdiff
path: root/lib/flat/dgrid
diff options
context:
space:
mode:
Diffstat (limited to 'lib/flat/dgrid')
-rw-r--r--lib/flat/dgrid/README.md8
-rw-r--r--lib/flat/dgrid/flat.css12
-rw-r--r--lib/flat/dgrid/flat.styl48
3 files changed, 68 insertions, 0 deletions
diff --git a/lib/flat/dgrid/README.md b/lib/flat/dgrid/README.md
new file mode 100644
index 000000000..7d99fc726
--- /dev/null
+++ b/lib/flat/dgrid/README.md
@@ -0,0 +1,8 @@
+The dgrid flat theme builds on the Stylus-based CSS refactor found in dgrid 1.0.
+This portion of the theme requires the [dgrid](http://dgrid.io/) package.
+
+To build your own flat dgrid theme, you may want to adjust the path to dgrid. By
+default, we assume that dgrid is a sibling directory to themes. If this is not
+the case within your application directory structure, simply specify a different
+value for `$flat_path_to_dgrid` in your stylus file for your theme, before
+importing themes/flat/dgrid/flat.styl.
diff --git a/lib/flat/dgrid/flat.css b/lib/flat/dgrid/flat.css
new file mode 100644
index 000000000..e10737013
--- /dev/null
+++ b/lib/flat/dgrid/flat.css
@@ -0,0 +1,12 @@
+.flat {
+ import: '../../dgrid/css/skins/skin';
+}
+.flat .dgrid-cell-padding {
+ padding: 5px 10px;
+}
+.flat .dgrid-header .dgrid-cell {
+ border-bottom-width: 2px;
+}
+.flat .dgrid-selected {
+ border: 1px solid #007ac2;
+}
diff --git a/lib/flat/dgrid/flat.styl b/lib/flat/dgrid/flat.styl
new file mode 100644
index 000000000..9f5eaf3b2
--- /dev/null
+++ b/lib/flat/dgrid/flat.styl
@@ -0,0 +1,48 @@
+@require 'nib/gradients';
+@require 'nib/vendor';
+
+$flat_path_to_dgrid ?= '../../dgrid';
+
+$dgrid-background ?= #fff;
+$dgrid-border-color ?= #d0d0d0;
+$dgrid-cell-padding ?= 5px 10px;
+
+$dgrid-cell-has-vertical-border ?= false;
+
+$dgrid-header-background ?= #fff;
+$dgrid-header-cell-border-color ?= #d0d0d0;
+$dgrid-header-cell-border-bottom-width ?= 2px;
+$dgrid-header-cell-font-weight ?= bold;
+$dgrid-header-cell-hover-background ?= #f2f2f2;
+$dgrid-header-text-transform ?= uppercase;
+
+$dgrid-body-cell-border-color ?= #d0d0d0;
+$dgrid-body-row-transition-duration ?= 0.1s;
+$dgrid-body-row-transition-property ?= unquote('background-color');
+$dgrid-body-row-background ?= transparent;
+
+$dgrid-body-row-hover-background-color ?= #f2f2f2;
+
+$dgrid-selected-background-color ?= #fff;
+$dgrid-selected-border ?= 1px solid #007ac2;
+$dgrid-selected-hover-background-color ?= #f2f2f2;
+
+.flat {
+ import $flat_path_to_dgrid + '/css/skins/skin';
+
+ .dgrid-cell-padding {
+ padding: $dgrid-cell-padding;
+ }
+ .dgrid-header .dgrid-cell {
+ border-bottom-width: $dgrid-header-cell-border-bottom-width;
+ }
+ $dgrid-header-cell-border-bottom-width .dgrid-cell {
+ if (!$dgrid-cell-has-vertical-border) {
+ border-left: 0;
+ border-right: 0;
+ }
+ }
+ .dgrid-selected {
+ border: $dgrid-selected-border;
+ }
+}