I've added a small 12V LED light strip to my 3D printer which has 24VDC output. The LEDs have current limiting resistors and with the spec sheet I estimated the current draw to be 200mA. I had a L7812CV laying around, and I looked at its datasheet (https://www.st.com/resource/en/datasheet/l78.pdf). It is a 12VDC regulator supporting 40VDC max input and 1.5A max current. Since my estimated current was 200mA, I assumed there would be so little heat generated that it wasn't worth computing. I plugged it in with an ammeter inline. The LEDs were the expected brightness, and it was indeed drawing 200mA at 12V, but within a minute or so the L7812CV was too hot to touch, so I turned it off and added a resistor in series to reduce the current to 60mA until I figure out what was wrong.
My question is, how could I have known by looking at the datasheet that using the L7812CV to drop the voltage from 24V to 12V at 200mA would have produced temps above 130F/55C?