diff --git a/packages/common/styles.js b/packages/common/styles.js index a7404faf31f6966357a3deff880cc31dcf5de537..c07198054fa15833ca4d3ef1a39136b421199449 100644 --- a/packages/common/styles.js +++ b/packages/common/styles.js @@ -55,15 +55,6 @@ export function getGeneralCSS(doMarginPaddingReset = true) { margin-bottom: 0.75rem; } - code { - background-color: var(--dbp-light); - color: var(--dbp-danger-bg-color); - font-size: 1em; - line-height: 1.5em; - font-weight: normal; - padding: 0.25em 0.5em 0.25em; - } - .field:not(:last-child) { margin-bottom: 0.75rem; } diff --git a/toolkit-showcase/src/styles.js b/toolkit-showcase/src/styles.js index 468ab88d4cb262a6fc365794649ba40fe098ff6c..540afddebe9e9377fef17a29e4fe61a2d19873d1 100644 --- a/toolkit-showcase/src/styles.js +++ b/toolkit-showcase/src/styles.js @@ -1,4 +1,6 @@ -import {css, CSSResult} from 'lit-element'; +import {css, CSSResult, unsafeCSS} from 'lit-element'; +import * as commonUtils from '@dbp-toolkit/common/utils'; +import highlightCSSPath from 'highlight.js/styles/github.css'; /** * We want to have "neutral" colors here @@ -8,6 +10,8 @@ import {css, CSSResult} from 'lit-element'; export function getDemoCSS() { // language=css return css` + @import url("${unsafeCSS(commonUtils.getAssetURL(highlightCSSPath))}"); + h1.title {margin-bottom: 1em;} div.container {margin-bottom: 1.5em;} h1, h2, h3, h4 { @@ -71,5 +75,19 @@ export function getDemoCSS() { -webkit-filter: invert(0%); } } + + pre { + background-color: var(--dbp-light); + padding: 0.4em; + overflow-x: auto; + border: 1px solid #ddd; + } + + code { + background-color: var(--dbp-light); + line-height: 1.5em; + font-weight: normal; + padding: 0.25em 0.5em 0.25em; + } `; } \ No newline at end of file