News for hackers. Stuff that matters.
Re:Mergiraf: a syntax-aware merge driver for Git by soulofmischief on Saturday November 09, 2024 @07:16AM (#42094000)
I sort my CSS by property type (display, size, position, etc). Takes a while to get used to it but it definitely speeds up my ability to do CSS surgery.
Re:Mergiraf: a syntax-aware merge driver for Git by wonger_ on Saturday November 09, 2024 @08:10AM (#42094222)
Similarly, I've been wanting to make an autoformatter that reorders CSS properties into these categories: https://9elements.com/css-rule-order/ (box model, positioning, typography, etc)

I think it's the most useful CSS organization method I've found yet.

Re:Mergiraf: a syntax-aware merge driver for Git by fallingsquirrel on Saturday November 09, 2024 @08:33AM (#42094323)
Re:Mergiraf: a syntax-aware merge driver for Git by p4bl0 on Saturday November 09, 2024 @11:01AM (#42095095)
This is what I've always done naturally for the 20+ years I've been writing CSS. The only difference is that I put animation at the end, probably because it came much later than the rest.
Re:Mergiraf: a syntax-aware merge driver for Git by soulofmischief on Sunday November 10, 2024 @10:31AM (#42100696)
Yeah, it really helps out, and I just head each section with a comment for fast grepping and grokking. My system combines a lot of things into the Display category which could be split out but I think I've struck a good enough balance.