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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:21:03+00:00 2026-05-28T04:21:03+00:00

In Less , it seems almost impossible to use @font-face selector. Less gives errors

  • 0

In Less, it seems almost impossible to use @font-face selector. Less gives errors when I try to use

font-family: my_font

Here is how I try to use it:

@font-face {
    font-family: my_font;
    src: url('http://contest-bg.net/lg.ttf');
}
p {
    font-family: my_font, "Lucida Grande", sans-serif;
}

There is simple escape in Less using ~"..." but can’t come up with working code.
Had someone used it successfully?

  • 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-28T04:21:03+00:00Added an answer on May 28, 2026 at 4:21 am

    Have you tried putting the font family name in single quotes? The following works just fine for me.

        @font-face {
            font-family: 'cblockbold';
            src: url('assets/fonts/creabbb_-webfont.eot');
            src: url('assets/fonts/creabbb_-webfont.eot?#iefix') format('embedded-opentype'),
                 url('assets/fonts/creabbb_-webfont.woff') format('woff'),
                 url('assets/fonts/creabbb_-webfont.ttf') format('truetype'),
                 url('assets/fonts/creabbb_-webfont.svg#CreativeBlockBBBold') format('svg');
            font-weight: normal;
            font-style: normal;
    
        }
    

    To use font as a mixin, try:

    .ffbasic() {
        font-family: ff-basic-gothic-web-pro-1,ff-basic-gothic-web-pro-2, AppleGothic, "helvetica neue", Arial, sans-serif;
    }
    

    then within a style declaration:

    .your-class {
         font-size: 14px;
         .ffbasic();    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is seems that Session Replication in ColdFusion servers less that 9 was considered not
The Emacs cperl-mode seems to get confused less than perl-mode, but the Skittles effect
In the following examples: the first seems more verbose but less wasteful of resources
Is it less efficient to use TEXT than varchar in an SQL database? If
The title more or less sums it up. We use MS TFS as our
I have a user-uploaded image (almost always a JPEG) that I'd like to use
How much less libraries are there for Mono than for Java? I lack the
Title more or less says it all. Specifically, I've become increasingly annoyed that in
How much less efficient would it be to store some fields as a BigDecimal
Are they less vulnerable to SQL injection than doing stuff like mysql_query(SELECT important_data FROM

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.