This problem exhibits itself when viewing css files with @media {…} queries with Kate text editor versions < v3.14. Kate highlights these sections incorrectly with red underline or similar.
The fix for this bug is to add <DetectSpaces/> to the MQEV context of Kate’s css.xml highlighting file so that it parses spaces after @media attribute and before the curly brace correctly.
In Kubuntu 14.04 css.xml is located in /usr/share/kde4/apps/katepart/syntax/css.xml
Edit this file with Kate as follows
kdesudo kate /usr/share/kde4/apps/katepart/syntax/css.xml
Find the second occurrence of “MQEV”