Bump menubar to left width of Inspector Panel when open #51
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a small fix for a minor accessibility issue, when the inspector is opened the menu buttons are no longer visible but can still be focused.
This implementation uses a intersection observer to detect when the.mb-menubarelement has been inserted in the document and sets a css variable--menu-bar-height, local to the shadow host, that is used to adjust the height of the inspector panel accordingly.If thedata-autohideproperty is set on the.mb-menubarelement, the.ip-rootelement is instead given padding and z-indexes are adjusted such that the menu bar can still appear above the inspector panel.I've updated this such that the menubar will move to the left in order to accommodate the inspector panel when it is open. This involves using a css variable,
--panel-width, to define the panel width and a.mb-root:has(+ .ip-root)css selector to change the menubar position when the inspector panel is present.