1

So I am just curious if there is any performance difference in transition when using a more general value for specifying what value will be transitioning.

Kinda like when in java (or any other major language) it does not matter how you do certain things and they will be always optimized to same effective code upon compiling.

Not sure if I explained what I mean so here is an example:

//source code
#Element{
    transition: border 0.2s;
}
#Element:hover{
    border-bottom-right-radius: 42px;
}

//effective code
#Element{
    transition: border-bottom-right-radius 0.2s;
}
#Element:hover{
    border-bottom-right-radius: 42px;
}

To sum it up: Is it a bad practice to just use a more general value even thou you can narrow it down to something more specific.

LapisSea
  • 83
  • 1
  • 9

0 Answers0