-
Notifications
You must be signed in to change notification settings - Fork 18
IBX: 11010 improve anchor links switcher #1805
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
base: main
Are you sure you want to change the base?
Conversation
|
|
|
||
| const header = doc.querySelector('.ibexa-edit-header'); | ||
| const headerContainer = header?.querySelector('.ibexa-edit-header__container'); | ||
| const anchorNavigationSwitcher = doc.querySelector('.ibexa-tabs--switcher'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const anchorNavigationSwitcher = doc.querySelector('.ibexa-tabs--switcher'); | |
| const anchorNavigationSwitcher = doc.querySelector('.ibexa-anchor-navigation .ibexa-tabs--switcher'); |
for safety, .ibexa-tabs--switcher can be used in other contexts as well
| const headerBottomContainerHeight = header.offsetHeight - headerContainer?.offsetHeight; | ||
|
|
||
| return top + height >= headerContainer?.offsetHeight + headerBottomContainerHeight + SECTION_ADJUST_MARGIN_TOP; | ||
| const anchorNavigationSwitcherHeight = anchorNavigationSwitcher?.offsetHeight || 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const anchorNavigationSwitcherHeight = anchorNavigationSwitcher?.offsetHeight || 0; | |
| const anchorNavigationSwitcherHeight = anchorNavigationSwitcher?.offsetHeight ?? 0; |
| border-top: calculateRem(1px) solid $ibexa-color-light; | ||
| position: absolute; | ||
| right: calculateRem(30px); | ||
| z-index: 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
personally I would use at least sth like z-index 10 to leave possibility to add sth between 0 and &__sections
| color: $ibexa-color-dark-400; | ||
| align-items: center; | ||
| font-weight: 600; | ||
| border-left: 1px solid $ibexa-color-light; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| border-left: 1px solid $ibexa-color-light; | |
| border-left: calculateRem(1px) solid $ibexa-color-light; |



Related PRs:
Description:
For QA:
Documentation: