Commit 79865573 authored by Taddeüs Kroes's avatar Taddeüs Kroes

@import now supports full media queries

parent 8933eb72
......@@ -80,7 +80,7 @@ charset:
{ Charset name }
import:
| IMPORT_SYM S? tgt=string_or_uri media=wslist(COMMA, media_type) SEMICOL S?
| IMPORT_SYM S? tgt=string_or_uri media=media_query_list SEMICOL S?
{ Import (tgt, media) }
%inline string_or_uri:
| str=STRING { Strlit str }
......
......@@ -80,7 +80,7 @@ let rec string_of_statement = function
| Import (target, []) ->
"@import " ^ string_of_expr target ^ ";"
| Import (target, queries) ->
"@import " ^ string_of_expr target ^ " " ^ String.concat ", " queries ^ ";"
"@import " ^ string_of_expr target ^ " " ^ cat ", " string_of_media_query queries ^ ";"
| Charset charset ->
"@charset \"" ^ charset ^ "\";"
| Page (None, decls) ->
......@@ -140,7 +140,7 @@ let rec minify_statement = function
| Import (target, []) ->
"@import " ^ string_of_expr target ^ ";"
| Import (target, queries) ->
"@import " ^ string_of_expr target ^ " " ^ String.concat "," queries ^ ";"
"@import " ^ string_of_expr target ^ " " ^ cat "," string_of_media_query queries ^ ";"
| Page (None, decls) ->
"@page{" ^ cat "" minify_declaration decls ^ "}"
| Page (Some pseudo, decls) ->
......
......@@ -23,7 +23,7 @@ type statement =
(* <selectors> { <declarations> } *)
| Media of media_query list * statement list
(* @media <queries> { <rulesets> } *)
| Import of expr * string list
| Import of expr * media_query list
(* @import <target> [<media>]; *)
| Charset of string
(* @charset "<charset>"; *)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment