2

First of all, I don't know if this question may fit better on another SE site. Please flag if you think it should be migrated.


Background

Leading from my answer at Center fixed div with dynamic width (CSS), I observe on comments that there is a kind of misunderstanding due to the term dynamic with.

There are also over 5k questions on SO regarding this term. On the 90% I reviewed this misunderstanding seems to happen to.

It seems clear for everybody that "dynamic width" refers to adaptable width, but there are at least 2 possible cases:

  1. The element adapts to it's parent width (i.e, width: 90%)
  2. The element adapts to it's content size (i.e., display: inline-block)

The question

There is a consensus at the community for the meaning of dynamic width?

Community
  • 1
  • 1
laconbass
  • 17,080
  • 8
  • 46
  • 54
  • For me dynamic means that it is not defined. So (2) – Gabriele Petrioli Feb 04 '16 at 10:33
  • @GabyakaG.Petrioli "no defined" could be `width: auto` (so adapting to parent) – laconbass Feb 04 '16 at 10:34
  • It really depends on context. A div with width auto means 100%. – Gabriele Petrioli Feb 04 '16 at 10:36
  • i mean not specifically set to a ***value***. Using the docs i mean not having a `length` or `percentage` set (*https://developer.mozilla.org/en/docs/Web/CSS/width#Values*). – Gabriele Petrioli Feb 04 '16 at 10:48
  • (*but this is just **my** perception, not the consensus*) – Gabriele Petrioli Feb 04 '16 at 10:54
  • So: [initial value](https://developer.mozilla.org/en-US/docs/Web/CSS/initial_value) (`auto`) or a *[keyword value](https://drafts.csswg.org/css-box-3/#the-width-and-height-properties)*. This can refer to case (1) or case (2) so makes sense with the background of the question: *both meanings are valid*. – laconbass Feb 04 '16 at 11:07
  • 1
    This question requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details. – Paulie_D Feb 04 '16 at 11:09
  • @Paulie_D while it *generates discussion*, it doesn't require it. Does a consensus exist? A "yes" or "no" referenced to some trustable sources is enought. – laconbass Feb 04 '16 at 11:16
  • 1
    Discussion questions are still off-topic...as are requests for off-site sources. We may *quote* a source when providing answers to specific, answerable, programming issues...which this is not. – Paulie_D Feb 04 '16 at 11:27
  • 1
    @Paulie_D Asking about *the definition of a term* seems very specific, but I know you are meaning if it generates discussion is likely there isn't an specific answer. Thanks for clarification. – laconbass Feb 04 '16 at 12:07
  • @Paulie_D Should the question fit with SO standards asking if *there is a formal definition of the term*? I'm curious about how to ask this while avoiding generating discussion or needing it (thus avoiding go off-topic) – laconbass Feb 04 '16 at 12:35
  • I'm inclined to think not I'd have to think more on it. – Paulie_D Feb 04 '16 at 13:21
  • Sorry about my limitations with english, your last comment sounds [confusing to me](http://meta.stackoverflow.com/questions/278948/is-stack-overflow-over-polite). Have a nice day. – laconbass Feb 05 '16 at 19:00

1 Answers1

1

No, there isn't.

There isn't any source or reference that formally defines the term, thus both cases apply. To avoid misunderstanding, explain on the context of a question or assertion if it refers to the parent or the content.

laconbass
  • 17,080
  • 8
  • 46
  • 54