Skip to content

Commit

Permalink
Fix: Have tethered breadcrumbs drop down be part of the element DOM (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
priyajeet authored Jan 5, 2018
1 parent caf8d2c commit 602674e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/components/Breadcrumbs/BreadcrumbDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ type Props = {
rootElement: HTMLElement
};

const BreadcrumbDropdown = ({ crumbs, onCrumbClick, className = '' }: Props) => (
<DropdownMenu constrainToScrollParent>
const BreadcrumbDropdown = ({ crumbs, onCrumbClick, className = '', rootElement }: Props) => (
<DropdownMenu constrainToScrollParent bodyElement={rootElement}>
<PlainButton type='button' className={`buik-breadcrumbs-drop-down ${className}`}>
···
</PlainButton>
<Menu className='buik-breadcrumbs-drop-down-menu'>
<Menu>
{crumbs.map(({ id, name }: Crumb) => (
<MenuItem key={id} onClick={() => onCrumbClick(id)}>
{name}
Expand Down
4 changes: 0 additions & 4 deletions src/components/Breadcrumbs/BreadcrumbDropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,3 @@
letter-spacing: inherit;
}
}

.buik-breadcrumbs-drop-down-menu {
@include reset;
}
16 changes: 11 additions & 5 deletions src/components/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,28 @@ $lighter-light-blue: rgba($light-blue, .4) !default;

$font: Lato, 'Helvetica Neue', Helvetica, Arial, sans-serif;

@mixin rendering {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}

@mixin reset {
@include rendering;

/* stylelint-disable declaration-no-important */
box-sizing: border-box !important;
/* stylelint-enable declaration-no-important */
font-family: $font;
font-size: 13px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

* {
@include rendering;

/* stylelint-disable declaration-no-important */
box-sizing: border-box !important;
/* stylelint-enable declaration-no-important */
font-family: $font;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-family: inherit;

&::after,
&::before {
Expand Down
8 changes: 4 additions & 4 deletions src/components/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@
box-sizing: border-box !important;
/* stylelint-enable declaration-no-important */
color: $twos;
font-family: $font;
font-size: 13px;
height: 100%;
letter-spacing: .13px;
margin: 0;
outline: none;
overflow: hidden;
padding: 0;
position: relative;
text-rendering: optimizeLegibility;
user-select: none;
width: 100%;

Expand Down Expand Up @@ -199,6 +195,10 @@
}
}

.ReactModal__Body--open & {
position: relative;
}

.btn-plain {
background: none;
border: 0 none;
Expand Down

0 comments on commit 602674e

Please sign in to comment.