Hi guys,
as far as I see, to the "Menu Item > Link Type > Link Icon class" a fixed "p-2" attribute class is applied.
That is spacing also on the left side, moving all the menu items on the right and creating a bad ordering column, confusion with the sub menu items that are not using icons, for example.
It should be "pe-2"
https://getbootstrap.com/docs/5.3/utilities/spacing/
Please, Can you confirm it ?
Please, Where can we manually edit and fix it ?
Maybe, it would be better to add it through CSS instead to use the fixed Bootstrap attribute. It would be simpler for customers to personalize it, if needed.
Please, Why you choose to add there a padding space instead of a margin space ?
Labels |
Added:
No Code Attached Yet
|
Title |
|
Hi guys,
as far as I investigated these should be the lines to change:
…/modules/mod_menu/tmpl/default_component.php - line 44 and 47
But maybe also:
…/modules/mod_menu/tmpl/default_heading.php - line 23 and 26
…/modules/mod_menu/tmpl/default_separator.php - line 23 and 26
…/modules/mod_menu/tmpl/default_url.php - line 36 and 39
1 - @brianteeman Please, Can you confirm me ?
If confirmed and if you want I can prepare the PR...
2 - Please, What is the best solution for you ? Padding pe-2 or Margin me-2 ?
Hi @brianteeman
I thought it was clear and sorry for my English.
1 - The Link Icon class should only take care to space itself from the menu item title. So, only on the right (left on LTR), because in case of a mod menu in a vertical view, as it is now p-2, it is moving all the menu items with the icons on the right. This creates a bad vertical alignment, where menu items of the same level (some menu items can have the icon, some no,) are not well aligned. And creating confusion with the sub menu items, where a 1st level menu item with icon could be vertically aligned with a 2nd level menu item that is not using icon.
Is it clear now what I mean ?
2 - Then I asked you if it is better to use padding (as it is now) or margin.
Anyway we can also say that to add a spacing class there it is not a must, Why ?
Well, simply because when a Joomla user id setting the "Menu Item > Link Type > Link Icon class: ..." he can add what he wants, also a pe-2 class (or me-2, p-2 etc.).
So, to add a fixed class there it is not a must, it could be deleted and, sure, it cannot be "p-2" attribute class.
I remain available
Thanks for the screenshots. Makes perfect sense now.
Please submit a pull request so that others can test and review.
As you write, everyone can add own classes and removing the class makes it flexible.
But it is a b/c break, it affects existing menus.
As you write, everyone can add own classes and removing the class makes it flexible.
The p-2 class is hardcoded :(
But it is a b/c break, it affects existing menus.
6.1.7 Rendered markup
For the time being, rendered markup is not subject to our backwards compatibility promise.
https://developer.joomla.org/development-strategy.html#backward_compatibility
The p-2 class is hardcoded :(
I wanted to say that I prefer removing the class completely and not change it to pe- or anything else.
Hi guys,
@brianteeman before to going on with the PR,
Please, Can you confirm me that "to completely remove the p-2 classes" is the chosen solution ?
Hi guys, @brianteeman before to going on with the PR, Please, Can you confirm me that "to completely remove the p-2 classes" is the chosen solution ?
@brianteeman I know you have thousands of things here, so maybe you lost this. Just to remember you that I'm waiting your confirmation before to going on...
it is really nothing to do with me. just create a pr how you think it is best and then maintainers and release oleads will make a decision. my opinion is no more important and valid than yours
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-11-29 17:41:31 |
Closed_By | ⇒ | joomleb |
Did you also try with a right-to-left and left-to-right language?