From 15e4592ae9ab62a1c13a95b42100d37b23f9e4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 26 Dec 2023 11:29:58 +0100 Subject: [PATCH] Fix styles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- assets/scss/_styles_project.scss | 34 +++++++++++++++++++---------- assets/scss/_variables_project.scss | 5 ++--- layouts/partials/breadcrumb.html | 4 ++-- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss index c147b645..b275db4f 100644 --- a/assets/scss/_styles_project.scss +++ b/assets/scss/_styles_project.scss @@ -18,9 +18,6 @@ limitations under the License. Custom SCSS for the Matrix spec */ -@import "variables_project"; -@import "variables"; - /* Import the CSS classes for the syntax highlighter. * * This is generated with: @@ -49,6 +46,10 @@ Custom SCSS for the Matrix spec } + .nav-link { + font-weight: normal; + } + a { color: $black; } @@ -292,7 +293,7 @@ footer { } /* Styles for sections that are rendered from data, such as HTTP APIs and event schemas */ -.rendered-data { +.td-content .rendered-data { background-color: $secondary-lightest-background; padding: 0.85rem; margin: 0.85rem 0; @@ -346,7 +347,7 @@ footer { } p code, table code { - background-color: inherit; + background-color: transparent; } table { @@ -396,6 +397,7 @@ footer { th, td, caption { padding: 1rem; + border-top: 1px $table-border-color solid; } &.object-table, &.response-table, &.content-type-table { @@ -408,14 +410,12 @@ footer { // ... but avoid double border between caption and table border-bottom: 0; + + background-color: $secondary-lighter-background; } - caption, tbody tr { - background-color: $table-row-default; - } - - tbody tr:nth-child(even) { - background-color: $table-row-alternate; + tbody tr { + --bs-table-striped-bg: #{$secondary-lighter-background}; } } @@ -517,3 +517,15 @@ dd { border-radius: 0.25rem; // was $border-radius, but that var isn't accessible here. } } + +/* Style for breadcrumbs */ +.td-breadcrumbs { + padding: .75rem 1rem; + background-color: #eee; + border-radius: .25rem; + margin-bottom: 1rem; + + .breadcrumb { + margin: 0; + } +} \ No newline at end of file diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss index 8ff5fe98..6eec3e7c 100644 --- a/assets/scss/_variables_project.scss +++ b/assets/scss/_variables_project.scss @@ -20,7 +20,7 @@ $dark: #333; $gray-100: #FBFBFB; $secondary-background: #E5F5FB; -$secondary-lighter-background: #F4FaFC; +$secondary-lighter-background: #F4FAFC; $secondary-lightest-background: #FBFDFD; @@ -33,8 +33,7 @@ $warning-background: #FFE0E0; // colours for definition tables. // the border colour matches that used for "highlight" divs $table-border-color: rgba(black, .125); -$table-row-alternate: $secondary-lightest-background; -$table-row-default: $secondary-lighter-background; +$table-bg: $secondary-lightest-background; /* Configure docsy to use the default system fonts instead of Google Fonts. * See https://www.docsy.dev/docs/adding-content/lookandfeel/#fonts */ diff --git a/layouts/partials/breadcrumb.html b/layouts/partials/breadcrumb.html index 8e1fb9b2..af3a9551 100644 --- a/layouts/partials/breadcrumb.html +++ b/layouts/partials/breadcrumb.html @@ -8,8 +8,8 @@ */}} {{ if not .IsHome }} -