Show Sidebar Log in
Commons In A Box Logo
  • Home
  • About
    • Project Team
    • Logos and Graphics
  • Showcase
    • CBOX Classic Showcase
    • CBOX OpenLab Showcase
  • Demo
  • Get Started
  • Documentation
    • Technical Guide
    • CBOX Classic Guide
    • CBOX OpenLab Guide
  • Support Forums
    • CBOX Classic
    • CBOX OpenLab
    • Developers Forum
  • News

Group Admins

  • Profile picture of Scott Voth

CBOX Classic Support

Public Group active 4 months ago

This group provides support for Commons In A Box Classic, our original software for community-building. Register for an account or log in to commonsinabox.org, then join the group and post your question here.

Using LESS with a CBOX child theme?

Tagged: css, LESS

  • This topic has 2 replies, 2 voices, and was last updated 10 years, 10 months ago by Christian Wach.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • May 21, 2014 at 12:35 pm #4751
    Jonathan
    Participant

    In the CBOX child theme’s style.css, there’s a comment line that reads:

    CBOX combines all the stylesheets into one file called dynamic.css. You can also write CSS using LESS.

    Yet I can’t find anything about using LESS with a CBOX theme. Writing LESS in style.css or in assets/css/ doesn’t seem to be compiled to CSS. How can I use LESS with a CBOX child theme?

    July 1, 2014 at 2:47 pm #4884
    Jonathan
    Participant

    Does this comment refer to a feature that no longer exists in CBOX?

    July 2, 2014 at 6:46 am #4885
    Christian Wach
    Participant

    @jreeve Sounds like the comment is a bit misleading. I have got LESS working here, but not without a bit of jiggery-pokery.

    Grepping the cbox-theme code for ‘lessc’ and ‘ICE_Less’ will show you how and where the theme engine tries to parse LESS files. However, before you can work with LESS, there’s a bug in the theme engine that needs fixing. I’ve just created a PR on Github which will show you the fix.

    Your LESS files will need inclusion via ‘features.ini’ and ‘infinity.ini’ and need to have the ‘.less’ file extension for them to be compiled into ‘dynamic.css’. So, in ‘features.ini’, add:

    [child-theme-less-example]
    type = "default"
    title = "Child Theme LESS Example"
    style = "assets/css/test.less"

    And in ‘infinity.ini’ add:

    [feature]
    child-theme-less-example = on

    Then add ‘test.less’ LESS file to your child theme’s ‘assets/css’ directory. Switch ‘INFINITY_DEV_MODE’ to true and you should see your compiled CSS appear in ‘dynamic.css’.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In
Group logo of CBOX Classic Support
  • Home
  • Forum
  • Announcements
  • Docs
  • Members 287
  • Send Invites

Groups

Newest | Active | Popular | Alphabetical
  • Group logo of CBOX Classic Support
    CBOX Classic Support
    287 members
  • Group logo of CBOX Pioneers
    CBOX Pioneers
    71 members
  • Group logo of CBOX Developers
    CBOX Developers
    40 members
  • Group logo of CBOX OpenLab Support
    CBOX OpenLab Support
    22 members
  • Group logo of CBOX-OL Testing Partners
    CBOX-OL Testing Partners
    12 members

CBOX has its roots in the CUNY Academic Commons, which in turn was made possible through funding from The City University of New York itself.

CUNY Logo

CUNY Academic Commons Logo

City Tech logo

The Commons In A Box was made possible through the generous support of the Alfred P. Sloan Foundation.

Alfred P. Sloan Foundation Logo

NEH Logo

The CUNY Graduate Center has directly contributed to the CUNY Academic Commons, housing the project since its inception, and has contributed to CBOX through its GC Digital Initiatives.

CUNY Graduate Center Logo

CUNY Graduate Center Digital Initiatives Logo

Powered by Commons In A Box
css.php
Skip to toolbar
  • About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
  • Log In
  • Register