Summary Files Commits Branches @commit @diff @stats
diff options
context:
space:
mode:
Commit819eb90a16adb921a9f362327f2f38139a87a707 (patch)
Author
 Yan Zhu <picturepan2@hotmail.com>
2016-03-13 11:11:19 +0800
Committer
 Yan Zhu <picturepan2@hotmail.com>
2016-03-13 11:11:19 +0800
Files9c74c9c48ecc0f7310dd0c38372b05ec53bcb008
Spectre-Dark-Gruvbox-819eb90a16adb921a9f362327f2f38139a87a707.tar
Spectre-Dark-Gruvbox-819eb90a16adb921a9f362327f2f38139a87a707.tar.gz
Spectre-Dark-Gruvbox-819eb90a16adb921a9f362327f2f38139a87a707.zip
Parent2f203a1fd63746a68c985ce55529de03b960cdce (diff)
add tables style
5 files changed, 70 insertions, 2 deletions
-rw-r--r--demo/index.html43
-rw-r--r--dist/spectre.css13
-rw-r--r--spectre.less1
-rw-r--r--src/tables.less14
-rw-r--r--src/variables.less1
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 @@
</div>
</div>
</section>
- <section class="layout">
+ <section class="tables">
+ <header class="text-center"><h4>tables</h4></header>
+ <table>
+ <thead>
+ <tr>
+ <th>name</th>
+ <th>duration</th>
+ <th>genre</th>
+ <th>release date</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>The Shawshank Redemption</td>
+ <td>2h 22min</td>
+ <td>Crime, Drama</td>
+ <td>14 October 1994 (USA)</td>
+ </tr>
+ <tr>
+ <td>The Godfather</td>
+ <td>2h 55min</td>
+ <td>Crime, Drama</td>
+ <td>24 March 1972 (USA)</td>
+ </tr>
+ <tr>
+ <td>Schindler's List</td>
+ <td>3h 15min</td>
+ <td>Biography, Drama, History</td>
+ <td>4 February 1994 (USA)</td>
+ </tr>
+ <tr>
+ <td>Se7en</td>
+ <td>2h 7min</td>
+ <td>Crime, Drama, Mystery</td>
+ <td>24 March 1972 (USA)</td>
+ </tr>
+ </tbody>
+ </table>
+ </section>
+ <section class="buttons">
<header class="text-center"><h4>buttons</h4></header>
<div class="columns">
<div class="column">
@@ -117,7 +156,7 @@
</div>
</div>
</section>
- <section class="layout">
+ <section class="forms">
<header class="text-center"><h4>forms</h4></header>
<form class="col-6">
<div class="form-group">
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;