You can write a keylogger in pure CSS
twitter.com
twitter.com
You can uses CSS as part of a keylogger in conjunction with Javascript that triggers your selectors based on keypresses.
There are sites that already ship javascript that change attributes that trigger selectors on certain keypress events. So by adding 'pure css' to these sites one would be able to log keystrokes on certain fields.
One example is Instagram. It ships Javascript that changes suitable attributes of the password field on every keystroke. So adding the right CSS to Instagram could result in passwords being logged.
It also won't work on vanilla html inputs, it has to be controlled by javascript in which case the javascript already has access to this information anyway (and much more).