Skip to content

Commit

Permalink
use :has
Browse files Browse the repository at this point in the history
  • Loading branch information
mxkae committed Aug 28, 2024
1 parent a571dfb commit e2d706c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions src/block/accordion/frontend-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ class StackableAccordion {
elsAnchors[ el.getAttribute( 'id' ) ] = el
}

if ( el.contentEl.querySelector( '.stk-block-timeline' ) ) {
el.contentEl.classList.add( 'has-stk-block-timeline' )
}
el._StackableHasInitAccordion = true
}
} )
Expand Down
2 changes: 1 addition & 1 deletion src/block/accordion/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
// 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 {
.stk-block-accordion__content:has(.stk-block-timeline) {
transform: initial;
}

Expand Down

0 comments on commit e2d706c

Please sign in to comment.