TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Rules of Margin Collapse

134 点作者 ayoreis超过 1 年前

10 条评论

koromak超过 1 年前
One of those things I&#x27;ve just been subconsciously dealing with for years without ever deciding to actually learn the rules.<p>&quot;Damn it collapsed. Okay padding then&quot;
评论 #37486769 未加载
评论 #37487230 未加载
评论 #37487157 未加载
评论 #37486971 未加载
评论 #37486670 未加载
rado超过 1 年前
Related: new margin-trip property, which helps clear first&#x2F;last margins <a href="https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;margin-trim" rel="nofollow noreferrer">https:&#x2F;&#x2F;developer.mozilla.org&#x2F;en-US&#x2F;docs&#x2F;Web&#x2F;CSS&#x2F;margin-trim</a>
RichieAHB超过 1 年前
Nice article! As with all CSS posts there’s always something in there I’ve never used. Today it was `display: flow-root;` [1]. I’ll probably never use it given Grid and Flex but still interesting to see this may have saved some small headaches in the past.<p>[1] <a href="https:&#x2F;&#x2F;css-tricks.com&#x2F;display-flow-root&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;css-tricks.com&#x2F;display-flow-root&#x2F;</a>
recycledmatt超过 1 年前
Figured I was about to read how fierce competition degraded margins in a highly competitive industry - everyone has their biases
评论 #37490018 未加载
EGreg超过 1 年前
That’s because too many hedge funds and other speculators have been borrowing on margin, and that leads to collapse. Regardless of what rules are set up to regulate this, rampant speculation and bubbles can always destabilize a market and lead to collapse!<p>You see, what happens is that capitalism rewards the greater risktakers and when the success stories have survivor bias you end up with — oh we’re talking about CSS? Sorry, nevermind.
评论 #37486996 未加载
评论 #37486964 未加载
评论 #37488042 未加载
twism超过 1 年前
Big ups for using the same colors as Developer Tools to denote margin, padding, etc
JackMorgan超过 1 年前
I&#x27;ve been in finance too long, my first thought was this is about margin calls on short positions.
评论 #37486603 未加载
评论 #37486487 未加载
dukoid超过 1 年前
I wish there would be a &quot;lower level&quot; language all CSS and HTML could be translated to, so both levels could have a &quot;reasonable&quot; formal specification...
评论 #37487854 未加载
评论 #37488974 未加载
评论 #37490097 未加载
wholesomepotato超过 1 年前
Someone was watching &quot;The Horror Of Margins In CSS&quot; on YT...
评论 #37490100 未加载
hcarvalhoalves超过 1 年前
CSS is a testament to over-engineering.
评论 #37487407 未加载