File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
packages/chrome/src/styled/nav Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export const StyledBrandmarkNavItem = styled(StyledBaseNavItem).attrs({
1616 'data-garden-version' : PACKAGE_VERSION ,
1717 as : 'li'
1818} ) `
19- flex: 1 ;
19+ flex: 0 ;
2020 order: 1;
2121 opacity: 0.3;
2222 margin-top: auto;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export const StyledLogoNavItem = styled(StyledBaseNavItem).attrs({
5454 'data-garden-version' : PACKAGE_VERSION ,
5555 as : 'li'
5656} ) < IStyledLogoNavItemProps > `
57- flex: 1 ;
57+ flex: 0 ;
5858 order: 0;
5959 opacity: 1;
6060 cursor: default;
Original file line number Diff line number Diff line change @@ -40,7 +40,9 @@ export const StyledNav = styled.nav.attrs<IStyledNavProps>({
4040 'data-garden-id' : COMPONENT_ID ,
4141 'data-garden-version' : PACKAGE_VERSION
4242} ) < IStyledNavProps > `
43+ display: flex;
4344 position: relative;
45+ flex-direction: column;
4446 width: ${ props => ( props . isExpanded ? getExpandedNavWidth : getNavWidth ) } ;
4547 font-size: ${ props => props . theme . fontSizes . md } ;
4648
Original file line number Diff line number Diff line change @@ -81,8 +81,9 @@ interface IStyledNavItemProps extends ThemeProps<DefaultTheme> {
8181 * 2. Button reset
8282 * 3. Override `focusStyles` outline (in `colorStyles`)
8383 * 4. Use of negative offset to create an inset outline
84+ * 5. Overrides flex default `min-width: auto`
8485 */
85- export const StyledNavButton = styled ( StyledBaseNavItem as 'button' ) . attrs ( {
86+ export const StyledNavButton = styled ( StyledBaseNavItem ) . attrs ( {
8687 'data-garden-id' : COMPONENT_ID ,
8788 'data-garden-version' : PACKAGE_VERSION ,
8889 as : 'button'
@@ -91,6 +92,7 @@ export const StyledNavButton = styled(StyledBaseNavItem as 'button').attrs({
9192 justify-content: ${ props => props . isExpanded && 'start' } ;
9293 margin: 0; /* [2] */
9394 cursor: ${ props => ( props . isCurrent ? 'default' : 'pointer' ) } ;
95+ min-width: 0; /* [5] */
9496 text-align: ${ props => props . isExpanded && 'inherit' } ;
9597
9698 &:hover,
You can’t perform that action at this time.
0 commit comments