3 ms·
Truly there should be no use case for the "inline-" prefixed properties anymore. Your HTML+CSS systems should denote layout strictly from parents ("cascading!")
by Rumudiez 10y ago
Truly there should be no use case for the "inline-" prefixed properties anymore. Your HTML+CSS systems should denote layout strictly from parents ("cascading!") and any exceptions to your rules would exhibit either an unsatisfactory rule or an inconsistent design.
- ezequiel-garzon 10y agoIt's interesting (and reasonable) that cascade has become synonymous with inheritance, while the standard defines it as the process that looks at importance and origin, followed (if necessary) by specificity, followed by order: https://www.w3.org/TR/CSS22/cascade.html#cascade https://www.w3.org/TR/CSS22/cascade.html#cascade
- Rumudiez 10y agoIn my usage I meant to express that a modern system should be constructed similarly to how flexbox and grid determine the "display" property of the selected element's children. If your code constantly requires manual display:inline-block; on elements (and it's not just to override the browser's default stylesheet), then you probably aren't adhering to a consistent pattern and your CSS's maintainability will eventually drop off at an exponential rate. Flexbox enables you to even avoid patterns like .inline-list>li{float:left;}, so sibling-level specificity isn't going to align with best practices anymore in the near future.
- ezequiel-garzon 10y agoOh, I agree with your comment. I guess I should have quoted the part that led to my rather off-the-topic remark: parents ("cascading!") I wonder whether the people who coined the term CSS also had in mind cascading as related to inheritance, or maybe even only this meaning, and later the standards "lawyers" tied the term cascade to the definition I cited. Thanks for replying.
- jonahx 10y agoWhat is the correct way to achieve, say, the example that article uses for inline-flex?