]> BookStack Code Mirror - bookstack/commitdiff
Updated table styling to ideally by more predictable
authorDan Brown <redacted>
Tue, 6 Sep 2016 19:47:34 +0000 (20:47 +0100)
committerDan Brown <redacted>
Tue, 6 Sep 2016 19:47:34 +0000 (20:47 +0100)
Set styles to be fixed and not cut text.

resources/assets/js/pages/page-form.js
resources/assets/sass/_html.scss
resources/assets/sass/_pages.scss
resources/assets/sass/_tables.scss

index 66161a2489320cfee4c8829b430ff413b8547ff4..755d558e83ffcde90d3f349e6568fc5da163f3c2 100644 (file)
@@ -50,7 +50,7 @@ function editorPaste(e, editor) {
 function registerEditorShortcuts(editor) {
     // Headers
     for (let i = 1; i < 5; i++) {
-        editor.addShortcut('ctrl+' + i, '', ['FormatBlock', false, 'h' + i]);
+        editor.addShortcut('meta+' + i, '', ['FormatBlock', false, 'h' + i]);
     }
 
     // Other block shortcuts
index 82eb9c2b9f1c8cbc606033d3cf122d5087805c68..c061f9d64253b6bf117ad018b37f22da5c5f7e47 100644 (file)
@@ -1,6 +1,7 @@
 * {
   box-sizing: border-box;
 }
+
 html {
   background-color: #FFFFFF;
   height: 100%;
@@ -9,6 +10,7 @@ html {
     overflow-y: hidden;
   }
 }
+
 body {
   font-family: $text;
   font-size: $fs-m;
@@ -19,16 +21,4 @@ body {
 
 button {
   font-size: 100%;
-}
-
-table {
-  min-width: 100px;
-  td, th {
-       min-width: 10px;
-       padding: 4px 6px;
-       border: 1px solid #DDD;
-  }
-  td p, th p {
-    margin: 0;
-  }
 }
\ No newline at end of file
index 9787571e2428470a5fe6beeb0eaf435e844a2a7e..42ca0a21f83dbb93dbe0a52c159a83c59eef2299 100644 (file)
     margin: $-m 0;
   }
   table {
-    word-break: break-all;
-    word-break: break-word;
     hyphens: auto;
+    table-layout: fixed;
+    max-width: 100%;
+    height: auto !important;
   }
 }
 
index b23db436aeba9c63aefb67c82b6c992c21c2c7f1..1fc8e11c2266a14ec2edfe70f2fa19fb87832ede 100644 (file)
@@ -1,3 +1,21 @@
+table {
+  min-width: 100px;
+  max-width: 100%;
+  thead {
+    background-color: #F8F8F8;
+    font-weight: 500;
+  }
+  td, th {
+    min-width: 10px;
+    padding: 6px 8px;
+    border: 1px solid #DDD;
+    overflow: auto;
+    line-height: 1.2;
+  }
+  td p, th p {
+    margin: 0;
+  }
+}
 
 table.table {
   width: 100%;
@@ -9,6 +27,7 @@ table.table {
     border: none;
     padding: $-xs $-xs;
     vertical-align: middle;
+    margin: 0;
   }
   th {
     font-weight: bold;
@@ -18,14 +37,6 @@ table.table {
   }
 }
 
-table {
-  max-width: 100%;
-  thead {
-    background-color: #F8F8F8;
-    font-weight: 500;
-  }
-}
-
 table.no-style {
   td {
     border: 0;
Morty Proxy This is a proxified and sanitized view of the page, visit original site.