Skip to content

Commit

Permalink
Merge pull request #869 from trimble-oss/dev/coliff/windows-high-cont…
Browse files Browse the repository at this point in the history
…rast-fixes

Improvements for High Contrast Themes (Windows)
  • Loading branch information
coliff committed Jun 20, 2024
2 parents 02f5e58 + 2f6336e commit 53bdd09
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .hintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
{
"frame-title": "off"
}
]
],
"compat-api/css": "off"
}
}
3 changes: 2 additions & 1 deletion .ncurc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"upgrade": true
"upgrade": true,
"reject": "textlint-rule-terminology"
}
9 changes: 5 additions & 4 deletions assets/styles/_color-preview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@

.color-preview .color {
border-radius: 19px;
padding-left: 0;
border: 1px solid #6a6e79;
display: inline-block;
width: 20px;
forced-color-adjust: none;
height: 20px;
margin-top: -2px;
margin-left: -1px;
border: 1px solid #6a6e79;
margin-top: -2px;
padding-left: 0;
vertical-align: text-top;
width: 20px;
}

.color-preview .text-monospace {
Expand Down
35 changes: 35 additions & 0 deletions assets/styles/_mq-forced-colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Windows 'High Contrast' accessibility mode

/* stylelint-disable-next-line */
@media (forced-colors: active) {
.card-img-top {
forced-color-adjust: none;
}

#TableOfContents a {
border-left: 0 !important;
}

nav.navbar.sticky-top {
border-bottom: 1px solid transparent;
}

.col-sidebar {
border-right: 1px solid transparent;
}

.btn.btn-icon-only {
outline: 1px transparent solid;
}
}

@media (forced-colors: active) and (prefers-color-scheme: light) {
.popover-arrow {
forced-color-adjust: none;
}

[data-bs-theme="dark"] .btn-close {
forced-color-adjust: none;
filter: none;
}
}
2 changes: 0 additions & 2 deletions assets/styles/_theme-light.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
[data-bs-theme="light"] {
color-scheme: light;

article a.btn-primary::after {
filter: invert(1);
}
Expand Down
1 change: 1 addition & 0 deletions assets/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@import "list-js";
@import "sidebar";
@import "menu-right"; // 'On this page' menu
@import "mq-forced-colors";
@import "mobile"; // optimizations for xxs mobile screens
@import "navbar";
@import "navbar-search";
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"devDependencies": {
"@fullhuman/postcss-purgecss": "6.0.0",
"@trimble-oss/modus-bootstrap": "2.0.0-alpha30",
"@trimble-oss/modus-bootstrap": "2.0.0-alpha31",
"@trimble-oss/modus-icons": "1.14.0",
"autoprefixer": "10.4.19",
"bootstrap-print-css": "1.0.1",
Expand Down

0 comments on commit 53bdd09

Please sign in to comment.