-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This branch is based off of `try/better-responsive-table`, but without my attempt at better responsiveness. - New toggle to decide whether table has fixed widths, off by default, as discussed in #2620 - Surface and style the resizing tool
- Loading branch information
Joen Asmussen
committed
Apr 20, 2018
1 parent
cb1b92e
commit 64bd056
Showing
3 changed files
with
82 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
.wp-block-table { | ||
table { | ||
border-collapse: collapse; | ||
width: 100%; | ||
} | ||
|
||
td, | ||
th { | ||
padding: 0.5em; | ||
border: 1px solid currentColor; | ||
} | ||
|
||
td[data-mce-selected="1"], th[data-mce-selected="1"] { | ||
background-color: $light-gray-500; | ||
td[data-mce-selected="1"], | ||
th[data-mce-selected="1"] { | ||
background-color: $light-gray-300; | ||
} | ||
} | ||
|
||
// Style the resize handles | ||
.ephox-snooker-resizer-rows { | ||
cursor: row-resize; | ||
} | ||
|
||
.ephox-snooker-resizer-cols { | ||
cursor: col-resize; | ||
} | ||
|
||
.ephox-snooker-resizer-bar-dragging { | ||
background: $blue-medium-500; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,22 @@ | ||
.wp-block-table { | ||
overflow-x: auto; | ||
display: block; | ||
border-collapse: collapse; | ||
width: 100%; | ||
|
||
table { | ||
border-collapse: collapse; | ||
tbody { | ||
width: 100%; | ||
display: table; | ||
} | ||
|
||
td, | ||
th { | ||
padding: 0.5em; | ||
border: 1px solid currentColor; | ||
} | ||
|
||
// Fixed layout toggle | ||
&.has-fixed-layout tbody { | ||
table-layout: fixed; | ||
} | ||
} |