Closed
Description
Versions
Angular CLI: 1.7.0-rc.0
Node: 7.4.0
OS: win32 x64
Angular: 5.2.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.7.0-rc.0
@angular-devkit/build-optimizer: 0.3.1
@angular-devkit/core: 0.3.1
@angular-devkit/schematics: 0.3.1
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.0-rc.0
@schematics/angular: 0.3.1
@schematics/package-update: 0.3.1
typescript: 2.6.1
webpack: 3.10.0
Repro steps
- Generate default project with @angular/cli (kondi/clicssbug@60b8582)
- Upgrade
@angular/cli
to 1.7.0-rc.0 andtypescript
to 2.5.3 (kondi/clicssbug@8448fe9 and kondi/clicssbug@63ed10e) - Add the following rule to the component stylesheet (kondi/clicssbug@1d12783);
h1::before {
content: 'A: \0041';
}
ng serve --prod
=> "A: A Welcome to app!" (works well)- Upgrade typescript to 2.6.1 (kondi/clicssbug@036e448)
ng serve --prod
=> "A: x00041 Welcome to app!" (buggy build)
Observed behavior
The prod build changes the escaping in the string literal of CSS rule to invalid \x00041
:
h1[_ngcontent-c0]::before {
content: 'A: \x00041';
}
Desired behavior
It should not change the represented value of the string literal.
Mention any other details that might be useful (optional)
- Not prod build => OK
- If cli downgraded to 1.6.x => OK
- If typescript downgraded to 2.5.x => OK
- If scss is used => Not OK
- Same rule inside the global
styles.css
=> OK
The syntax I used in the CSS literal is quite common if you use font icons.