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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:19:34+00:00 2026-06-16T00:19:34+00:00

I am trying to customize Twitter Bootstrap’s CSS without altering local copies of the

  • 0

I am trying to customize Twitter Bootstrap’s CSS without altering local copies of the bootstrap code.* So I have cloned the Twitter Bootstrap project into one folder and have my application code within its own folder:

/html
    /bootstrap
       ...etc...
       /js
       /less
    /MyApp
       ...etc...
       /common_files
          /less
             style.less

Within my “style.less” file, I define a few LESS variables, then include the bootstrap files:

/* custom settings that deviate from Bootstrap's default values */
@sansFontFamily: Trebuchet MS, Tahoma, sans-serif, Arial;
@baseFontSize: 11px;
@baseLineHeight: 18px;

/* import bootstrap components from bootstrap-dedicated folder */
@import "../../../bootstrap/less/bootstrap.less";
@import "../../../bootstrap/less/responsive.less";

Since LESSCSS variables are really constants, I’m surprised that my @sansFontFamily is not getting picked up when I compile the LESS files into CSS: lessc style.less > MyApp.css --yui-compress

So…what am I missing? Why are my variables being overwritten by the variables defined within Bootstrap’s LESS files?

*–I have checked out “Twitter Bootstrap Customization Best Practices“, but think taking advantage of constants would be a better approach (if I can get it to work).

  • 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-16T00:19:35+00:00Added an answer on June 16, 2026 at 12:19 am

    The correct approach is to import the bootstrap assets first, then define the custom values with LESS variables. So, given the directory structure in the question:

    If you’re using Bootstrap version 2.x:

    /* import bootstrap components from bootstrap-dedicated folder */
    @import "../../../bootstrap/less/bootstrap.less";
    @import "../../../bootstrap/less/responsive.less";
    
    /* custom settings that deviate from Bootstrap's default values */
    @sansFontFamily: Trebuchet MS, Tahoma, sans-serif, Arial;
    @baseFontSize: 11px;
    @baseLineHeight: 18px;
    

    If you’re using Bootstrap version 3.x:

    /* import bootstrap components from bootstrap-dedicated folder */
    @import "../../../bootstrap/less/bootstrap.less";
    
    /* custom settings that deviate from Bootstrap's default values */
    @font-family-sans-serif: Trebuchet MS, Tahoma, sans-serif, Arial;
    @font-size-base: 11px;
    @line-height-base: 18px;
    

    Complete list of variables can be found in variables.less file.

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

Sidebar

Related Questions

I'm having a few issues with trying to customize Twitter Bootstrap for my rails
Trying to customize Symfony2 form to produce html code looking like the following example:
I am trying to customize the font of a UITableViewCell using the following code
I am trying to customize the installation of JasperServer. I have downloaded the source.
I was using twitter bootstrap for interest. And these days I was trying to
Possible Duplicate: How to use Twitter Bootstrap popovers for jQuery validation notifications? Trying to
I have been trying to customize a navigation bar in an iPhone app. I
I am trying to customize the moreNavigationController in a UITabBarController. I have been reading
I'm using the Twitter Bootstrap (v2.1.1) and trying to customise the position/alignment of the
I'm trying to customize the Windows Forms Designer's code generation for InitializeComponent . The

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.