Closed (fixed)
Project:
BS Base
Version:
8.x-1.x-dev
Component:
BS Bootstrap
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Aug 2021 at 16:42 UTC
Updated:
27 Dec 2021 at 14:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
pivica commentedHere is a first patch. This needs some testing in client projects before merging.
I've also fixed missing nav-item CSS class for language menu item links.
Comment #3
pivica commentedNote that this patch is also removing button left/right margin we added in https://www.drupal.org/node/3196202. We added it for cases when we are adding a block with a single button and we needed that margins to create space around a button. However with this patch we are adding left/right padding to all blocks and we should not need this margins any more.
Comment #4
pivica commentedTesting showed that applying this kind of rules - for first block and last block are not practical because we can have hidden responsive blocks before or after of desired menu blocks, and in this cases rules will fail.
It seems that simple applying of negative nav item spacing margins to wrapper element is better and simpler for implementation.
Additionally, while testing, i noticed some CSS rules for offcanvas responsive navigation that was leaking to bigger screens rules. This is also fixed.
Comment #5
pivica commentedSeems we need to fully split rules for region and region-navbar, even region negative margin block padding for navbar should only be applied to not collapsible menu state (bigger screens) so we do not mess up offcanvas menu layout.
Comment #6
pivica commentedI've missed that we already had an issue for this in #3101508: Main menu misaligned with top region. However this issue now is fixing/improving couple of additional things in header layout. Will close related issue and let's continue work here.
Comment #7
pivica commentedComment #8
pivica commentedI've tried to generalize solution more but it is not possible to do it fully because desired behaviour can easily change - region-navigation-second can have blocks only for mobile or blocks for all screen sizes, and making everything fit into grid is not possible in this case. So I've added more comments explaining this situation with an example code to fix this based on situation and fixed some bad selector rules introduced with previous refactoring.
Comment #10
pivica commentedCommitted.