8000 [pull] master from tdewolff:master by pull[bot] · Pull Request #287 · kokizzu/minify · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions css/css.go
8000
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ func (c *cssMinifier) minifyGrammar() {
for {
gt, _, data := c.p.Next()
Next:
fmt.Println(gt, string(data))
switch gt {
case css.ErrorGrammar:
if c.p.HasParseError() {
Expand Down Expand Up @@ -1150,12 +1149,12 @@ func (c *cssMinifier) minifyProperty(prop Hash, values []Token) []Token {
values[0] = minifyColor(values[0])
case Background_Color:
values[0] = minifyColor(values[0])
if c.o.Version >= 3 {
if values[0].Ident == Transparent {
values[0].Data = initialBytes
values[0].Ident = Initial
}
}
//if c.o.Version >= 3 {
// if values[0].Ident == Transparent {
// values[0].Data = initialBytes
// values[0].Ident = Initial
// }
//}
case Border_Color:
sameValues := true
for i := range values {
Expand Down
2 changes: 1 addition & 1 deletion css/css_test.go
69EF
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func TestCSSInline(t *testing.T) {
{"color: hsla(400, 150%, 150%, 2);", "color:#fff"},
//{"color: hwb(0 0% 0%);", "color:red"}, TODO
//{"color: hwb(120 20% 20%/50%);", "color:"}, TODO
{"background-color:transparent", "background-color:initial"},
{"background-color:transparent", "background-color:transparent"},
{"background-position:top", "background-position:top"},
{"background-position:bottom", "background-position:bottom"},
{"background-position:center", "background-position:50%"},
Expand Down
Loading
0