Skip to content

Commit

Permalink
Add feed js toggle fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Simounet committed Oct 24, 2020
1 parent 46802d6 commit 4556598
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/style.css.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ $(function () {
const targetElement = $(button.data('target'));
const bodyOverflowNeeded = button.data('toggle-overflow') || false;
const isExpanded = targetElement.data('is-opened');
const alreadyOpened = $('[data-is-opened="true"]');
alreadyOpened
.attr('data-is-opened', false)
.data('is-opened', false);

if (isExpanded) {
if (bodyOverflowNeeded !== false) {
Expand Down
4 changes: 2 additions & 2 deletions sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,12 @@ $feeds-list-toggle-transition: transform 0.3s;
.feeds-list,
.feed-add {
@media($breakpoint-max) {
position: fixed;
background-color: $sidebar-color-bg;
transition: all 130ms ease-in;;
will-change: transform;
overflow: auto;
z-index: 1000;
}
}

Expand All @@ -330,10 +332,8 @@ $feeds-list-toggle-transition: transform 0.3s;
padding: 0;

@media($breakpoint-max) {
position: fixed;
width: 100%;
max-height: calc(100vh - #{$settings-height});
z-index: 1000;
}

&[data-is-opened="false"] {
Expand Down

0 comments on commit 4556598

Please sign in to comment.