Skip to content

Commit 34f5c70

Browse files
authored
Merge pull request #5958 from nextcloud-libraries/fix/radiobutton-alignment
fix(NcActions): NcActionCheckbox and NcActionRadio icon alignment
2 parents e8ce5f4 + cf9c9ad commit 34f5c70

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/components/NcActionCheckbox/NcActionCheckbox.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,7 @@ export default {
206206

207207
&::before {
208208
margin-block: 0 !important;
209-
// 16px is the width of the checkbox including the border
210-
margin-inline: calc((var(--default-clickable-area) - 16px) / 2) !important;
209+
margin-inline: calc((var(--default-clickable-area) - 14px) / 2) !important;
211210
}
212211
}
213212

src/components/NcActionRadio/NcActionRadio.vue

+2-3
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,9 @@ export default {
199199
padding: 0 !important;
200200
padding-right: $icon-margin !important;
201201

202-
// radio-width is 12px, border is 2
203-
// (44 - 14 - 2) / 2 = 14
202+
// (34 -14) / 2 = 10 same as ncactioncheckbox
204203
&::before {
205-
margin: 0 14px 0 !important;
204+
margin: calc((var(--default-clickable-area) - 14px) / 2) !important;
206205
}
207206
}
208207

0 commit comments

Comments
 (0)