From d5c45a87711de42fc5b7762c73cf7740b0b80d18 Mon Sep 17 00:00:00 2001 From: dragonwocky Date: Sun, 17 Oct 2021 23:11:58 +1100 Subject: [PATCH] restore theme patches to perma-applied --- repo/theming/mod.json | 2 +- repo/theming/patches.css | 56 ++++++++++++++++++++++++++++++++++++++++ repo/theming/theme.css | 50 +---------------------------------- 3 files changed, 58 insertions(+), 50 deletions(-) create mode 100644 repo/theming/patches.css diff --git a/repo/theming/mod.json b/repo/theming/mod.json index 91759d6..821a473 100644 --- a/repo/theming/mod.json +++ b/repo/theming/mod.json @@ -14,7 +14,7 @@ ], "css": { "frame": ["variables.css"], - "client": ["variables.css", "prism.css"], + "client": ["variables.css", "prism.css", "patches.css"], "menu": ["variables.css", "prism.css"] }, "js": { diff --git a/repo/theming/patches.css b/repo/theming/patches.css new file mode 100644 index 0000000..ceab96d --- /dev/null +++ b/repo/theming/patches.css @@ -0,0 +1,56 @@ +/* + * notion-enhancer core: theming + * (c) 2021 dragonwocky (https://dragonwocky.me/) + * (https://notion-enhancer.github.io/) under the MIT license + */ + +/* typography */ + +[style*='Segoe UI'] { + font-family: var(--theme--font_sans) !important; +} +[style*='Georgia'] { + font-family: var(--theme--font_serif) !important; +} +[style*='iawriter-mono'] { + font-family: var(--theme--font_mono) !important; +} +[style*='SFMono-Regular'] { + font-family: var(--theme--font_code) !important; +} + +/** remove white pixels in iframe corners **/ + +.notion-page-content iframe { + border-radius: 0px !important; +} + +/** consistent corner button styling **/ + +.notion-overlay-container + [style*='border-radius: 3px;'][style*='position: relative; max-width: calc(100vw - 24px); box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px; overflow: hidden;'][style*='padding: 4px 8px; font-size: 12px; line-height: 1.4; font-weight: 500;'] { + background: var(--theme--ui_tooltip) !important; + box-shadow: var(--theme--ui_shadow) 0px 1px 4px !important; + color: var(--theme--ui_tooltip-title) !important; +} +.notion-overlay-container + [style*='border-radius: 3px;'][style*='position: relative; max-width: calc(100vw - 24px); box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px; overflow: hidden;'][style*='padding: 4px 8px; font-size: 12px; line-height: 1.4; font-weight: 500;'] + [style*='color: '] { + color: var(--theme--ui_tooltip-description) !important; +} +.onboarding-checklist-button > .graduationCap + .notion-focusable { + background: var(--theme--ui_tooltip) !important; +} +.onboarding-checklist-button .closeSmall { + fill: var(--theme--ui_tooltip-title) !important; +} +.graduationCap { + fill: var(--theme--icon) !important; +} +.notion-help-button, +.onboarding-checklist-button { + color: var(--theme--icon) !important; + background: var(--theme--tag_default) !important; + box-shadow: var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 0px 0px 1px, + var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 2px 4px !important; +} diff --git a/repo/theming/theme.css b/repo/theming/theme.css index 22337bd..8c03308 100644 --- a/repo/theming/theme.css +++ b/repo/theming/theme.css @@ -344,21 +344,6 @@ body, background: var(--theme--scrollbar_thumb-hover) !important; } -/** typography **/ - -[style*='Segoe UI'] { - font-family: var(--theme--font_sans) !important; -} -[style*='Georgia'] { - font-family: var(--theme--font_serif) !important; -} -[style*='iawriter-mono'] { - font-family: var(--theme--font_mono) !important; -} -[style*='SFMono-Regular'] { - font-family: var(--theme--font_code) !important; -} - /** ui **/ .notion-page-mention-token.notion-enable-hover:hover { @@ -468,32 +453,6 @@ body, background: var(--theme--ui_input) !important; } -.notion-overlay-container - [style*='border-radius: 3px;'][style*='position: relative; max-width: calc(100vw - 24px); box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px; overflow: hidden;'][style*='padding: 4px 8px; font-size: 12px; line-height: 1.4; font-weight: 500;'] { - background: var(--theme--ui_tooltip) !important; - box-shadow: var(--theme--ui_shadow) 0px 1px 4px !important; - color: var(--theme--ui_tooltip-title) !important; -} -.notion-overlay-container - [style*='border-radius: 3px;'][style*='position: relative; max-width: calc(100vw - 24px); box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 4px; overflow: hidden;'][style*='padding: 4px 8px; font-size: 12px; line-height: 1.4; font-weight: 500;'] - [style*='color: '] { - color: var(--theme--ui_tooltip-description) !important; -} -.onboarding-checklist-button > .graduationCap + .notion-focusable { - background: var(--theme--ui_tooltip) !important; -} -.onboarding-checklist-button .closeSmall { - fill: var(--theme--ui_tooltip-title) !important; -} - -.notion-help-button, -.onboarding-checklist-button { - color: var(--theme--icon) !important; - background: var(--theme--tag_default) !important; - box-shadow: var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 0px 0px 1px, - var(--theme--ui_shadow, rgba(15, 15, 15, 0.15)) 0px 2px 4px !important; -} - .notion-body.dark [style*='border-radius: 20px; box-shadow: rgba(255, 255, 255, 0.07) 0px 0px 0px 2px inset;'], .notion-body:not(.dark) @@ -808,8 +767,7 @@ body, } .notion-body.dark [style*='fill: rgb(202, 204, 206)'], -.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.8)'], -.graduationCap { +.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.8)'] { fill: var(--theme--icon) !important; } .notion-body.dark [style*='fill: rgba(202, 204, 206, 0.'], @@ -907,9 +865,3 @@ body, .notion-code-block > div { color: var(--theme--code_plain) !important; } - -/** remove white pixels in iframe corners **/ - -.notion-page-content iframe { - border-radius: 0px !important; -}