Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mincss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
mincss
Commits
79865573
Commit
79865573
authored
Jul 16, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
@import now supports full media queries
parent
8933eb72
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
parser.mly
parser.mly
+1
-1
stringify.ml
stringify.ml
+2
-2
types.ml
types.ml
+1
-1
No files found.
parser.mly
View file @
79865573
...
...
@@ -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
}
...
...
stringify.ml
View file @
79865573
...
...
@@ -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
)
->
...
...
types.ml
View file @
79865573
...
...
@@ -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>"; *)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment