Join the Webstudio community

Updated 3 months ago

Applying Css Resets For A Smooth And Consistent User Experience

At a glance

The community member posted a beginner question about applying CSS resets, including setting the root font size, smooth scrolling, and box-sizing. The comments suggest that the html selector can be set in the global root, and that the ::before and ::after pseudo-elements only apply to HTML elements. There is no explicitly marked answer in the comments.

beginner question here! how can i apply some css resets like
:where(html) {
--root-font-size: 16px;
scroll-behavior: smooth;
-moz-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%;
}

:where(*, *::before, *::after) {
box-sizing: border-box;
margin: 0;
padding: 0;
}
tnx
O
2 comments
html selector can be set in Global Root
the before/after only html embed for now
Add a reply
Sign up and join the conversation on Discord