Basic parser and API extension for media queries