DEV: updates to onebox 2.2.14 (#12713)
This commit also updates github’s body onebox styles in Discourse core: - full width - prevents show-more btn to trigger vertical scrolling - makes text standout less and slightly bigger
This commit is contained in:
parent
56331275dc
commit
81498bd131
|
@ -268,7 +268,7 @@ GEM
|
||||||
omniauth-twitter (1.4.0)
|
omniauth-twitter (1.4.0)
|
||||||
omniauth-oauth (~> 1.1)
|
omniauth-oauth (~> 1.1)
|
||||||
rack
|
rack
|
||||||
onebox (2.2.13)
|
onebox (2.2.14)
|
||||||
addressable (~> 2.7.0)
|
addressable (~> 2.7.0)
|
||||||
htmlentities (~> 4.3)
|
htmlentities (~> 4.3)
|
||||||
multi_json (~> 1.11)
|
multi_json (~> 1.11)
|
||||||
|
|
|
@ -4,7 +4,7 @@ let _showMoreClickPostsElements = [];
|
||||||
|
|
||||||
function decorateGithubOneboxBody(element) {
|
function decorateGithubOneboxBody(element) {
|
||||||
const containers = element.querySelectorAll(
|
const containers = element.querySelectorAll(
|
||||||
".onebox.githubpullrequest .show-more-container, .onebox.githubissue .show-more-container"
|
".onebox.githubcommit .show-more-container, .onebox.githubpullrequest .show-more-container, .onebox.githubissue .show-more-container"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (containers.length) {
|
if (containers.length) {
|
||||||
|
|
|
@ -161,26 +161,21 @@ aside.onebox {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.github-info + .github-body-container {
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.github-body-container {
|
.github-body-container {
|
||||||
margin: 0 0 0.5em 0;
|
margin: 1em 0 0 0;
|
||||||
padding: 0.5em;
|
|
||||||
color: var(--primary-very-high);
|
color: var(--primary-very-high);
|
||||||
background: var(--hljs-bg);
|
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono",
|
font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono",
|
||||||
"DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
"DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace;
|
||||||
font-size: $font-down-1;
|
flex: 1 0 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
.show-more {
|
.show-more {
|
||||||
// padding on right for larger hitzone
|
// padding on right for larger hitzone
|
||||||
padding: 0.5em 1.5em 0.5em 0.25em;
|
padding: 0.5em 1.5em 0em 0.25em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue