Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mincss
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
mincss
Commits
79865573
Commit
79865573
authored
11 years ago
by
Taddeüs Kroes
Browse files
Options
Downloads
Patches
Plain Diff
@import now supports full media queries
parent
8933eb72
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
parser.mly
+1
-1
1 addition, 1 deletion
parser.mly
stringify.ml
+2
-2
2 additions, 2 deletions
stringify.ml
types.ml
+1
-1
1 addition, 1 deletion
types.ml
with
4 additions
and
4 deletions
parser.mly
+
1
−
1
View file @
79865573
...
@@ -80,7 +80,7 @@ charset:
...
@@ -80,7 +80,7 @@ charset:
{
Charset
name
}
{
Charset
name
}
import
:
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
)
}
{
Import
(
tgt
,
media
)
}
%
inline
string_or_uri
:
%
inline
string_or_uri
:
|
str
=
STRING
{
Strlit
str
}
|
str
=
STRING
{
Strlit
str
}
...
...
This diff is collapsed.
Click to expand it.
stringify.ml
+
2
−
2
View file @
79865573
...
@@ -80,7 +80,7 @@ let rec string_of_statement = function
...
@@ -80,7 +80,7 @@ let rec string_of_statement = function
|
Import
(
target
,
[]
)
->
|
Import
(
target
,
[]
)
->
"@import "
^
string_of_expr
target
^
";"
"@import "
^
string_of_expr
target
^
";"
|
Import
(
target
,
queries
)
->
|
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
->
"@charset
\"
"
^
charset
^
"
\"
;"
"@charset
\"
"
^
charset
^
"
\"
;"
|
Page
(
None
,
decls
)
->
|
Page
(
None
,
decls
)
->
...
@@ -140,7 +140,7 @@ let rec minify_statement = function
...
@@ -140,7 +140,7 @@ let rec minify_statement = function
|
Import
(
target
,
[]
)
->
|
Import
(
target
,
[]
)
->
"@import "
^
string_of_expr
target
^
";"
"@import "
^
string_of_expr
target
^
";"
|
Import
(
target
,
queries
)
->
|
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
(
None
,
decls
)
->
"@page{"
^
cat
""
minify_declaration
decls
^
"}"
"@page{"
^
cat
""
minify_declaration
decls
^
"}"
|
Page
(
Some
pseudo
,
decls
)
->
|
Page
(
Some
pseudo
,
decls
)
->
...
...
This diff is collapsed.
Click to expand it.
types.ml
+
1
−
1
View file @
79865573
...
@@ -23,7 +23,7 @@ type statement =
...
@@ -23,7 +23,7 @@ type statement =
(* <selectors> { <declarations> } *)
(* <selectors> { <declarations> } *)
|
Media
of
media_query
list
*
statement
list
|
Media
of
media_query
list
*
statement
list
(* @media <queries> { <rulesets> } *)
(* @media <queries> { <rulesets> } *)
|
Import
of
expr
*
string
list
|
Import
of
expr
*
media_query
list
(* @import <target> [<media>]; *)
(* @import <target> [<media>]; *)
|
Charset
of
string
|
Charset
of
string
(* @charset "<charset>"; *)
(* @charset "<charset>"; *)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment