Skip to content

Commit

Permalink
fix: Add fallback colors to html-block styles
Browse files Browse the repository at this point in the history
  • Loading branch information
grant-cleary authored Oct 13, 2021
2 parents e0b2ee7 + 10ea508 commit 7a2555f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
3 changes: 0 additions & 3 deletions components/colors/colors.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '@webcomponents/shadycss/entrypoints/custom-style-interface.js';

if (!document.head.querySelector('#d2l-colors')) {
const style = document.createElement('style');
style.id = 'd2l-colors';
Expand Down Expand Up @@ -94,5 +92,4 @@ if (!document.head.querySelector('#d2l-colors')) {
}
`;
document.head.appendChild(style);
window.ShadyCSS.CustomStyleInterface.addCustomStyle(style);
}
6 changes: 3 additions & 3 deletions components/html-block/html-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ export const htmlBlockContentStyles = css`
a:visited,
a:link,
a:active {
color: var(--d2l-color-celestine);
color: var(--d2l-color-celestine, #006fbf);
cursor: pointer;
text-decoration: none;
}
a:hover,
a:focus {
color: var(--d2l-color-celestine-minus-1);
color: var(--d2l-color-celestine-minus-1, #004489);
outline-width: 0;
text-decoration: underline;
}
Expand All @@ -85,7 +85,7 @@ export const htmlBlockContentStyles = css`
a:visited,
a:link,
a:active {
color: var(--d2l-color-ferrite);
color: var(--d2l-color-ferrite, #494c4e);
}
}
mjx-assistive-mml math {
Expand Down
2 changes: 0 additions & 2 deletions components/typography/typography.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import '@webcomponents/shadycss/entrypoints/custom-style-interface.js';
import '../colors/colors.js';

export const importUrl = 'https://s.brightspace.com/lib/fonts/0.5.0/assets/';
Expand Down Expand Up @@ -144,5 +143,4 @@ if (!document.head.querySelector('#d2l-typography-font-face')) {
}
`;
document.head.appendChild(style);
window.ShadyCSS.CustomStyleInterface.addCustomStyle(style);
}
5 changes: 0 additions & 5 deletions package-lock.json

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

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@brightspace-ui/intl": "^3",
"@formatjs/intl-pluralrules": "^1",
"@open-wc/dedupe-mixin": "^1",
"@webcomponents/shadycss": "^1",
"focus-visible": "^5",
"ifrau": "^0.39",
"intl-messageformat": "^7",
Expand Down

0 comments on commit 7a2555f

Please sign in to comment.