From 819eb90a16adb921a9f362327f2f38139a87a707 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Sun, 13 Mar 2016 11:11:19 +0800 Subject: add tables style --- demo/index.html | 43 +++++++++++++++++++++++++++++++++++++++++-- dist/spectre.css | 13 +++++++++++++ spectre.less | 1 + src/tables.less | 14 ++++++++++++++ src/variables.less | 1 + 5 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 src/tables.less diff --git a/demo/index.html b/demo/index.html index d3740c5..cf76fc7 100644 --- a/demo/index.html +++ b/demo/index.html @@ -86,7 +86,46 @@ -
+
+

tables

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
namedurationgenrerelease date
The Shawshank Redemption2h 22minCrime, Drama14 October 1994 (USA)
The Godfather2h 55minCrime, Drama24 March 1972 (USA)
Schindler's List3h 15minBiography, Drama, History4 February 1994 (USA)
Se7en2h 7minCrime, Drama, Mystery24 March 1972 (USA)
+
+

buttons

@@ -117,7 +156,7 @@
-
+

forms

diff --git a/dist/spectre.css b/dist/spectre.css index a58851c..8babd15 100644 --- a/dist/spectre.css +++ b/dist/spectre.css @@ -583,6 +583,19 @@ ol ol { width: 8.33333333%; } } +table { + width: 100%; +} +th, +td { + text-align: left; + padding: 1rem .5rem; + border-bottom: 0.1rem solid #efefef; + background-color: #fff; +} +th { + border-color: #d6d6d6; +} .btn, button { display: inline-block; diff --git a/spectre.less b/spectre.less index 9365794..7b03e71 100644 --- a/spectre.less +++ b/spectre.less @@ -11,6 +11,7 @@ // Core classes @import 'src/typography.less'; @import 'src/layout.less'; +@import 'src/tables.less'; // Components @import 'src/buttons.less'; diff --git a/src/tables.less b/src/tables.less new file mode 100644 index 0000000..c819904 --- /dev/null +++ b/src/tables.less @@ -0,0 +1,14 @@ +// Tables +table { + width: 100%; +} +th, +td { + text-align: left; + padding: 1rem .5rem; + border-bottom: .1rem solid @core-border-color; + background-color: #fff; +} +th { + border-color: darken(@core-border-color, 10%); +} \ No newline at end of file diff --git a/src/variables.less b/src/variables.less index c85f6b2..2c99039 100644 --- a/src/variables.less +++ b/src/variables.less @@ -8,6 +8,7 @@ // Colors @core-color: #5764C6; +@core-border-color: #efefef; @control-color: #c5c5c5; @control-color-success: #00c372; @control-color-warning: #fccf42; -- cgit v1.3.1-26-gb76a