Re:The `hanging-punctuation property` in CSS
by ioulian on Tuesday November 28, 2023 @08:26AM
(#38445451)
ah yes, jQuery. Indeed hide()/show() just set css to display: none/block, but it can vary (inline/flex/...).
CSS is a bit of a mess the last few years, with so many caveats... Just look at why position sticky will sometimes not work: "If you are trying to use position: sticky and it is not working, it is because one of the elements wrapping it is using overflow with a value of hidden, auto or scroll."[1]
But it's weird, it should work, or at least this should be documented somewhere. Also why should overflow: hidden break the functionality... If you know all the caveats of css, then you can safely say "I know CSS".
[1] https://robertmarshall.dev/blog/solution-to-why-css-position...
But after clicking around you realize that it does not anymore. Waaat? Maybe it's related to sidebar visibility changes? You open the inspector and see that .parent is {display:block}. Seems like some jQuery code assumed that display property is either `block` or `none`. Or something. Aaargh. The "sane" attribute of this solution was violated due to its non-locality to the `.rest`. Who could think that changing the display mode for the parent, which is indeed a private property of the parent, would lead to such an issue. You live and you learn css!
(Also, explanations for "intuitive" and/or "logical" are still missing.)