Skip to content

Commit

Permalink
fix fallback CSS version (#2216)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank99 authored Sep 3, 2024
1 parent 608887d commit 1a93a39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/spotty-comics-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@itwin/itwinui-react': patch
---

Fixed the fallback CSS logic in `ThemeProvider` to load the correct stylesheet version.
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ const FallbackStyles = ({ root }: { root: HTMLElement }) => {
} catch (error) {
console.log('Error loading styles.css locally', error);
const css = await importCss(
'https://cdn.jsdelivr.net/npm/@itwin/itwinui-react@3/styles.css',
`https://cdn.jsdelivr.net/npm/@itwin/itwinui-react@${meta.version}/styles.css`,
);
document.adoptedStyleSheets = [
...document.adoptedStyleSheets,
Expand Down

0 comments on commit 1a93a39

Please sign in to comment.