It’s sometimes hard to do this because oftentimes in electronic music the sound or technique can rely on a quirk of the specific synth or sample. Attack do a great job considering.
They also produce Building Blocks, which is all about music theory and composition and teaches some basic beats (and, more importantly, I think, how to think about beats so that it becomes easier to recreate ones you hear from scratch).
Building Blocks - https://www.audiblegenius.com/
Syntorial - https://www.syntorial.com/
However, I have been playing keys in a Pink Floyd cover band for the last two months, and that process of both learning the parts and, more interestingly, programming patches in my synths to mimic the stuff has been fun. I just programmed the patch for "Brain Damage" this afternoon, and I've been finding various walkthroughs and tutorials very helpful, even if the basic tones (mostly saws and squares with a ladder filter) are pretty easy.
I really like fakebooks, but Youtube has kind of obviated the need for the various textbooks that were popular in the 80s, at least for me.
Ableton have some online content like https://learningmusic.ableton.com/ which is laid out in chapter form and uses https://tonejs.github.io/ for browser synthesis / sequencing etc
Check some of the Ableton chapters a bit more closely though - https://learningmusic.ableton.com/make-basslines/good-life.h... is this not something like you're referring to? Has a grid with the midi notes in place arranged just like you'd see in a DAW. I think they have an exporter for the MIDI into ableton as well
But that doesn't convey the melody/harmony/rhythm, only the sound design.
and some more modern ones like: https://op-forums.com/t/pocket-operations-a-portable-book-of...
Neither of these are online though and would be well suited to it I agree.
A quick search also came up with: http://808.pixll.de/ which has drum patterns uploaded by users for popular songs