2

I'm using "@angular/cli": "~13.3.0", "primeflex": "^3.1.3",

i've done the installation

npm install primeflex --save

and then added to angular.json file

      "node_modules/primeflex/primeflex.css"
 

my Html as follows:

<div class="card">
<div class="card-container yellow-container overflow-hidden">
<div class="flex">
<div class="flex align-items-center justify-content-center bg-yellow-500 font-bold text-gray-900 m-2 px-5 py-3 border-round">Prime</div>
<div class="flex align-items-center justify-content-center bg-yellow-500 font-bold text-gray-900 m-2 px-5 py-3 border-round">Prime and PrimeFlex</div>
<div class="flex align-items-center justify-content-center bg-yellow-500 font-bold text-gray-900 m-2 px-5 py-3 border-round">Lorem ipsum dolor sit amet</div>
</div>
<div class="flex">
<div class="flex-1 flex align-items-center justify-content-center bg-yellow-500 font-bold text-gray-900 m-2 px-5 py-3 border-round">Prime</div>
<div class="flex-1 flex align-items-center justify-content-center bg-yellow-500 font-bold text-gray-900 m-2 px-5 py-3 border-round">Prime and PrimeFlex</div>
<div class="flex-1 flex align-items-center justify-content-center bg-yellow-500 font-bold text-gray-900 m-2 px-5 py-3 border-round">Lorem ipsum dolor sit amet</div>
</div>
</div>
</div>

the div align correctly however with no colors and styling as follows:

enter image description here

any idea what would be the issue?

1 Answer 1

2

Your code is working but missing a theme, this is why you can see the spacing but no colors

I was stuck for a while and then read on the docs that it does not come with colors, so you need to add a theme, after adding one you can see the colors here https://stackblitz.com/edit/angular-ivy-gtnzrg?file=src%2Fstyles.css

added mine on index.css however

Sign up to request clarification or add additional context in comments.

1 Comment

yes you were right I added <link rel="stylesheet" href="unpkg.com/[email protected]/themes/saga-blue.css"> to the index.html in the angular project and it worked

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.