Yes, but this enables it to be reused in other contexts, where the names "up" and "down" would not make much sense, but you would like to have the same border style for some reason.
Plus, you could turn this into a mixin "function", with the actual colors of the states changed depending on where you include it.
So the way he writes it, you could have a green, blue, whatever version of those borders, with the same one line (plus a parameter), whereas in CSS you would have to do:
Plus, you could turn this into a mixin "function", with the actual colors of the states changed depending on where you include it.
So the way he writes it, you could have a green, blue, whatever version of those borders, with the same one line (plus a parameter), whereas in CSS you would have to do:
up-blue, up-red, up-green, down-blue, down-red, down-green etc classes.