Jason Chee

My wxss reset for box-sizing day

2019-02-27


First day of Feb celebrates box-sizing day. Front-end developers can rely on good ol' box-sizing to create better layouts. Before February ends and to celebrate box-sizing day, I share my wechat mini program wxss reset, which of course includes box-sizing: border-box. It's what I use to start projects now.

page {
  color: #333;
  font-size: 28rpx;
  font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
  line-height: 1.4
}

button,
form,
image,
input,
label,
navigator,
scroll-view,
swiper,
text,
textarea,
view {
  box-sizing: border-box
}

Thanks for reading. If you would like to be reminded about new writeups from me you can subscribe to my newsletter below.

Your e-mail address is for my eyes only.

⟵ Back to articles