angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Bad CSS minification

Open cpa-level-it opened this issue 9 years ago • 3 comments

OS?

Windows 10.

Versions.

angular-cli: 1.0.0-beta.24 node: 6.9.4 os: win32 x64 @angular/common: 2.4.1 @angular/compiler: 2.4.1 @angular/compiler-cli: 2.4.1 @angular/core: 2.4.1 @angular/forms: 2.4.1 @angular/http: 2.4.1 @angular/platform-browser: 2.4.1 @angular/platform-browser-dynamic: 2.4.1 @angular/platform-server: 2.4.1 @angular/router: 3.4.1

Repro steps.

Use the following css

.mdl-checkbox.is-checked .mdl-checkbox__tick-outline {
    background: rgb(33,150,243)url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiI…lsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K);
}

The log given by the failure.

/

Mention any other details that might be useful.

The generated css when serving the application with ng serve -prod is this

.mdl-checkbox.is-checked .mdl-checkbox__tick-outline {
    background: #2196f3url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiI…lsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K);
}

As you can see the part rgb(33,150,243) is converted to #2196f3 which makes the css rule invalid. The css come from material design light.

cpa-level-it avatar Jan 19 '17 15:01 cpa-level-it

There should probably be a space in the original css.

The CLI uses cssnano (https://github.com/ben-eb/cssnano) for minification. You could try opening an issue there.

clydin avatar Jan 19 '17 15:01 clydin

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.