Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8947273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T12:42:56+00:00 2026-06-15T12:42:56+00:00

Even after reading https://github.com/cloudhead/less.js/issues/212 , I don’t understand the meaning of the @import-once statement.

  • 0

Even after reading https://github.com/cloudhead/less.js/issues/212, I don’t understand the meaning of the @import-once statement.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T12:42:58+00:00Added an answer on June 15, 2026 at 12:42 pm

    When you work with LESS you can have few less files (I have like 12 including media-queries, resets, etc), and sometimes you don’t have the control of how many @import you have done between files, and that’s the reason behind @import-once, to avoid style duplication.

    When should I use @import-once instead @import?

    Suppose you have main.less which imports other less files. And those files all import utils.less that contains useful mixins or variables. When you do this, the mixins get duplicated in the compiled code (css file). Once for each time utils.less was imported, even your CSS file should be 1mb instead 20kb. In case like this one you should use @import-once.

    EDIT:

    As pointed by @TJ, since LESS 1.4.0, @import-once is removed and is now default behavior for @import.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I heard that C# is a rapid application development (RAD) language. Even after reading
I've been reading a MVC 4 SPA at http://www.asp.net/single-page-application/an-introduction-to-spa . Even after reading I'm
Even after studying the examples , I'm having trouble figuring out how to extract
Seems that even after unchecking the option in the PyDev/Debug preferenecs pane to launch
I am working on this code but even after consulting other threads I am
It seems that runClasses() doesn't terminate the code being tested even after the test
My version of node is always v0.6.1-pre even after I install brew node and
The list of all the projects we work stay (even after we close them)
Should entry_set be cached with select_related? My DB is still getting calls even after
may i know the exact usage of getpriority() call used in linux.. even after

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.