I'm new in vue.js and I want to ask can I create bounding box to any element? This bounding box seems like view box in svg
Example that I made this checkbox like this
checkbox
And here are the code to make the box of the checkbox
/* checkbox aspect */
[type="checkbox"]:not(:checked) + label:before,
[type="checkbox"]:checked + label:before {
content: '';
position: absolute;
left: 0;
top: 0;
width: 1.4em;
height: 1.4em;
border: 1px solid #aaa;
background: #FFF;
border-radius: .2em;
box-shadow: inset 0 1px 3px rgba(0,0,0, .1), 0 0 0 rgba(203, 34, 237, .2);
-webkit-transition: all .275s;
transition: all .275s;
}
/* checked mark aspect */
[type="checkbox"]:not(:checked) + label:after,
[type="checkbox"]:checked + label:after {
content: '✕';
position: absolute;
top: .525em;
left: .18em;
font-size: 1.375em;
color: #CB22ED;
line-height: 0;
-webkit-transition: all .2s;
transition: all .2s;
}
And what I want to do is create bounding box 32px for this checkbox, this bounding box should be similar with viewbox in svg
You can see the icon grid and rules here. Let's assume the centerpoint is where the checkbox should be, and then they have bounding box (blue rectangle).