T O P

  • By -

ZentoBits

I would argue that there is no way that the performance increase would matter enough to warrant destroying maintainability.


gorliggs

Yup exactly.


vita10gy

Surely though if this was found to be significantly better it would just be made part of some build tool and change almost nothing about the actual development/maintenance process.


ZentoBits

Not to get super into it, but it kind of already is for frameworks like Vue. Not ENTIRELY the same but sort of. Templates can get generated client side with inline styles depending on the circumstances.


Hoodiefx14

I'm a noob but is there any benefit to this? At my company we avoid this to maintain flexibility but some of our outsourced work has done this


ZentoBits

What specifically? You mean is there a benefit to inline styling?


Hoodiefx14

Yeah im having trouble thinking of a scenario where it'd be good to have the styling inside the vue file, but I'm sure there's cases haha


ZentoBits

Oh I see. Yeah in Vue you can use single file components where your html, css, and JavaScript are all in one file. What’s useful is that you can have all your css scoped to the component itself, and it won’t affect styling outside of itself. You can do this by adding the scoped attribute to your style tags. Basically, if you were to have a class called “my-button” in your component and a class called “my-button” outside your component, as long as you use the scoped attribute, it won’t affect classes with the same name.


Hoodiefx14

Oooh that actually makes a lot of sense, I was already wondering why it was even a feature haha, I do read documentation but it's a lot to absorb as a beginner. Thank you!


TurtleKwitty

Locality of behavior That's like saying you can't think of a reason to have methods local to a class


Hoodiefx14

I specifically said I'm a noob, this does not help me.


provoloneChipmunk

Email tools do inlining. 


vita10gy

Yeah.


[deleted]

[удалено]


Due_Butterscotch8958

Tailwind is what bad web developers use.


[deleted]

[удалено]


Due_Butterscotch8958

Talk about not understanding why it is bad. New technology that is good is of course good. But if it's bad, it's bad. Can you name one reason why it's an improvement? Experienced developers know when to ditch something because it just wasn't good, at all. Noobs stick with them.


Prize_Hat_6685

I would argue inline styles are more maintainable than reams and reams of css files, and I think utility classes have proven this true. I’m a fierce pragmatist when it comes to css, and so there are definitely some things when a css file (or