Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

Commit

Permalink
More complete fix for T236613
Browse files Browse the repository at this point in the history
  • Loading branch information
joewalsh committed Oct 28, 2019
1 parent 4cc4bfa commit 09ce4bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 7 additions & 0 deletions src/transform/CollapseTable.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ div.pagelib_collapse_table_container {
clear: both;
}

.pagelib_collapse_table {
float: none !important;
max-width: none !important;
margin-top: 0px !important;
margin-bottom: 0px !important;
}

.pagelib_theme_dark .content div.pagelib_collapse_table_container {
box-shadow: none !important;
background-color: #222 !important;
Expand Down
11 changes: 3 additions & 8 deletions src/transform/CollapseTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const CLASS = {
COLLAPSE_TEXT: 'pagelib_collapse_table_collapse_text',
EXPANDED: 'pagelib_collapse_table_expanded',
TABLE_INFOBOX: 'pagelib_table_infobox',
TABLE_OTHER: 'pagelib_table_other'
TABLE_OTHER: 'pagelib_table_other',
TABLE: 'pagelib_collapse_table'
}

/**
Expand Down Expand Up @@ -389,14 +390,8 @@ const prepareTable = (table, document, pageTitle, tableTitle,
containerDiv.className = CLASS.CONTAINER
replaceNodeInSection(table, containerDiv)

// remove top and bottom margin from the table, so that it's flush with
// our expand/collapse buttons
table.style.marginTop = '0px'
table.style.marginBottom = '0px'

// ensure the table doesn't float
table.style.float = 'none !important'
table.style['max-width'] = 'none !important'
table.classList.add(CLASS.TABLE)

const collapsedHeaderDiv = newCollapsedHeaderDiv(document, captionFragment)
collapsedHeaderDiv.style.display = 'block'
Expand Down

0 comments on commit 09ce4bb

Please sign in to comment.