mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-15 17:31:25 +08:00
f4411d9393
* refactor: Steps cssInJs add basic structure * refactor: change Component Steps less into cssInJs * refactor: ♻️ steps cssInJs code formated * style: 💄 change Steps cssinjs left and right into Logical Properties * style: 💄 steps cssinjs add FIXME for number hardcode * style: 💄 steps cssinjs dismiss useless rtl style * style: 💄 step cssinjs fix the 'not compatible with RTL mode' warning and fix the style in RTL mode * style: code formated for FIXME * style: revert the change about _skip_check_ * style: step cssinjs margin/padding used with Logical properties * ci: fix lint check * style: fix the style on RTL * style: try fix the step subtitle order on RTL mode * style: optimization the style on RTL and dismiss duplicate styles with logical properties
57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
import type { CSSObject } from '@ant-design/cssinjs';
|
|
import type { GenerateStyle } from '../../_util/theme';
|
|
import type { StepsToken } from '.';
|
|
|
|
const genStepsLabelPlacementStyle: GenerateStyle<StepsToken, CSSObject> = token => {
|
|
const { componentCls, stepsIconSize, lineHeight } = token;
|
|
|
|
return {
|
|
[`&${componentCls}-label-vertical`]: {
|
|
[`${componentCls}-item`]: {
|
|
overflow: 'visible',
|
|
|
|
'&-tail': {
|
|
marginInlineStart: 58, // FIXME: hardcode in v4
|
|
padding: '3.5px 24px', // FIXME: hardcode in v4
|
|
},
|
|
|
|
'&-content': {
|
|
display: 'block',
|
|
width: (stepsIconSize / 2 + 42) * 2, // FIXME: hardcode in v4
|
|
marginTop: 8, // FIXME: hardcode in v4
|
|
textAlign: 'center',
|
|
},
|
|
|
|
'&-icon': {
|
|
display: 'inline-block',
|
|
marginInlineStart: 42, // FIXME: hardcode in v4
|
|
},
|
|
|
|
'&-title': {
|
|
paddingInlineEnd: 0, // FIXME: hardcode in v4
|
|
paddingInlineStart: 0, // FIXME: hardcode in v4
|
|
|
|
'&::after': {
|
|
display: 'none',
|
|
},
|
|
},
|
|
|
|
'&-subtitle': {
|
|
display: 'block',
|
|
marginBottom: 4, // FIXME: hardcode in v4
|
|
marginInlineStart: 0, // FIXME: hardcode in v4
|
|
lineHeight,
|
|
},
|
|
},
|
|
[`&${componentCls}-small:not(${componentCls}-dot)`]: {
|
|
[`${componentCls}-item`]: {
|
|
'&-icon': {
|
|
marginInlineStart: 46, // FIXME: hardcode in v4
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|
|
export default genStepsLabelPlacementStyle;
|