question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autoprefixer no longer applied when using Flex-Layout or inline styles

See original GitHub issue

It 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:closed
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
agent613commented, Nov 27, 2017

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.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack Compilation with Postcss fail because not find scss ...
I resolved it with sass-loader applying the following rule for scss in the webpack.config.common.js: { test: /\.component\.(css|sass|scss)$/ ...
Read more >
Backwards compatibility of flexbox - CSS - MDN Web Docs
Once an inline-block item becomes a flex item, it is block ified and so behavior of display: inline-block like preserving white space between ......
Read more >
A Complete Guide to Flexbox | CSS-Tricks
Our comprehensive guide to CSS flexbox layout. This complete guide explains everything about flexbox, focusing on all the different possible ...
Read more >
State of CSS 2022 - web.dev
Colorful lettering using a Colr Font saying State of CSS 2022 ... This function can be used for more than just text color,...
Read more >
Web Development Tips - Mark Volkmann
For information about fundamental web topics like HTML, CSS, and JavaScript that are not covered here, or to get more detail on topics...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found