Hey gary ,
Hope everythings been fine on your end i know that on one of my previous qiuestions you did mention that you personally do not use flex layout , but i have a very simple question about the property flex-basis, in the moz docs i see the following statement:
This property determines the size of the content-box unless specified otherwise using box-sizing.
mozilla docs here https://developer.mozilla.org/en-US/docs/Web/CSS/flex-basis
what does the part "unless specified otherwise using box-sizing" mean i am not understanding that part really .. can you explain ?
Thank you.
Content vs border box sizing
The content box (which is the default method) is a measure of the inside dimensions of the container. For example, if you make p {width: 10em;}, any padding and border are in addition making the outer dimension larger.
The border box, instead, declares the outer dimension and the border and padding dimensions are subtracted from the inner space.
See MDN box sizing, and CSS3 Basic User Interface Module, ยง3.1.
cheers,
gary
LOL i knew that part ;P
Hey gary thanks i knew that part i was just wondering what the statement
This property determines the size of the content-box unless specified otherwise using box-sizing.
meant ? does it mean that if box-sizing is set to content-box ?
Oh,
It is simply saying that when specifying a flex-basis width, e.g. 10em, the content-box model will be used unless otherwise specified. So, if you want that width to include the padding and border, you will need to specify {box-model: border-box;}.
(Unless I'm completely wrong.) Why don't you test and let us know?
gary
Thanks gary
Sure let me test it . it just sounded so complicated that i was't sure what that statement meant