Autoprefixer no longer applied when using Flex-Layout or inline styles
See original GitHub issueIt seems vendor prefixes are only applied when the style is defined in a css (or sass) file. But not applied when using inline styles or a library like @angular/flex-layout
Bug Report or Feature Request (mark with an x)
- [x ] bug report
- [ ] feature request
Versions
Angular CLI: 1.5.3 Node: 8.9.1 OS: darwin x64 Angular: 5.0.2 … animations, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, router
@angular/cli: 1.5.3 @angular-devkit/build-optimizer: 0.0.33 @angular-devkit/core: 0.0.20 @angular-devkit/schematics: 0.0.36 @ngtools/json-schema: 1.1.0 @ngtools/webpack: 1.8.3 @schematics/angular: 0.1.5 typescript: 2.4.2 webpack: 3.8.1
Repro steps
- Create project: ng new testproject
- Add @angular/flex-layout library Run: npm install --save @angular/flex-layout Add FlexLayoutModule to imports in app.module.ts
- Add the following html to app.component.html
<div id="1" style="display: flex">Div1</div>
<div id="2" class="flex-css">Div2</div>
<div id="3" fxLayout="row">Div3</div>
- Add the following css in app.component.css
.flex-css{
display:flex;
}
- serve project
Observed behavior
Checking in developer tools we see that only Div2 has vendor prefixes
Desired behavior
All divs should have vendor prefixes
Mention any other details that might be useful (optional)
This is a new issue as it worked in a previous version of the CLI
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (1 by maintainers)
What is the guidance on autoprefixing for Angular library developers? If I add prefixes to the css before I inline it, all consuming apps will be forced to carry all the prefixes even if they don’t need them. If I don’t add them, the consuming app can’t add them because CLI won’t go and autoprefix the inlined css in the library’s components.
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.