Closed st3phan closed 7 years ago
@st3phan This is a tricky one, as the effects of the border-box
reset are far-reaching, but also extremely helpful. It's more than just sg-input
that receives the updates from border-box
; any element that contains a combination of padding, border, and width are affected. Paul Irish explains in his blog post.
I'm going to research how popular this technique is before committing to either change it or not.
Alright, the solution I used was to wrap the star selector in .pl-c-body {}
, which will only apply to Pattern Lab UI styles and nothing inside the iframe. It doesn't seem to break any of the PL-specific UI patterns inside the iframe, so this is addressed.
Could you consider removing the global
box-sizing: border-box
reset declaration?It sometimes starts messing up layouts because the
styleguide.css
is of course not included in my production project. So where in patternlab thebox-sizing
reset applies to all elements it does not when viewing elements outside of patternlab because there is no global reset in my production CSS. I only setbox-sizing
toborder-box
on elements that need it.So please consider removing this global box sizing reset:
And apply it only to elements that need it: