mozilla
Your Search Results

    Template:cssxref

    <%
    // Inserts a link to a CSS entity documentation
    // Appropriate styling is applied.
    //
    // Parameters:
    //
    //  $0 - API name
    //  $1 - name to display (optional)
    //  $2 - anchor (#xyz) (optional)
    
    var lang = env.locale;
    var url = "";
    var str = ($1 || $0);
    
    str = str.toLowerCase();
    url = "/" + lang + "/docs/Web/CSS/" + $0 + $2;
    
    var thisPage = null; // Will be lazy evaluated
    if (!$1) {
        thisPage = wiki.getPage(url); // lazy evaluation
    
        if (page.hasTag(thisPage, "CSS Function")) {
            str += "()";
        }
    }
    
    var summary = "";
    
    
    if (!$2) {
        //if (!thisPage) thisPage = wiki.getPage(url); // lazy evaluation // Disabled to test performance (we get a lot of Kumascript errors)
    
        if (thisPage && thisPage.summary) {
            summary = mdn.escapeQuotes(thisPage.summary);
        } else {
            summary = "The documentation about this has not yet been written; please consider contributing!";
        }
    }
    
    var entry = "<a href=\"" + url + "\"" + (summary?" title=\""+summary+"\"":"") + "><code>" + str + "</code></a>";
    
    
    %><%- entry %>
    Search for pages that use Template:cssxref to see example use cases and how many pages use this macro.

    Document Tags and Contributors

    Tags: 
    Last updated by: teoli,