It should have 2px padding-left but it has 2px padding-left + 1px border-width.
By default, box-sizing is content-box, and it uses the border width to get in account the full size. Currently it works with another components with margin offset but it doesn't work with the Image component. With the "box-sizing=initial" value, it works.
Using the next code:
has the result:
It should have 2px padding-left but it has 2px padding-left + 1px border-width.
By default, box-sizing is
content-box
, and it uses the border width to get in account the full size. Currently it works with another components withmargin
offset but it doesn't work with the Image component. With the "box-sizing=initial" value, it works.