diff --git a/.changeset/plenty-ducks-impress.md b/.changeset/plenty-ducks-impress.md new file mode 100644 index 0000000000..5f7d337b5c --- /dev/null +++ b/.changeset/plenty-ducks-impress.md @@ -0,0 +1,5 @@ +--- +'@talend/react-components': patch +--- + +fix(TDP-12616): fix checkbox mark style on multi-select diff --git a/packages/components/src/MultiSelect/ItemOption.module.scss b/packages/components/src/MultiSelect/ItemOption.module.scss index 7c8c4c16be..d469cfaf50 100644 --- a/packages/components/src/MultiSelect/ItemOption.module.scss +++ b/packages/components/src/MultiSelect/ItemOption.module.scss @@ -21,10 +21,19 @@ } input[type='checkbox'], - :global(.checkbox input + ::before), - :global(.checkbox input + ::after) { + :global(.checkbox input + ::before) { top: calc($padding-normal / 2); } + + :global(.checkbox input + ::after) { + /* tricky calculation to center the checkmark + * $padding-normal / 2 = top gap, same as the input (see above) + * tokens.$coral-sizing-xxxs = checkbox size + * tokens.$coral-sizing-xxxs / 2 = mark size + * 2px = 2 * 1px (the border width) + */ + top: calc($padding-normal / 2 + (tokens.$coral-sizing-xxxs - tokens.$coral-sizing-xxxs / 2 - 2px) / 2) !important; /* stylelint-disable-line declaration-no-important */ + } } .item {