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 4239842
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:05:17+00:00 2026-05-21T03:05:17+00:00

I have this structure of my files: lib/css/… contains my styles divided into single

  • 0

I have this structure of my files:

lib/css/... contains my styles divided into single .less files for each kind of area.

lib/style.less is the file I want to gather my sub-style files into – and the file I want to be linked into the HTML.

When I type in (into style.less):

@import url("/css/StyleToImport.less");

or

@import "/css/StyleToImport.less";

… I get a syntax error.

Is it really impossible to combine .less files into a single file?

It could be really handy to have 1 single file to contain all variables for colors, dimensions etc.

But as it is now, I have to use <link ...> tags in HTML to every single file – which is not so handy.

P.S. I have read Join two .less files into one css file

and I have read this:

Importing

Importing works pretty much
as expected. You can import a .less
file, and all the variables in it will
be available. If the file is a .less,
the extension is optional:

@import “library”;

@import “typo.css”;

  • 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-05-21T03:05:18+00:00Added an answer on May 21, 2026 at 3:05 am

    I just tried this on my local environment, putting vars into vars.less and mixins into conf.less. The file structure similar to yours, with the base .less file a level below the folder containing all the ‘includes’.

    So I had css folder which had my main.less file and then css/less/vars.less | conf.less

    To import both of those:

    @import "less/vars.less";
    @import "less/conf.less";
    

    My only answer is to remove the first / in your @import statement. I had similar problems when trying to import a google font into my .less file.

    Worth a shot at least, because using the same structure as yours mine is working.

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

Sidebar

Related Questions

This is annoying. I have a directory structure like this -lib --some jar files
I have a directory structure of package/bin and package/lib, where package/lib contains jar files
I have a python project with this directory structure and these files: /home/project_root |---__init__.py
I have an xml file that contains a structure.. In this structure, I have
I have a directory structure like this: --bin/ --lib/ --data/ So basically, the executable
I have a directory structure D:\workspace 2\project\lib where I have all the files AgentMain.java(which
I have a Django structure like this (only showing libs): project/lib/ # Global libraries
I have this file structure: folderIWantStuffIn/ - old_stuff Now I want to add some
I have a file with structure like this: [05:58:10 08.12.1990] 125.441 [05:58:21 08.12.1990] -2.4158
I have this structure on form, <input type=test value= id=username /> <span class=input-value>John Smith</span>

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.