From c37137805e9e86f240ed28735e6d90b620d84417 Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 17 Sep 2019 22:43:36 +0200 Subject: [PATCH] Adding table --- index.html | 30 ++++++++++++++++++++++++++++++ package-lock.json | 2 +- package.json | 4 +++- src/_maketheme.scss | 3 ++- src/base.scss | 3 ++- src/base/_list.scss | 9 +-------- src/base/_table.scss | 16 ++++++++++++++++ src/theme/_table.scss | 5 +++++ 8 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 src/base/_table.scss create mode 100644 src/theme/_table.scss diff --git a/index.html b/index.html index 7859bc3..b7b9c33 100644 --- a/index.html +++ b/index.html @@ -217,6 +217,36 @@ + + diff --git a/package-lock.json b/package-lock.json index fab2896..729a4fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@hibas123/theme", - "version": "1.2.4", + "version": "1.2.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index f7c7759..bdfc27c 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,13 @@ { "name": "@hibas123/theme", - "version": "1.2.6", + "version": "1.2.7", "description": "", "main": " ", "files": [ "out/*.css", "src/*", + "index.html", + "ipsum.js", "Roboto-Regular.woff2" ], "scripts": { diff --git a/src/_maketheme.scss b/src/_maketheme.scss index d06d2b2..780a47f 100644 --- a/src/_maketheme.scss +++ b/src/_maketheme.scss @@ -49,4 +49,5 @@ $button-color: #CCCCCC !default; @import "./theme/_input.scss"; @import "./theme/_list.scss"; @import "./theme/_header.scss"; -@import "./theme/_card.scss"; \ No newline at end of file +@import "./theme/_card.scss"; +@import "./theme/table.scss"; \ No newline at end of file diff --git a/src/base.scss b/src/base.scss index 5688064..f10f273 100644 --- a/src/base.scss +++ b/src/base.scss @@ -34,4 +34,5 @@ $on-error: var(--on-error) !default; @import "./base/_list.scss"; @import "./base/_header.scss"; @import "./base/_card.scss"; -@import "./base/_grid.scss"; \ No newline at end of file +@import "./base/_grid.scss"; +@import "./base/table.scss"; \ No newline at end of file diff --git a/src/base/_list.scss b/src/base/_list.scss index c82b8a0..6ad4bda 100644 --- a/src/base/_list.scss +++ b/src/base/_list.scss @@ -11,11 +11,4 @@ li:nth-child(n+2) { border-top: 1px solid rgb(128, 128, 128); } -} - - -// .list-clickable { -// // li:hover { -// // background: darken-brighten-color($background, 5%); -// // } -// } \ No newline at end of file +} \ No newline at end of file diff --git a/src/base/_table.scss b/src/base/_table.scss new file mode 100644 index 0000000..e64d462 --- /dev/null +++ b/src/base/_table.scss @@ -0,0 +1,16 @@ +.table { + + border-collapse: collapse; + width: 100%; + + th, + td { + text-align: left; + padding: 8px; + } + + tr:first-child { + background-color: $primary; + color: var(--on-primary); + } +} \ No newline at end of file diff --git a/src/theme/_table.scss b/src/theme/_table.scss new file mode 100644 index 0000000..c48a03e --- /dev/null +++ b/src/theme/_table.scss @@ -0,0 +1,5 @@ +.table { + tr:nth-child(odd):not(:first-child) { + background: darken-brighten-color($background, 10%) + } +} \ No newline at end of file