Skip to content

Commit

Permalink
Updated table styling to ideally by more predictable
Browse files Browse the repository at this point in the history
Set styles to be fixed and not cut text.
  • Loading branch information
ssddanbrown committed Sep 6, 2016
1 parent d94fc5b commit 393f604
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion resources/assets/js/pages/page-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 2 additions & 12 deletions resources/assets/sass/_html.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
* {
box-sizing: border-box;
}

html {
background-color: #FFFFFF;
height: 100%;
Expand All @@ -9,6 +10,7 @@ html {
overflow-y: hidden;
}
}

body {
font-family: $text;
font-size: $fs-m;
Expand All @@ -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;
}
}
5 changes: 3 additions & 2 deletions resources/assets/sass/_pages.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@
margin: $-m 0;
}
table {
word-break: break-all;
word-break: break-word;
hyphens: auto;
table-layout: fixed;
max-width: 100%;
height: auto !important;
}
}

Expand Down
27 changes: 19 additions & 8 deletions resources/assets/sass/_tables.scss
Original file line number Diff line number Diff line change
@@ -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%;
Expand All @@ -9,6 +27,7 @@ table.table {
border: none;
padding: $-xs $-xs;
vertical-align: middle;
margin: 0;
}
th {
font-weight: bold;
Expand All @@ -18,14 +37,6 @@ table.table {
}
}

table {
max-width: 100%;
thead {
background-color: #F8F8F8;
font-weight: 500;
}
}

table.no-style {
td {
border: 0;
Expand Down

0 comments on commit 393f604

Please sign in to comment.