Просмотр исходного кода

Tables (#13)

* Add styling for tables

By default tables have no lines and no separation between cells which can lead to confusion.
Vlad Ionescu 7 лет назад
Родитель
Сommit
0aab556131
3 измененных файлов с 31 добавлено и 0 удалено
  1. 6 0
      exampleSite/content/posts/theme-demo.md
  2. 0 0
      static/css/style.min.css
  3. 25 0
      static/less/style.less

+ 6 - 0
exampleSite/content/posts/theme-demo.md

@@ -26,6 +26,12 @@ _This is italic text_
 
 
 ~~Deleted text~~
 ~~Deleted text~~
 
 
+| Heading | Another heading |
+| :----:  | :-------------: |
+|  text   |      text       |
+|  text   |      text       |
+|  text   |      text       |
+
 > Block quotes are
 > Block quotes are
 > written like so.
 > written like so.
 >
 >

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/css/style.min.css


+ 25 - 0
static/less/style.less

@@ -119,6 +119,31 @@ blockquote {
   font-style: italic;
   font-style: italic;
 }
 }
 
 
+th, td {
+  padding: 1.6rem;
+}
+table {
+  border-collapse: collapse;
+}
+table td, table th {
+  border: 2px solid @darker-fg-color;
+}
+table tr:first-child th {
+  border-top: 0;
+}
+table tr:last-child td {
+  border-bottom: 0;
+}
+table tr td:first-child,
+table tr th:first-child {
+  border-left: 0;
+}
+table tr td:last-child,
+table tr th:last-child {
+    border-right: 0;
+}
+
+
 img {
 img {
   max-width: 100%;
   max-width: 100%;
 }
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов