Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

Sidebar line spacing - Simple Tab Groups add-on

  • 7 답장
  • 1 이 문제를 만남
  • 1 보기
  • 최종 답변자: moz_spt

more options

Hi How can I write code to change line spacing for the sidebar of the add-on "Simple Tab Groups".


I found this code which changes line spacing for Bookmarks ... it works. https://support.mozilla.org/si/questions/1238370

@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); /* Minimize height of sidebar items */ .sidebar-placesTreechildren::-moz-tree-row {

   min-height: 18px !important;
   height: 18px !important;
   max-height: 18px !important;

}

Hi '''How can I write code to change line spacing for the sidebar of the add-on "Simple Tab Groups".''' I found this code which changes line spacing for Bookmarks ... it works. [http://example.com https://support.mozilla.org/si/questions/1238370] @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); /* Minimize height of sidebar items */ .sidebar-placesTreechildren::-moz-tree-row { min-height: 18px !important; height: 18px !important; max-height: 18px !important; }

선택된 해결법

I installed the extension and added a couple tabs. You want to reduce/override the height and min-height?

Turns out the rules need to go into a userContent.css file. For example,

#stg-popup .item {
  min-height: 18px !important;
  height: auto !important;
}


Yielding this:

Or course, adjust that min-height and height as desired.

문맥에 따라 이 답변을 읽어주세요 👍 1

모든 댓글 (7)

more options

Most likely an add-on's sidebars do not use the messy "tree" code of ancient XUL but instead use standard HTML elements.

If you want to "Inspect" an add-on sidebar, try this:

  • Open the add-on's sidebar
  • Type or paste about:debugging in the address bar and press Enter to load that page
  • In the left column, click This Firefox
  • Find the extension and click its Inspect button -- this should open a new tab
  • Switch to the Inspector panel if needed, then look in the right side for a selector that lets you choose what to inspect -- it looks like a window with a sidebar and a main area -- choose the sidebar page here (this might or might not be obvious from the available file names)
  • Now you should have a familiar inspector view into the sidebar to identify elements and style rules

Now, whether your overriding styles belong in a userChrome.css or userContent.css file, I don't know...

more options

Thanks, this is very informative. It looks like there is code to control appearance (see attachment).

The CSS in the "Style Editor" tab makes changes when manually edited. But I haven't found the setting which controls spacing.

If I do make changes manually to the CSS in the "Style Editor" tab, will they be permanently applied. Is this how it works?

Edit: Sorry, I think you say you need to override by writing code to a file, and it may or may not be userChrome.css.

글쓴이 moz_spt 수정일시

more options

선택된 해결법

I installed the extension and added a couple tabs. You want to reduce/override the height and min-height?

Turns out the rules need to go into a userContent.css file. For example,

#stg-popup .item {
  min-height: 18px !important;
  height: auto !important;
}


Yielding this:

Or course, adjust that min-height and height as desired.

more options

The procedure for userContent.css is nearly identical to userChrome.css -- same chrome folder, same preference to direct Firefox to look for the file at startup. Example thread:

https://support.mozilla.org/en-US/questions/1338198#answer-1456835

more options

Thank you for looking at this. I couldn't get the HTML code to show up for some reason. All I get is as per attachment. However I did create a userContent.css file with your code and this did work.

more options

I see the problem in your screenshot. You're not inspecting the sidebar. If you look to the right end of the row with Inspector Console Debugger... you'll see an icon that looks like a window with a sidebar (or a frameset). Click that button and you can choose to inspect the "popup" page which is open in the sidebar. (It only works if the sidebar is currently showing that page.) Sorry that wasn't clear enough.

more options

Great, thanks for the additional info.