mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-24 15:46:10 +08:00
502dac12aa
* docs: fix code * feat: lint * feat: prettier * feat: test * feat: review * feat: format html * feat: format html
32 lines
947 B
TypeScript
32 lines
947 B
TypeScript
/**
|
|
* Fallback of IE.
|
|
* Safe to remove.
|
|
*/
|
|
|
|
// Style as inline component
|
|
import { prepareToken } from '.';
|
|
import type { FormToken } from '.';
|
|
import { genSubStyleComponent } from '../../theme/internal';
|
|
import 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)];
|
|
});
|