Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

138
Views
Angular 12 - after update inserted CSS style block ahead of styles.css (bootstrap??) is breaking responsiveness

After upgrading to Angular 12 (12.2.1) from 11 I am getting an injected style block right before my style sheet link

<style>
@charset "UTF-8";@import url(https://fonts.googleapis.com/css?family=Open+Sans);
:root{
--blue:#007bff;
--a bunch of color variables --
line-height:1.5;color:#212529;
text-align:left;background-color:#fff;}
img{border-style:none;}
img{vertical-align:middle;}
img{page-break-inside:avoid;}
@page {size:a3;}
body{min-width:992px!important;}
</style>

<link rel="stylesheet" href="styles.645853d3825cd77dedab.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.645853d3825cd77dedab.css"></noscript>

</head>

That last line (body) is breaking the responsiveness of my pages.

This is only on ng build, it does not appear locally on ng serve. I can not figure out where it is coming from or what module is responsible for making this injection. I am using ng-bootstrap 10 but downgrading it to previous version does not affect the above code block.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Fixed with the answer here: https://stackoverflow.com/a/67582075/382281

just add inclineCritical: false to your angular.json file the particular build.

"optimization": {
  "scripts": true,
  "styles": {
  "minify": true,
  "inlineCritical": false
  }
},
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!