stolksdorf / CleanCSS

CSS beautifier and sorter for Sublime text 2
55 stars 7 forks source link

Hello, CleanCss delete build normalize.css error #17

Open Samlv9 opened 9 years ago

Samlv9 commented 9 years ago

here is output

/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */

html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
body{margin:0}
article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}
audio,canvas,progress,video{display:inline-block;vertical-align:baseline}
audio:not([controls]){display:none;height:0}
[hidden],template{display:none}
a{background-color:transparent}
a:active,a:hover{outline:0}
abbr[title]{border-bottom:1px dotted}
b,strong{font-weight:700}
dfn{font-style:italic}
h1{font-size:2em;margin:.67em 0}
mark{background:#ff0;color:#000}
small{font-size:80%}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sup{top:-.5em}
sub{bottom:-.25em}
img{border:0}
svg:not(:root){overflow:hidden}
figure{margin:1em 40px}
hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}
pre{overflow:auto}
code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}
button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}
button{overflow:visible}
button,select{text-transform:none}
nput[type=reset],button,html input[type=button],input[type=submit]{-webkit-appearance:button;cursor:pointer}
button[disabled],html input[disabled]{cursor:default}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
input{line-height:normal}
input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}
input[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}
input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
legend{border:0;padding:0}
textarea{overflow:auto}
optgroup{font-weight:700}
table{border-collapse:collapse;border-spacing:0}
td,th{padding:0}
html{overflow:auto}
.ui{display:inline-block}
.transform{-webkit-transform:rotate(35deg);-moz-transform:rotate(35deg);-ms-transform:rotate(35deg);-o-transform:rotate(35deg);transform:rotate(35deg);-webkit-transition:all ease-out linear;-moz-transition:all ease-out linear;-o-transition:all ease-out linear;transition:all ease-out linear;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}
.slider{width:550px;height:400px;background:url(../bitmaps/common/non.png) no-repeat 0 0}
.tmpl{width:100px;*zoom:1;*display:none;opacity:1;_width:100px}
.tmpl2{background:url(../bitmaps/common/ui.png) no-repeat 0 0}
/*# sourceMappingURL=templator.min.css.map */

on line 29 it was missing an 'i'.

stolksdorf commented 9 years ago

Do you have the original before you cleaned it?

Samlv9 commented 9 years ago

@stolksdorf yes, i was download normalize.css from github.

i found that when comment like this: a2qu6x 1xnn_ tog9bmh p cleancss will get error output~

stolksdorf commented 9 years ago

Looks like the way my code parses the CSS, it doesn't handle comments and multi-line selector definitions well. To fix this would require quite a substantial change to the CSS processing code, edging on a complete rewrite. CleanCSS does a lazy lexical parsing of the file, and not a true lexical parsing, so edge cases like this will pop up. I'm not really interested in rewriting it, but I always open to pull requests :)

Since this is a bug, I will leave the issue open so people can be aware of it.

Samlv9 commented 9 years ago

Thanks~~~ Soga