Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@petergriffin yeah, css modules only work when EVERY bit of CSS uses it - what about frameworks that set a couple style properties directly on an element???
-
@natesymer Those frameworks suck. I like to set css variables or data attributes on the element and refer to them in a class. This way the user can eg. patch a margin by changing how the actual CSS is calculated from the library's values.
-
@homo-lorens It's the sane thing to do, but there are cases where a library *needs* to position a div absolutely, and that need makes it impossible to, say, have a child of that div be positioned relative to a parent or ancestor of that div. This is common when implementing a modal/tooltip combo inside a overflow: hidden div.
-
@natesymer Well yeah, but that's a CSS problem, not a library problem. You couldn't do it better even if you had access to the code.
-
@natesymer Well, there is a way now to avoid ALL Javascript/TypeScrip.
I honestlly think that there are only 5 reasons to still use these :
1. Habit. It exists for decades now. It's well known. even jQuery still works. So it's just easy to start with it and roll. Or application cannot be redisgnied (time, workforce, other commercial reasons)
2. Beeing concerned about webassembly performances and long time support. These are valid, but unfounded in my opinion only.
3. Having an axe to grind with any thing Microsoft. This one maybe the stupidest reasons ever. I don't like Linux, I hate doing bash. But the moment I could make a VM with MSSQL on Azure for 200$/month (2x cheaper than windows) I did it. because it was a good thing to do.
4. Not liking C#. Well, in this case wait for the same technology, using another language. WebAssemb;y is language independent.
5. Need to support IE. Nothing to add here -
@natesymer For me, i'm switching 7 years old knockoutjs app to Blazor (server side) right now. So far, only good things. BTW this knockoutjs app outperform react. BIG time (I'm talking 5 times faster). Blazor brings 50xtimes the speed. Same dataset was used.
-
@NoToJavaScript Blazor looks frickin SICK. Would be cool if there was a Haskell version. Holy fuck.
Related Rants
CSS and libraries doesn't mix. Something about the lack of scoping and the unintended side effects that happen from using two different libraries that add inline style via JS. I'm looking at you, position!!!!
rant
css
css sucks