Custom styling the div node with class .CodeMirror-linewidget is not possible right now as all the line widget's have same class name and there is no way to  apply separate styles to each line widgets at the .CodeMirror-linewidget`  ( of course applying custom style to child nodes is possible ). Also the node returned by addLineWidget cannot be used as it can change if another line widget is added to the same line.
Ideally addLineWidget should allow adding custom class name to the line widget so we can target it by .CodeMirror-linewidget.my-custom-class