From a119683c311197ee564fc1f5e52e029ee54d3b76 Mon Sep 17 00:00:00 2001 From: Murilo Brito <91566541+moliloo@users.noreply.github.com> Date: Wed, 30 Jul 2025 23:50:46 -0300 Subject: [PATCH] [Bugfix] Fix style rules to enrich editor (#488) * fix style rules to enrich editor * fix li font style --- styles/less/global/index.less | 1 + styles/less/global/prose-mirror.less | 69 ++++++++++++++++++++++--- styles/less/global/tab-description.less | 13 +++++ 3 files changed, 77 insertions(+), 6 deletions(-) create mode 100644 styles/less/global/tab-description.less diff --git a/styles/less/global/index.less b/styles/less/global/index.less index c37de0c7..031a9cfc 100644 --- a/styles/less/global/index.less +++ b/styles/less/global/index.less @@ -4,6 +4,7 @@ @import './tab-navigation.less'; @import './tab-form-footer.less'; @import './tab-actions.less'; +@import './tab-description.less'; @import './tab-features.less'; @import './tab-effects.less'; @import './tab-settings.less'; diff --git a/styles/less/global/prose-mirror.less b/styles/less/global/prose-mirror.less index 33e942e8..f7b78af3 100644 --- a/styles/less/global/prose-mirror.less +++ b/styles/less/global/prose-mirror.less @@ -1,6 +1,7 @@ @import '../utils/colors.less'; +@import '../utils/fonts.less'; -.application { +.application.daggerheart { prose-mirror { height: 100% !important; @@ -11,14 +12,70 @@ scrollbar-width: thin; scrollbar-color: light-dark(@dark-blue, @golden) transparent; h1 { - font-size: 36px; - } - h2 { font-size: 32px; } + h2 { + font-size: 28px; + font-weight: 600; + } h3 { - font-size: 24px; + font-size: 20px; + font-weight: 600; + } + h4 { + font-size: 16px; + color: @beige; + font-weight: 600; + } + + table { + font-family: @font-body; + border-radius: 3px; + + thead { + background-color: light-dark(@dark-blue, @golden); + color: light-dark(@beige, @dark-blue); + } + + tr:nth-child(odd) { + background-color: light-dark(@dark-blue-40, @golden-40); + border-color: light-dark(@golden, @dark-blue); + } + tr:nth-child(even) { + background-color: light-dark(@dark-blue-10, @golden-10); + border-color: light-dark(@golden, @dark-blue); + } + } + + ul, + ol { + margin: 1rem 0; + padding: 0 0 0 1.25rem; + + li { + font-family: @font-body; + margin-bottom: 0.25rem; + } + } + + ul { + list-style: disc; + } + + pre { + code { + border-radius: 6px; + background-color: @dark; + color: @beige; + border-color: @dark-blue; + } + } + + blockquote { + border-radius: 3px; + border-left: 3px solid light-dark(@dark-blue-40, @golden-40); + background-color: light-dark(@dark-blue-10, @golden-10); } } } -} \ No newline at end of file +} diff --git a/styles/less/global/tab-description.less b/styles/less/global/tab-description.less new file mode 100644 index 00000000..4d81f2f2 --- /dev/null +++ b/styles/less/global/tab-description.less @@ -0,0 +1,13 @@ +@import '../utils/colors.less'; +@import '../utils/fonts.less'; + +.daggerheart.dh-style { + .tab.active.description { + overflow-y: hidden !important; + height: -webkit-fill-available !important; + + fieldset { + height: -webkit-fill-available; + } + } +}