-
Notifications
You must be signed in to change notification settings - Fork 54
feat(theme): add box-sizing to the global styles (Teams theme) #1057
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1057 +/- ##
=======================================
Coverage 82.56% 82.56%
=======================================
Files 752 752
Lines 8859 8859
Branches 1178 1178
=======================================
Hits 7314 7314
Misses 1530 1530
Partials 15 15
Continue to review full report at Codecov.
|
packages/react/src/themes/base/components/Loader/loaderStyles.ts
Outdated
Show resolved
Hide resolved
pls remove |
listBackgroundColor: siteVars.colors.white, | ||
listBorderRadius: _3px_asRem, | ||
listPadding: `${pxToRem(8)} 0`, | ||
listBoxShadow: `0 .2rem .6rem 0 ${siteVars.gray06}`, | ||
listMaxHeight: '20rem', | ||
listMaxHeight: pxToRem(296), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just curious how 20rem became 296px?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So previously on the Dropdown list, we had padding on the top and 6 elements in the list (one list item has height of 48px) => (6*48px) + 8px = 296px :) We don't want to use rem anyway and the height was a bit different because of the box-sizing
, so that is why I converted it to px.
# Conflicts: # CHANGELOG.md
-moved content-box for font icons near the width and height props
# Conflicts: # packages/react/src/themes/teams/components/Icon/iconStyles.ts
This PR adds the
box-sizing: border-box
to all elements, as well before and auto pseudo elements in teams theme, by providing a rule in the global styles. Parts of the styles of the components, had to be updated. We can still see some screener differences, but I see these as fixes, rather then regressions. @codepretty @bcalvery @notandrew let me know what you think.BREAKING CHANGES:
The `box-sizing: border-box' prop is added for all elements, so check for regressions to all components that has style overrides affecting the size of the components, or adding paddings and margings of the elements.