Skip to content

Commit 46247ec

Browse files
committed
More accessibility fixes, align with vs code on code block theming
1 parent 3c35f11 commit 46247ec

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

sites/website/docusaurus.config.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import {themes as prismThemes} from 'prism-react-renderer';
2+
13
module.exports = {
24
title: "FAST",
35
tagline: "The adaptive interface system for modern web experiences",
@@ -13,17 +15,20 @@ module.exports = {
1315
mermaid: true,
1416
},
1517
themes: [
16-
require.resolve("@docusaurus/theme-live-codeblock"),
18+
"@docusaurus/theme-live-codeblock",
1719
"@docusaurus/theme-mermaid",
1820
],
1921
staticDirectories: ["static"],
2022
themeConfig: {
23+
prism: {
24+
theme: prismThemes.vsDark,
25+
},
2126
announcementBar: {
2227
id: 'version',
2328
content:
2429
'<code>@microsoft/fast-element</code> v2 is out! 🎉️',
25-
backgroundColor: 'var(--ifm-color-primary-darkest)',
26-
textColor: 'var(--fill-color)',
30+
backgroundColor: 'var(--ifm-color-success-darkest)',
31+
textColor: 'var(--ifm-color-white)',
2732
},
2833
colorMode: {
2934
defaultMode: "dark",
@@ -147,14 +152,7 @@ module.exports = {
147152
sidebarPath: "./sidebars.js",
148153
// Refer to https://github.com/microsoft/fast/issues/5865 effects of using true
149154
showLastUpdateTime: false,
150-
// remarkPlugins: [require("mdx-mermaid")],
151-
// The "includeCurrentVersion" plugin includes the ./docs folder of the docs - setting to false as current docs are in progress
152-
// TODO: remove when ready to display both the current and legacy versions (line 155)
153-
includeCurrentVersion: false,
154-
// The "lastVersion" plugin sets which version the /docs route refers to
155-
// TODO: update lastVersion to "current" when ready for /docs route to be set to the current version (line 158)
156155
lastVersion: "current",
157-
// TODO: Uncomment to begin displaying the doc versions labels (lines 160-167)
158156
versions: {
159157
current: {
160158
label: "2.x",

sites/website/src/css/custom.css

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ html[data-theme='dark'] .DocSearch-Hit[aria-selected="true"] a mark {
7070
color: var(--ifm-color-primary) !important;
7171
}
7272

73-
.docusaurus-highlight-code-line {
74-
background-color: #212121;
75-
display: block;
76-
margin: 0 calc(-1 * var(--ifm-pre-padding));
77-
padding: 0 var(--ifm-pre-padding);
78-
}
79-
8073
.example-dialog::part(control) {
8174
--dialog-width: 400px;
8275
--dialog-height: auto;
@@ -307,6 +300,11 @@ li {
307300
margin: 8px 20px;
308301
}
309302

303+
[role="banner"] code {
304+
background-color: rgba(0, 0, 0, 0.1);
305+
border: 0.1rem solid rgba(255, 255, 255, 0.1)
306+
}
307+
310308
@media screen and (min-width: 900px) {
311309
.frontpage {
312310
--type-ramp-base-font-size: 14px;

0 commit comments

Comments
 (0)