镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Dec 24, 2020. It is now read-only.
This repository was archived by the owner on Dec 24, 2020. It is now read-only.

define empty string variable #181

Open

Description

@vol4ok

I want to define a variable, which could be empty in some cases
@prefix: "";
and to use it like this
src: url("@{prefix}/path/to/something");
the problem is that it compiles into
src: url("""/path/to/something");

How to define an empty string variable, that can be compiled in
src: url("/path/to/something");

Activity

  1. MarianaSilva commented on Dec 19, 2011

    @MarianaSilva

    I have the same issue!
    Try to use @Prefix: " ";

  2. joeldrapper commented on Feb 3, 2012

    @joeldrapper
    @prefix: "";
    header {
        background: url('@{prefix}logo.png');
    }
    

    Works great for me. If that doesn't work you could change it to this which sets it to be empty with javascript.

    @prefix: ~'';

  3. gacekssj4 commented on Jun 17, 2015

    @gacekssj4

    I use:
    @prefix: ;

    and its empty :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions