Skip to content

Commit

Permalink
Merge pull request #542 from shayanbinary/sticky-header-animation
Browse files Browse the repository at this point in the history
add animation for sticky dialog on mobile
  • Loading branch information
bruce-binary authored Oct 10, 2018
2 parents ea4ed96 + e2f8530 commit 6bc1873
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
22 changes: 13 additions & 9 deletions sass/components/_categorical-display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
background: themed('CatDisplayFilterBg');
}
}
.cq-filter-panel {
@include themify($themes) {
background: themed('CatDisplayFilterBg');
}
}
.cq-lookup-input {
margin: 1.5em 1.1em 1.6em 1.3em;
position: relative;
Expand Down Expand Up @@ -374,21 +379,20 @@
width: 100%;
height: 100%;

.category-title {
&.fixed {
margin-top: -3px;
}
}
.cq-lookup-filters {
width: 100%;
height: 10.5em;
border-right: none;
max-height: 200px;
overflow: hidden;
position: relative;
z-index: 9;
transition: max-height 0.2s ease-in;
@include themify($themes) {
border-bottom: 1px solid themed('CatDisplaySearchBorder');
}

&.scroll-down {
max-height: 0;
transition: max-height 0.2s ease-out;
}
}
.cq-lookup-input {
margin: 1.2em 1em 0.5em;
Expand All @@ -411,7 +415,7 @@
.cq-filter {
border-right: none;
background: transparent;
padding: 0px 20px;
padding: 7px 20px;
line-height: 3em;

&.cq-active-filter {
Expand Down
5 changes: 2 additions & 3 deletions src/components/categoricaldisplay/CategoricalDisplay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ import '../../../sass/components/_categorical-display.scss';
const CategoricalDisplay = ({
onSelectItem,
setScrollPanel,
isScrollingDown,
updateScrollSpy,
scrollUp,
scrollDown,
ResultsPanel,
FilterPanel,
SearchInput,
SearchInput
}) => (
<div className="cq-categorical-display">
<div className={`cq-lookup-filters ${isScrollingDown ? 'scroll-down' : ''}`}>
<div className="cq-lookup-filters">
<SearchInput />
<FilterPanel />
</div>
Expand Down

0 comments on commit 6bc1873

Please sign in to comment.