Merge pull request #17124 from backstage/techdocs-a11y-link-color-fix

[Techdocs] A11y: Change anchor links color in Techdocs content
This commit is contained in:
Raghunandan Balachandran
2023-03-27 19:55:29 +02:00
committed by GitHub
2 changed files with 9 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/plugin-techdocs': patch
---
Change anchor links color in Techdocs content
With the color (mkdocs supplied) used for anchor links the background and foreground colors do not have a sufficient contrast ratio. Using the link color from theme palette.
@@ -14,8 +14,8 @@
* limitations under the License.
*/
import { RuleOptions } from './types';
import { alpha, lighten } from '@material-ui/core';
import { RuleOptions } from './types';
export default ({ theme }: RuleOptions) => `
/*================== Variables ==================*/
@@ -133,7 +133,7 @@ export default ({ theme }: RuleOptions) => `
/* TYPESET */
--md-typeset-font-size: 1rem;
--md-typeset-color: var(--md-default-fg-color);
--md-typeset-a-color: var(--md-accent-fg-color);
--md-typeset-a-color: ${theme.palette.link};
--md-typeset-table-color: ${theme.palette.text.primary};
--md-typeset-del-color: ${
theme.palette.type === 'dark'