File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed
Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change 11export default ( cssText : string ) => {
2- window . addEventListener ( "load" , ( ) => {
3- /** Resolve the overlap issue of the CSS rules when using Bootstrap */
4- for ( const styleSheet of Array . from ( document . styleSheets ) ) {
5- try {
6- for ( const rule of Array . from ( styleSheet . cssRules || styleSheet . rules ) ) {
7- if ( rule instanceof CSSStyleRule ) {
8- rule . selectorText = rule . selectorText . replace (
9- / ^ \. f o r m - c o n t r o l (? = : | $ ) / ,
10- ".form-control:not(.ant-input)" ,
11- )
12- }
2+ /** Resolve the overlap issue of the CSS rules when using Bootstrap */
3+ for ( const styleSheet of Array . from ( document . styleSheets ) ) {
4+ try {
5+ for ( const rule of Array . from ( styleSheet . cssRules || styleSheet . rules ) ) {
6+ if ( rule instanceof CSSStyleRule ) {
7+ rule . selectorText = rule . selectorText . replace (
8+ / ^ \. f o r m - c o n t r o l (? = : | $ ) / ,
9+ ".form-control:not(.ant-input)" ,
10+ )
1311 }
14- } catch ( e ) {
1512 }
13+ } catch ( e ) {
1614 }
17- } )
15+ }
1816
1917 /** Inject the given `cssText` in the document head */
2018 const style = document . createElement ( "style" ) ;
@@ -27,4 +25,4 @@ export default (cssText: string) => {
2725 }
2826
2927 document . head . appendChild ( style ) ;
30- }
28+ }
You can’t perform that action at this time.
0 commit comments