搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

[userChrome.css] What exactly causes "navigator-toolbox" to expand even if children are absolute positioned?

  • 1 个回答
  • 1 人有此问题
  • 8 次查看
  • 最后回复者为 cor-el

more options

Here is current Firefox UI layout for 95.x: https://i.imgur.com/fDeWGc4.png

I'm trying to understand what causes it to expand even when its child `toolbar#nav-var` is set to be positioned absolutely. It no longer should contribute to the parent height or layout yet it still does. My frist thought was it is JS script that calculate the height and sets it however, there are no direct in-line height changes at all.

Here is the test css:

toolbox#navigator-toolbox > toolbar#nav-bar { position: absolute!important; height: 0!important; min-height: 0!important; }

toolbox#navigator-toolbox > toolbar#nav-bar:focus-within, toolbox#navigator-toolbox > toolbar#nav-bar:hover, toolbox#navigator-toolbox > toolbar#nav-bar:focus { position: absolute!important; height: inherit!important; min-height: inherit!important; }

Using CTRL+L shotrcut combination you can force the nav-bar inputbox to be `focused` which sets custom style that reveals it. Since it is positioned absolutely it should not contribute to layout yet when it appears, the render viewport shifts and `toolbox#navigator-toolbox` height automatically increases.

Here is current Firefox UI layout for 95.x: https://i.imgur.com/fDeWGc4.png I'm trying to understand what causes it to expand even when its child `toolbar#nav-var` is set to be positioned absolutely. It no longer should contribute to the parent height or layout yet it still does. My frist thought was it is JS script that calculate the height and sets it however, there are no direct in-line height changes at all. Here is the test css: toolbox#navigator-toolbox > toolbar#nav-bar { position: absolute!important; height: 0!important; min-height: 0!important; } toolbox#navigator-toolbox > toolbar#nav-bar:focus-within, toolbox#navigator-toolbox > toolbar#nav-bar:hover, toolbox#navigator-toolbox > toolbar#nav-bar:focus { position: absolute!important; height: inherit!important; min-height: inherit!important; } Using CTRL+L shotrcut combination you can force the nav-bar inputbox to be `focused` which sets custom style that reveals it. Since it is positioned absolutely it should not contribute to layout yet when it appears, the render viewport shifts and `toolbox#navigator-toolbox` height automatically increases.

所有回复 (1)

more options

Try to ask at the Firefox CSS subreddit forum.