File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
test/runtime/scripts/classNames Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -9,11 +9,9 @@ export const parseClassNames = memoize((rawCssCode: string): string[] => {
99
1010 objectKeys ( rulesByBreakpoint ) . forEach ( breakpoint => {
1111 const rules = rulesByBreakpoint [ breakpoint ] ;
12-
1312 rules . forEach ( ( { selectors } ) => {
1413 selectors . forEach ( selector => {
15- const matchArr = selector . match ( / \. f r - [ a - z A - Z 0 - 9 _ - ] + / g) ;
16-
14+ const matchArr = selector . match ( / \. f r - [ a - z A - Z 0 - 9 _ - ] + (?: @ [ a - z A - Z 0 - 9 _ - ] + ) ? / g) ;
1715 if ( matchArr === null ) {
1816 return ;
1917 }
@@ -24,7 +22,6 @@ export const parseClassNames = memoize((rawCssCode: string): string[] => {
2422 } ) ;
2523 } ) ;
2624 } ) ;
27-
2825 return Array . from ( classNames ) ;
2926} ) ;
3027
Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ export function createMuiDsfrTheme(
338338 ...args : object [ ]
339339) : MuiTheme {
340340 const muiTheme = createTheme ( getMuiDsfrThemeOptions ( params ) , ...args ) ;
341-
341+
342342 return muiTheme ;
343343}
344344
Original file line number Diff line number Diff line change 1+ /* eslint no-useless-escape: 0 */
12import { it , expect } from "vitest" ;
23import { parseClassNames } from "../../../../scripts/build/cssToTs/classNames" ;
34
@@ -24,6 +25,11 @@ it("Parsing of fr classnames", () => {
2425 color: #3a3a3a;
2526}
2627
28+ .fr-tile--vertical\@md {
29+ display: flex;
30+ flex-direction: column;
31+ }
32+
2733@supports (aspect-ratio: 16/9) {
2834 .fr-ratio-32x9 {
2935 aspect-ratio: 3.5555555556 !important;
@@ -34,7 +40,6 @@ it("Parsing of fr classnames", () => {
3440 }
3541}
3642
37-
3843@media (min-width: 36em) { }
3944@media (min-width: 48em) { }
4045@media (min-width: 62em) { }
@@ -50,6 +55,7 @@ it("Parsing of fr classnames", () => {
5055 "fr-col" ,
5156 "fr-header__navbar" ,
5257 "fr-btn--menu" ,
58+ "fr-tile--vertical@md" ,
5359 "fr-ratio-32x9" ,
5460 "fr-ratio-16x9"
5561 ] ;
You can’t perform that action at this time.
0 commit comments