From af8d73f0576bf884894b1bd3e4f336c5927b5d13 Mon Sep 17 00:00:00 2001 From: igoradamenko Date: Sun, 13 May 2018 21:37:53 +0300 Subject: [PATCH] add styles for markdown table & pre>code --- .../components/raw-content/raw-content.scss | 53 +++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/web/app/components/raw-content/raw-content.scss b/web/app/components/raw-content/raw-content.scss index d787be95..1d471c33 100644 --- a/web/app/components/raw-content/raw-content.scss +++ b/web/app/components/raw-content/raw-content.scss @@ -47,17 +47,50 @@ } } - th { - text-align: left; + table { + display: block; + overflow: auto; + border-spacing: 0; + border-collapse: collapse; + + th { + text-align: left; + font-weight: 600; + } + + th, td { + padding: 6px 13px; + border: 1px solid #dfe2e5; + } + + tr { + background-color: #fff; + border-top: 1px solid #b7dddd; + + &:nth-child(2n) { + background-color: #f6f8fa; + } + } } code { - font-size: .85em; + padding: 0.2em 0.4em; + margin: 0; + font-size: 85%; + background-color: rgba(#1b1f23, .05); + border-radius: 3px; } pre { + padding: 16px; overflow-x: auto; + overflow-y: hidden; tab-size: 2; + word-wrap: normal; + font-size: 85%; + line-height: 1.45; + background-color: #f6f8fa; + border-radius: 3px; &:first-child { margin-top: 0; @@ -66,6 +99,20 @@ &:last-child { margin-bottom: 0; } + + > code { + display: inline; + padding: 0; + margin: 0; + overflow: visible; + word-break: normal; + white-space: pre; + word-wrap: normal; + font-size: 100%; + line-height: inherit; + background: transparent; + border-radius: 0; + } } sup, sub {