-moz-stack-sizing

-moz-stack-sizing

Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

-moz-stack-sizing is an extended CSS property. Normally, a stack will change its size so that all of its child elements are completely visible. For example, moving a child of the stack far to the right will widen the stack so the child remains visible.

If you wish to prevent the stack from resizing automatically to accommodate its children, you can set -moz-stack-sizing to ignore on the child element. The property is set not on the stack itself, but on the stack's children. This lets you ignore certain children, but not others.

Note: In previous versions of Gecko it was possible to work around the problem by setting very large negative bottom and right margins on the stack element and equally large positive bottom and right margins on the children whose size you didn't want to ignore. (The problem does not affect children moved above or to the left of the stack.)

Initial value stretch-to-fit
Applies to all elements
Inherited yes
Media visual
Computed value as specified
Animation type discrete
Canonical order the unique non-ambiguous order defined by the formal grammar

Syntax

/* Keyword values */
-moz-stack-sizing: stretch-to-fit;
-moz-stack-sizing: ignore;

/* Global values */
-moz-stack-sizing: inherit;
-moz-stack-sizing: initial;
-moz-stack-sizing: unset;

Values

stretch-to-fit
The child will influence the stack's size.
ignore
The stack won't consider this child when calculating the its size.

Formal syntax

ignore | stretch-to-fit

Examples

.mainsheet {
  -moz-stack-sizing: ignore;
}

See also

bug 346189

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-stack-sizing

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部