XF 2.1 Does AdminCP nav-section-header really need that big vertical padding??

ShikiSuen

Well-known member
Even if I am using 2160p external LG retina monitor with my mac, its current v-padding is still too large. I have to scroll down to the bottom to see some contents.
.p-nav-sectionHeader .p-nav-sectionToggle, .p-nav-sectionHeader .p-nav-sectionLink {padding: 10px;}
Now it is comfortable. I guess this should also be comfortable enough for cellphone browsing.

A quick comparison:

1589547200912.png
 
Last edited:
For those people who hate large margins, this is the theme I am working on.
(I just remade it from scratch since a half-month ago due to some fundamental concerns.)
1589551489137.png
1589551522062.png
1589551562476.png1589551585190.png1589551648604.png
1589551636869.png
 
Seems you never mentioned which template you've actually edited?
I was supposing that you are following the following typical procedure (as a common sense):

1. Use the element inspector in your web browser to investigate the webpage element you want to hack with.
(You may have to enable development tools in Safari.)

2. By investigating the elements, you will see the class name of the elements you want to hack:
1589597450553.png
Now you see two elements to hack:
  • <a ..... class="p-nav-sectionLink js-navSectionToggle"
  • <a class="p-nav-sectionToggle js-navSectionToggle"
They are <a> elements and are calling two class names at the same time per each element, we rewrote it as the following in CSS:
(use a single dot to joint them. No space in this case.

If using space, the one to the right of the space must be a child element of the one to the left of the space.)
  • a.p-nav-sectionLink.js-navSectionToggle
  • a.p-nav-sectionToggle.js-navSectionToggle
However, writing CSS in that way is mostly effective in EXTRA.LESS template.
For AdminCP, you need to search it through the Master template (after enabling both XenForo dev mode and design mode).
Usable keywords are:
  • .p-nav-sectionLink
  • .p-nav-sectionToggle
Checking all of your search results (only LESS templates). In this case there is only one result: app.less.
You can then find these two class definitions and change their paddings from padding: 20px 10px; to padding: 10px;.
 
Last edited:
Usable keywords are:
  • .p-nav-sectionLink
  • .p-nav-sectionToggle
Checking all of your search results (only LESS templates). In this case there is only one result: app.less.
You can then find these two class definitions and change their paddings from padding: 20px 10px; to padding: 10px;.


Thanks for your instructions but I can't find such thing in app.less...

1589730594284.webp
 
Back
Top Bottom