Align sidebar elements with breadcrumbs bar and toolbar #1402
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.
I'm formalising the heights of various elements so things line up properly between the sidebar and the main area.
The core change is that I'm giving the same height to all the elements that have the potential to be lined up with each other: the sidebar's tab bar, the breadcrumbs bar, the explorer's root entity button, the search input row, the metadata viewer's header rows.
Giving the same height to the breadcrumbs bar and to the toolbar simplifies things a lot because when the search is enabled, the search input row must line up with the toolbar, and when the search is disabled, the explorer's root entity button must line up with the breadcrumbs bar.
I introduce a CSS variable in the viewer to control this height:
--toolbar-height
. Seems logical that the toolbar be the element that other elements line up to, since it's kind of the most important one.I also add a CSS variable to control the height of the toolbar buttons:
--toolbarBtn-height
, which I use for explorer buttons too, and I map those two variables to two more variables in the lib:--h5w-toolbar--height
and--h5w-btn--height
. I give those default values such that the toolbar and buttons in Braggy (notably) keep the same height as before.This is what it looks like now: