Skip to content

Commit

Permalink
Fix BS5 typography issues (#1698)
Browse files Browse the repository at this point in the history
Added the Open Sans typeface as set it as the default sans-serif
typeface for the BS5 theme.
Also added the following style changes:
- Left border and padding for blockquote tags.
- Background color for code and pre tags.
- Padding for code and pre tags.
- Whitespace wrapping for code tags.
- Set the default font-weight for bold text to 700
  • Loading branch information
anvit committed Nov 8, 2023
1 parent 075d9ff commit 9f59fca
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 3 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"dependencies": {
"@accessible360/accessible-slick": "^1.0.1",
"@fontsource/open-sans": "^5.0.17",
"@fortawesome/fontawesome-free": "^6.4.0",
"@uppy/core": "^2.0.3",
"@uppy/dashboard": "^2.0.3",
Expand Down
27 changes: 27 additions & 0 deletions plugins/arDominionB5Plugin/scss/_typography.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@import "@fontsource/open-sans/scss/mixins";

// Add font-face declarations for all Open Sans weights and styles
@include faces($subsets: all, $weights: all, $styles: all);

:root {
--bs-font-sans-serif: "Open Sans", sans-serif;
}

blockquote {
border-left: 5px solid $gray-400;
padding-left: $spacer;
}

code {
background-color: $gray-200;
white-space: pre-wrap;
padding: $spacer * 0.25;
}

pre {
background-color: $gray-200;
padding: $spacer * 0.5;
code {
padding: 0;
}
}
6 changes: 3 additions & 3 deletions plugins/arDominionB5Plugin/scss/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ $spacer: 1rem !default;
$dropdown-min-width: $spacer * 15 !default;
$tooltip-bg: $gray-900 !default;
$tooltip-opacity: 1 !default;
$font-weight-bold: 500 !default;
$font-weight-bolder: 500 !default;
$table-th-font-weight: 500 !default;
$font-weight-bold: 700 !default;
$font-weight-bolder: 700 !default;
$table-th-font-weight: 700 !default;
$headings-font-weight: 400 !default;
$headings-margin-bottom: $spacer !default;
$h1-font-size: $spacer * 2 !default;
Expand Down
1 change: 1 addition & 0 deletions plugins/arDominionB5Plugin/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
@import "../../../plugins/sfTranslatePlugin/css/l10n_client";

// Custom
@import "typography";
@import "layout";
@import "buttonsandlinks";
@import "forms";
Expand Down

0 comments on commit 9f59fca

Please sign in to comment.