Skip to content

Commit 5fb3d67

Browse files
committed
Use styleOverrides instead of dsfr patch for mui links
1 parent ca88a9b commit 5fb3d67

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/mui.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ function createMuiDsfrTheme(params: { isDark: boolean }): MuiTheme {
187187
}
188188
}
189189
},
190+
"MuiTypography": {
191+
"styleOverrides": {
192+
"root": {
193+
//Fixes double underline: https://user-images.githubusercontent.com/6702424/206064575-4f036145-ff40-47db-aabd-560f29136e71.png
194+
"backgroundImage": "unset"
195+
}
196+
}
197+
},
190198
...(() => {
191199
const nonTypedMuiComponents = {
192200
"MuiDataGrid": {

src/scripts/build/patchCssForMui.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,6 @@ export function patchCssForMui(params: { rawDsfrCssCode: string }) {
1919
(rule.selectors = rule.selectors.map((selector: string) => {
2020
const selectorNotMui = `${selector}:not([class^="Mui"])`;
2121

22-
if (media === "root") {
23-
if (selector === "[href]") {
24-
return selectorNotMui;
25-
}
26-
}
27-
2822
if (media === "(hover: hover) and (pointer: fine)") {
2923
if (
3024
selector === "button:not(:disabled):hover" ||

0 commit comments

Comments
 (0)