-1

I created a basic program that can make it easy to write css, make it more easy to debug and take less space.

A basic animation looks like this :

$moveLeftRight|l;r|5px;0|6px;None|

Basic css Style:

.black-square-with-rounded-corners{
  bg:black;
  h-w:5vh;
  br:2em;
}

It can save a ton of space. When server gets request for it compiles it to css. I am new to back-end development, for this i wanted to know which one is more expensive and also is it a good idea?

Paulie_D
  • 107,962
  • 13
  • 142
  • 161
  • 1
    This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a specific, answerable, programming issue, please provide full details. – Paulie_D Apr 07 '22 at 15:45

2 Answers2

0

Generally, space is cheaper than time in programming. That said, in networking, it can often by highly advantageous to limit the size of your files through compression of some sort. It sounds to me like this is what you are doing.

If your program essentially compresses CSS, then the metric I’d use isn’t space, but time. Specifically, load time. How fast does your web application load with and without your changes?

Ultimately “large” network calls are not actually that big for modern storage. 100MB will probably take a while to fully load from a network, but it won’t break my hard drive.

smcjones
  • 5,490
  • 1
  • 23
  • 39
0

I doubt another DSL on top of CSS would make it easier to write and debug, so you are just trading the space cost for the development cost. Not to mention runtime compilation means you have to implement your own caching logic on the application level.
And it's not much of a gain, since CSS (even with bootstrap-tier bloat) is a drop in the ocean compared to megabytes of (potentially uncacheable) javascript brought by advertisement modules.

Biller Builder
  • 303
  • 3
  • 10