Reputation: 69
Can anyone advice how can I style el-checkbox Elements library (https://element.eleme.io/#/en-US/component/checkbox) element to change the checkbox height and width and to have the tick in the center of the checkbox.
I have changed the size of the text and the checkbox but now the tick is not centered.
Upvotes: 0
Views: 406
Reputation: 138536
The check mark selector is .el-checkbox__inner::after
, and it's positioned absolute
, so you'll have to set height
and left
accordingly.
The following CSS can style the various parts of the checkbox:
.el-checkbox,
.el-checkbox__label {
font-size: 22px;
}
/* checkbox */
.el-checkbox__inner {
height: 22px;
width: 22px;
}
/* check mark */
.el-checkbox__inner::after {
height: 14px;
left: 8px;
}
Upvotes: 1