diff options
author | Christoph (Sheogorath) Kern | 2018-02-26 19:41:53 +0100 |
---|---|---|
committer | GitHub | 2018-02-26 19:41:53 +0100 |
commit | b0ce3d0230a104fe6e4e136f8ecb57a87c6d264b (patch) | |
tree | 625479956368806296202624c3a7610b3e80745b | |
parent | 912cce2b40689310333d6388fd82ff354051a7ac (diff) | |
parent | ea118c2ec8089fdde95cdbc71d19d05d72d7e673 (diff) |
Merge pull request #744 from hackmdio/add-more-html5-tags
Support more html5 tags and styles
-rw-r--r-- | public/css/markdown.css | 16 | ||||
-rw-r--r-- | public/js/render.js | 6 |
2 files changed, 17 insertions, 5 deletions
diff --git a/public/css/markdown.css b/public/css/markdown.css index 36e45781..eaa9ab5c 100644 --- a/public/css/markdown.css +++ b/public/css/markdown.css @@ -190,10 +190,22 @@ } /* Make details boxes look like on GitHub */ +.markdown-body summary { + display: list-item; +} + +.markdown-body summary:focus { + outline: none; +} + .markdown-body details summary { cursor: pointer; } -.markdown-body summary { - display: list-item; +.markdown-body details:not([open]) > *:not(summary) { + display: none; +} + +.markdown-body figure { + margin: 1em 40px; } diff --git a/public/js/render.js b/public/js/render.js index 860f8272..23b8934e 100644 --- a/public/js/render.js +++ b/public/js/render.js @@ -19,12 +19,12 @@ whiteList['style'] = [] whiteList['kbd'] = [] // allow ifram tag with some safe attributes whiteList['iframe'] = ['allowfullscreen', 'name', 'referrerpolicy', 'sandbox', 'src', 'width', 'height'] -// allow details tag -whiteList['details'] = [] -// allow summary tag for details +// allow summary tag whiteList['summary'] = [] // allow ruby tag whiteList['ruby'] = [] +// allow rp tag for ruby +whiteList['rp'] = [] // allow rt tag for ruby whiteList['rt'] = [] // allow figure tag |