From 4260b31ec059ffa2207f8f2541af1c3996b00cf9 Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Sat, 9 Oct 2021 19:35:27 +0800 Subject: [PATCH] Update mdbook style and fix unreadable table head (#806) The styles are now pulled from upstream styles, some of the changes I submitted it back to upstream. Fix #796 --- book/theme/css/chrome.css | 2 +- book/theme/css/general.css | 5 ++++- book/theme/css/variables.css | 14 ++++---------- helix-core/src/selection.rs | 8 ++++---- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/book/theme/css/chrome.css b/book/theme/css/chrome.css index 72b7f1880..aba8a417b 100644 --- a/book/theme/css/chrome.css +++ b/book/theme/css/chrome.css @@ -196,7 +196,7 @@ a > .hljs { border-radius: 3px; } -:not(pre):not(a) > .hljs { +:not(pre):not(a):not(td):not(p) > .hljs { color: var(--inline-code-color); overflow-x: initial; } diff --git a/book/theme/css/general.css b/book/theme/css/general.css index ddc2387a0..9b280d08a 100644 --- a/book/theme/css/general.css +++ b/book/theme/css/general.css @@ -162,7 +162,6 @@ table thead td { table thead th { padding: .75rem; text-align: left; - color: var(--table-border-color); font-weight: 500; line-height: 1.5; width: auto; @@ -228,3 +227,7 @@ blockquote *:last-child { margin: 5px 0px; font-weight: bold; } + +.result-no-output { + font-style: italic; +} diff --git a/book/theme/css/variables.css b/book/theme/css/variables.css index db1a11b85..b62c75581 100644 --- a/book/theme/css/variables.css +++ b/book/theme/css/variables.css @@ -13,7 +13,6 @@ .ayu { --bg: hsl(210, 25%, 8%); --fg: #c5c5c5; - --heading-fg: #c5c5c5; --sidebar-bg: #14191f; --sidebar-fg: #c8c9db; @@ -54,7 +53,6 @@ .coal { --bg: hsl(200, 7%, 8%); --fg: #98a3ad; - --heading-fg: #98a3ad; --sidebar-bg: #292c2f; --sidebar-fg: #a1adb8; @@ -95,7 +93,6 @@ .light { --bg: hsl(0, 0%, 100%); --fg: hsl(0, 0%, 0%); - --heading-fg: hsl(0, 0%, 0%); --sidebar-bg: #fafafa; --sidebar-fg: hsl(0, 0%, 0%); @@ -110,7 +107,7 @@ --links: #20609f; - --inline-code-color: #a39e9b; + --inline-code-color: #301900; --theme-popup-bg: #fafafa; --theme-popup-border: #cccccc; @@ -136,7 +133,6 @@ .navy { --bg: hsl(226, 23%, 11%); --fg: #bcbdd0; - --heading-fg: #bcbdd0; --sidebar-bg: #282d3f; --sidebar-fg: #c8c9db; @@ -177,7 +173,6 @@ .rust { --bg: hsl(60, 9%, 87%); --fg: #262625; - --heading-fg: #262625; --sidebar-bg: #3b2e2a; --sidebar-fg: #c8c9db; @@ -192,7 +187,7 @@ --links: #2b79a2; - --inline-code-color: #c5c8c6; + --inline-code-color: #6e6b5e; --theme-popup-bg: #e1e1db; --theme-popup-border: #b38f6b; @@ -218,8 +213,7 @@ @media (prefers-color-scheme: dark) { .light.no-js { --bg: hsl(200, 7%, 8%); - --fg: #ebeafa; - --heading-fg: #ebeafa; + --fg: #98a3ad; --sidebar-bg: #292c2f; --sidebar-fg: #a1adb8; @@ -234,7 +228,7 @@ --links: #2b79a2; - --inline-code-color: #6e6b5e; + --inline-code-color: #c5c8c6; --theme-popup-bg: #141617; --theme-popup-border: #43484d; diff --git a/helix-core/src/selection.rs b/helix-core/src/selection.rs index 755ee679a..18af4d089 100644 --- a/helix-core/src/selection.rs +++ b/helix-core/src/selection.rs @@ -29,10 +29,10 @@ use std::borrow::Cow; /// "(anchor, head)", followed by example text with "[" and "]" /// inserted to represent the anchor and head positions: /// -/// - (0, 3): [Som]e text. -/// - (3, 0): ]Som[e text. -/// - (2, 7): So[me te]xt. -/// - (1, 1): S[]ome text. +/// - (0, 3): `[Som]e text`. +/// - (3, 0): `]Som[e text`. +/// - (2, 7): `So[me te]xt`. +/// - (1, 1): `S[]ome text`. /// /// Ranges are considered to be inclusive on the left and /// exclusive on the right, regardless of anchor-head ordering.