Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (accordion block): fix timeline block lines if inside accordion block #3293

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/block/accordion/frontend-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ class StackableAccordion {
if ( el.getAttribute( 'id' ) ) {
elsAnchors[ el.getAttribute( 'id' ) ] = el
}

bfintal marked this conversation as resolved.
Show resolved Hide resolved
el._StackableHasInitAccordion = true
}
} )
Expand Down
7 changes: 7 additions & 0 deletions src/block/accordion/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,13 @@
}
}

// the transform property causes the background-attachment: fixed to not work as expected.
// remove it to prevent timeline block lines to be glitchy.
// see similar issue: https://www.sitepoint.com/community/t/background-attachment-fixed-not-working-as-expected/35374/4
.stk-block-accordion__content:has(.stk-block-timeline) {
transform: initial;
}

// Accordion content shows up in the front end.
&:not([open]) .stk-block-accordion__content {
max-height: 0;
Expand Down
Loading