WordPress.org

Ready to get started?Download WordPress

Forums

WP-LESS
[resolved] Trying to compile Twitter Bootstrap (4 posts)

  1. syndrael
    Member
    Posted 2 years ago #

    Hello,
    I'm trying to compile Twitter Bootstrap in LESS mode.
    I get a parse error in mixins.less, it's due to the second line

    .spanX (@index) when (@index > 0) {
          (~".span@{index}") { .span(@index); }
          .spanX(@index - 1);
        }

    I think the problem comes from @{index}
    After commenting this line (for testing), the same behaviour appears for the same syntax.
    Could you help me ?
    Best regards from Paris, France.
    S.

    http://wordpress.org/extend/plugins/wp-less/

  2. syndrael
    Member
    Posted 2 years ago #

    In http://lesscss.org/#-mixins we can read
    String interpolation
    Variables can be embeded inside strings in a similar way to ruby or PHP, with the @{name} construct:

    @base-url: "http://assets.fnord.com";
    background-image: url("@{base-url}/images/bg.png");

    Is the feature supported by WP-Less ?
    Best regards
    S.

  3. syndrael
    Member
    Posted 2 years ago #

    Or may be escaping string is the problem...
    (~".span@{index}")
    S.

  4. syndrael
    Member
    Posted 2 years ago #

    I've found something interesting..
    WP-Less is based on lessphp.. but the plugin include lessphp v0.3.1.
    By changing it by lessphp v0.3.5 (download page), there is no more error message.
    I don't say that every is ok to add Twitter Bootstrap LESS version in WordPress, but my investigations are going on..

    Closed topic for me.

    Best regards

    S.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic