Shortcut to create a &lt;link&gt; element specific to CSS

@param aCSSURL
The CSS URL to be referenced
@return Never <code>null</code>.
12008
@Nonnull
  public static HCLink createCSSLink (@Nonnull final ISimpleURL aCSSURL)
  {
    return new HCLink ().setRel (EHCLinkType.STYLESHEET).setType (CMimeType.TEXT_CSS).setHref (aCSSURL);
  }
1233791
public void setUrl(String url) {
        this.url = url;
        
        if (clazz == null && url != null) {
            setClazz(ElementPlugin.class);
        }
    }
806165
@Override
   public String  resolveCSSStyleSheet(String url)
   {
      Log.i(TAG, "resolveCSSStyleSheet("+url+")");
      return getAssetAsString(url);
   }
48137
public static String complateUrl(String baseUrl, String relativePath) {
		baseUrl = normalize(baseUrl, false);
		if (StrUtil.isBlank(baseUrl)) {
			return null;
		}

		try {
			final URL absoluteUrl = new URL(baseUrl);
			final URL parseUrl = new URL(absoluteUrl, relativePath);
			return parseUrl.toString();
		} catch (MalformedURLException e) {
			throw new UtilException(e);
		}
	}
782515
function (cssText) {
            cssText = cssText.replace(/\burl\s*\(\s*["']?([^"'\r\n,]+|[^'\r\n,]+|[^"\r\n,]+)["']?\s*\)/gi, ariaUtilsFunction.bind(function (match, urlpart) {
                var prefixedUrl = ariaCoreAppEnvironment.applicationSettings.imgUrlMapping(urlpart, this.tplClasspath);
                return this._parseImgUrl(prefixedUrl);
            }, this));

            return cssText;
        }
1148453
public T url(String url) {
        if (view!=null) {
            if (view instanceof WebView) {
                ((WebView)view).loadUrl(url);
            }
            if (view instanceof TextView) {
                ((TextView)view).setAutoLinkMask(Linkify.ALL);
                text(url);
            }
        }
        return self();
    }
24170
static SafeHtml principalItem(final String css, final Principal principal) {
        return principal.getRealm() == null ?
                ITEMS.item(css, principal.getName(), principal.getName()) :
                ITEMS.principalWithRealm(css, principal.getName(),
                        principal.getName() + " (at) " + principal.getRealm(), principal.getRealm());
    }
7799
public String updateContextAndGetFavoriteUrl(CmsObject cms) throws CmsException {

        CmsResourceFilter filter = CmsResourceFilter.IGNORE_EXPIRATION;
        CmsProject project = null;
        switch (getType()) {
            case explorerFolder:
                CmsResource folder = cms.readResource(getStructureId(), filter);
                project = cms.readProject(getProjectId());
                cms.getRequestContext().setSiteRoot(getSiteRoot());
                cms.getRequestContext().setCurrentProject(project);
                String explorerLink = CmsVaadinUtils.getWorkplaceLink()
                    + "#!"
                    + CmsFileExplorerConfiguration.APP_ID
                    + "/"
                    + getProjectId()
                    + "!!"
                    + getSiteRoot()
                    + "!!"
                    + cms.getSitePath(folder);
                return explorerLink;
            case page:
                project = cms.readProject(getProjectId());
                CmsResource target = cms.readResource(getStructureId(), filter);
                CmsResource detailContent = null;
                String link = null;
                cms.getRequestContext().setCurrentProject(project);
                cms.getRequestContext().setSiteRoot(getSiteRoot());
                if (getDetailId() != null) {
                    detailContent = cms.readResource(getDetailId());
                    link = OpenCms.getLinkManager().substituteLinkForUnknownTarget(
                        cms,
                        cms.getSitePath(detailContent),
                        cms.getSitePath(target),
                        false);
                } else {
                    link = OpenCms.getLinkManager().substituteLink(cms, target);
                }
                return link;
            default:
                return null;
        }
    }
1320652
public function url_first($css, $attr)
    {
        $nodes = $this->_document->getQuery()->css($css, $this->_node);
        if ($nodes) {
            return $this->_document->absolutizeUrl($nodes->item(0)->getAttribute($attr));
        } else {
            return null;
        }
    }
275795
public BoxWebLink.Info createWebLink(String name, URL linkURL, String description) {
        JsonObject parent = new JsonObject();
        parent.add("id", this.getID());

        JsonObject newWebLink = new JsonObject();
        newWebLink.add("name", name);
        newWebLink.add("parent", parent);
        newWebLink.add("url", linkURL.toString());

        if (description != null) {
            newWebLink.add("description", description);
        }

        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(),
                CREATE_WEB_LINK_URL.build(this.getAPI().getBaseURL()), "POST");
        request.setBody(newWebLink.toString());
        BoxJSONResponse response = (BoxJSONResponse) request.send();
        JsonObject responseJSON = JsonObject.readFrom(response.getJSON());

        BoxWebLink createdWebLink = new BoxWebLink(this.getAPI(), responseJSON.get("id").asString());
        return createdWebLink.new Info(responseJSON);
    }
1272879
public WebhookMessageBuilder setAvatarUrl(String avatarUrl)
    {
        this.avatarUrl = Helpers.isBlank(avatarUrl) ? null : avatarUrl;
        return this;
    }
897444
static String normalizeRootUrl(String rootUrl) {
    Preconditions.checkNotNull(rootUrl, "root URL cannot be null.");
    if (!rootUrl.endsWith("/")) {
      rootUrl += "/";
    }
    return rootUrl;
  }
1160367
function loadCSS(url, callback, fail) {
        var node = DOC.createElement('link');
        node.rel = 'stylesheet';
        node.type = "text/css";

        cssCallback(node, callback, fail);

        node.href = url;
        HEAD.insertBefore(node, BASEELEMENT);
        return $;
    }
892691
function loadCSS(cssURL) {
    var style = document.createElement('link');
    style.type = 'text/css';
    style.media = 'screen';
    style.rel = 'stylesheet';
    style.href = cssURL;
    var head = document.head || document.getElementsByTagName('head')[0];
    head.appendChild(style);
  }
814340
public Selector visitSelector(CSSParser.SelectorContext ctx) {
        if (ctxHasErrorNode(ctx)) {
            statement_stack.peek().invalid = true;
            return null;
        }
        selector_stack.push(new selector_scope());
        cz.vutbr.web.css.Selector sel;
        logEnter("selector");
        selector_stack.peek().s = sel = (cz.vutbr.web.css.Selector) rf.createSelector().unlock();
        if (ctx.IDENT() != null || ctx.ASTERISK() != null) {
            cz.vutbr.web.css.Selector.ElementName en = rf.createElement(cz.vutbr.web.css.Selector.ElementName.WILDCARD);
            if (ctx.IDENT() != null) {
                en.setName(extractTextUnescaped(ctx.IDENT().getText()));
            }
            //log.debug("Adding element name: {}.", en.getName());
            selector_stack.peek().s.add(en);
        }
        for (CSSParser.SelpartContext selpartctx : ctx.selpart()) {
            visitSelpart(selpartctx);
        }

        logLeave("selector");
        selector_stack.pop();
        return sel;
    }
1037261
public void injectUniqueCSS(String cssContent, String wrapperClass)
  {
    if(alreadyAddedCSS == null)
    {
      alreadyAddedCSS = new TreeSet<String>(); 
    }
    
    if(wrapperClass != null)
    {
      cssContent = wrapCSS(cssContent, wrapperClass);
    }
    
    String hashForCssContent = Hashing.md5().hashString(cssContent, Charsets.UTF_8).toString();
    if(!alreadyAddedCSS.contains(hashForCssContent))
    {
//      CSSInject cssInject = new CSSInject(UI.getCurrent());
//      cssInject.setStyles(cssContent);
      Page.getCurrent().getStyles().add(cssContent);
      alreadyAddedCSS.add(hashForCssContent);
    }
  }
562110
public static URL url(final String url) {
        if (url == null) {
            return null;
        }
        try {
            if (url.startsWith("classpath:")) {
                return new URL(null, url, new ClasspathURLStreamHandler());
            }
            return new URL(url);
        } catch (final MalformedURLException ex) {
            throw new IllegalArgumentException("Invalid URL: " + url, ex);
        }
    }