forked from ant-design/ant-design
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Form style should always before Grid (ant-design#44485)
* fix: use css variable to support dynamic display * chore: support order * chore: add ie fallback * chore: add ie fallback
- Loading branch information
Showing
5 changed files
with
92 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Fallback of IE. | ||
* Safe to remove. | ||
*/ | ||
|
||
// Style as inline component | ||
import { prepareToken, type FormToken } from '.'; | ||
import { genSubStyleComponent, type GenerateStyle } from '../../theme/internal'; | ||
|
||
// ============================= Fallback ============================= | ||
const genFallbackStyle: GenerateStyle<FormToken> = (token) => { | ||
const { formItemCls } = token; | ||
|
||
return { | ||
'@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)': { | ||
// Fallback for IE, safe to remove we not support it anymore | ||
[`${formItemCls}-control`]: { | ||
display: 'flex', | ||
}, | ||
}, | ||
}; | ||
}; | ||
|
||
// ============================== Export ============================== | ||
export default genSubStyleComponent(['Form', 'item-item'], (token, { rootPrefixCls }) => { | ||
const formToken = prepareToken(token, rootPrefixCls); | ||
|
||
return [genFallbackStyle(formToken)]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters