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

215
Views
How to import a PostCSS variable into another PostCSS file with absolute url in React

enter image description here

I have src folder in the root directory, and I wanna import a variable in common/colors.css into components/header.module.css.

So in header.module.css, I tried @value green from "/common/colors.css"; but it didn't work.

With relative url instead, @value green from "../../common/colors.css"; worked.

How can I achieve this with absolute url?

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

0

This might not be the exact answer you're looking for but one option would be to move your colors.css into the public directory.

Then you could @value green from "/common/colors.css"

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!