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

233
Views
can i import scss file as variable with js ,like import styles from './index.scss'?

i see antd mobile web import less file into ts file ,since react doesnot support less by default,i want to import scss file into my js file as a variable.The code as follows:

tsx file:

import styles from './demo1.less'

<Grid.Item>
        <div className={styles['grid-demo-item-block']}>A</div>
      </Grid.Item>

less file:

    .grid-demo-item-block {
  border: solid 1px #999999;
  background: #f5f5f5;
  text-align: center;
  color: #999999;
  height: 100%;
}

my file :import styles from './name.scss' console.log(styles): enter image description here

about 4 years ago · Juan Pablo Isaza
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!