Skip to content

Commit 8985643

Browse files
committed
CSS: fix bug in CSS version, fixes #843
1 parent 260680a commit 8985643

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎css/css.go‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,12 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, params map[stri
147147
if !o.Inline {
148148
o.Inline = params != nil && params["inline"] == "1"
149149
}
150-
if o.Version == 0 && o.KeepCSS2 {
151-
o.Version = 2
150+
if o.Version <= 0 {
151+
if o.KeepCSS2 {
152+
o.Version = 2
153+
} else {
154+
o.Version = 3
155+
}
152156
}
153157

154158
z := parse.NewInput(r)

0 commit comments

Comments
 (0)