See icons.scss for defined icons/classes
353463
def action_icon_label(action, url, title, options={}, label = true)
      options[:title] = title
      options[:class].presence ? options[:class] << " #{action}_icon " : options[:class] = "#{action}_icon"
      options[:class] << ' icon_label' if label

      case action
      when :preview
        options[:target] = '_blank'
      when :delete
        options[:method] = :delete
      when :reorder_done
        options[:class] << ' hidden'
      end

      link_to(label && title || '', url, options)
    end
470486
function(stylesheet, refresh){
		if( icons && !refresh ){
			return icons;
		}

		icons = {};

		// get grunticon stylesheet by its href
		var svgss,
			rules, cssText,
			iconClass, iconSVGEncoded, iconSVGRaw;

		svgss = stylesheet.sheet;

		if( !svgss ){ return icons; }

		rules = svgss.cssRules ? svgss.cssRules : svgss.rules;
		for( var i = 0; i < rules.length; i++ ){
			cssText = rules[ i ].cssText;
			iconClass = selectorPlaceholder + rules[ i ].selectorText;
			iconSVGEncoded = cssText.split( ");" )[ 0 ].match( /US\-ASCII\,([^"']+)/ );
			if( iconSVGEncoded && iconSVGEncoded[ 1 ] ){
				iconSVGRaw = decodeURIComponent( iconSVGEncoded[ 1 ] );
				icons[ iconClass ] = iconSVGRaw;

			}
		}
		return icons;
	}
715761
public void setIcon(String iconClasses, String detailIconClasses) {

        m_iconPanel.setVisible(true);
        HTML iconWidget = new HTML();
        m_iconPanel.setWidget(iconWidget);
        iconWidget.setStyleName(iconClasses + " " + m_fixedIconClasses);
        // render the detail icon as an overlay above the main icon, if required
        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(detailIconClasses)) {
            iconWidget.setHTML(
                "<span class=\""
                    + detailIconClasses
                    + " "
                    + I_CmsLayoutBundle.INSTANCE.listItemWidgetCss().pageDetailType()
                    + "\"></span>");
        }
    }
426559
function () {
        var self = this, prefix = self.classPrefix, icon = '', closeButton = '', progressBar = '', notificationStyle = '';

        if (self.icon) {
          icon = '<i class="' + prefix + 'ico' + ' ' + prefix + 'i-' + self.icon + '"></i>';
        }

        if (self.color) {
          notificationStyle = ' style="background-color: ' + self.color + '"';
        }

        if (self.closeButton) {
          closeButton = '<button type="button" class="' + prefix + 'close" aria-hidden="true">\u00d7</button>';
        }

        if (self.progressBar) {
          progressBar = self.progressBar.renderHtml();
        }

        return (
          '<div id="' + self._id + '" class="' + self.classes + '"' + notificationStyle + ' role="presentation">' +
          icon +
          '<div class="' + prefix + 'notification-inner">' + self.state.get('text') + '</div>' +
          progressBar +
          closeButton +
          '</div>'
        );
      }
280635
public function getAwesomeIconCSS()
    {
        // Initialise Variables:
        
        $css = array();
        
        // Obtain Default ModelAdmin Icon:
        
        $dma_icon = Config::inst()->get('ModelAdmin', 'menu_icon', Config::FIRST_SET);
        
        // Obtain Viewable Menu Items:
        
        $menu_items = CMSMenu::get_viewable_menu_items();
        
        // Iterate Viewable Menu Items:
        
        foreach ($menu_items as $class => $item) {
            
            // Obtain Bitmap Icon:
            
            $bmp_icon = Config::inst()->get($class, 'menu_icon', Config::FIRST_SET);
            
            // Does this class have an awesome icon?
            
            if ($icon = Config::inst()->get($class, 'awesome_icon', Config::FIRST_SET)) {
                
                // Fix the prefix of the icon class name:
                
                $icon = $this->prefix($icon);
                
            } elseif ($class == 'Help') {
                
                // The icon for the Help menu item:
                
                $icon = 'fa-question-circle';
                
            } elseif ($bmp_icon == $dma_icon) {
                
                // Replace default ModelAdmin icon:
                
                $icon = 'fa-database';
                
            } else {
                
                // By default, fallback to the bitmap icon:
                
                $icon = false;
                
            }
            
            // Define CSS for this icon:
            
            if ($icon) {
                
                // Disable Bitmap Icon:
                
                $css[] = ".icon.icon-16.icon-" . strtolower($class) . " {";
                $css[] = "  background-image: none !important;";
                $css[] = "}";
                
                // Enable Awesome Icon:
                
                $css[] = ".icon.icon-16.icon-" . strtolower($class) . ":before {";
                $css[] = "  content: \"\\" . $this->getIconUnicode($icon) . "\";";
                $css[] = "}";
                
            }
        }
        
        // Answer CSS String:
        
        return implode("\n", $css);
    }
1363343
def external_icon(path, options = {})
      classes = _icon_classes(options) + ["external-icon"]

      if path.split(".").last == "svg"
        asset = Rails.application.assets_manifest.find_sources(path).first
        asset.gsub("<svg ", "<svg class=\"#{classes.join(" ")}\" ").html_safe
      else
        image_tag(path, class: classes.join(" "), style: "display: none")
      end
    end
218584
function () {
        var self = this, id = self._id, settings = self.settings, prefix = self.classPrefix, text = self.state.get('text');
        var icon = self.settings.icon, image = '', shortcut = settings.shortcut;
        var url = self.encode(settings.url), iconHtml = '';

        // Converts shortcut format to Mac/PC variants
        function convertShortcut(shortcut) {
          var i, value, replace = {};

          if (Env.mac) {
            replace = {
              alt: '&#x2325;',
              ctrl: '&#x2318;',
              shift: '&#x21E7;',
              meta: '&#x2318;'
            };
          } else {
            replace = {
              meta: 'Ctrl'
            };
          }

          shortcut = shortcut.split('+');

          for (i = 0; i < shortcut.length; i++) {
            value = replace[shortcut[i].toLowerCase()];

            if (value) {
              shortcut[i] = value;
            }
          }

          return shortcut.join('+');
        }

        function escapeRegExp(str) {
          return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
        }

        function markMatches(text) {
          var match = settings.match || '';

          return match ? text.replace(new RegExp(escapeRegExp(match), 'gi'), function (match) {
            return '!mce~match[' + match + ']mce~match!';
          }) : text;
        }

        function boldMatches(text) {
          return text.
            replace(new RegExp(escapeRegExp('!mce~match['), 'g'), '<b>').
            replace(new RegExp(escapeRegExp(']mce~match!'), 'g'), '</b>');
        }

        if (icon) {
          self.parent().classes.add('menu-has-icons');
        }

        if (settings.image) {
          image = ' style="background-image: url(\'' + settings.image + '\')"';
        }

        if (shortcut) {
          shortcut = convertShortcut(shortcut);
        }

        icon = prefix + 'ico ' + prefix + 'i-' + (self.settings.icon || 'none');
        iconHtml = (text !== '-' ? '<i class="' + icon + '"' + image + '></i>\u00a0' : '');

        text = boldMatches(self.encode(markMatches(text)));
        url = boldMatches(self.encode(markMatches(url)));

        return (
          '<div id="' + id + '" class="' + self.classes + '" tabindex="-1">' +
          iconHtml +
          (text !== '-' ? '<span id="' + id + '-text" class="' + prefix + 'text">' + text + '</span>' : '') +
          (shortcut ? '<div id="' + id + '-shortcut" class="' + prefix + 'menu-shortcut">' + shortcut + '</div>' : '') +
          (settings.menu ? '<div class="' + prefix + 'caret"></div>' : '') +
          (url ? '<div class="' + prefix + 'menu-item-link">' + url + '</div>' : '') +
          '</div>'
        );
      }
913264
function getMatchingIcons(iconsWithScores, maxScore) {
  return iconsWithScores
    .filter((item) => item.score === maxScore)
    .map((item) => Object.assign({}, item, { ext: path.extname(item.url) }));
}
114366
public function generatePageIconsCss() {
		$css = '';

		$sourceClasses 	= ClassInfo::subclassesFor('ExternalContentSource');
		$itemClasses 	= ClassInfo::subclassesFor('ExternalContentItem');
		$classes 		= array_merge($sourceClasses, $itemClasses);

		foreach($classes as $class) {
			$obj = singleton($class);
			$iconSpec = $obj->stat('icon');

			if(!$iconSpec) continue;

			// Legacy support: We no longer need separate icon definitions for folders etc.
			$iconFile = (is_array($iconSpec)) ? $iconSpec[0] : $iconSpec;

			// Legacy support: Add file extension if none exists
			if(!pathinfo($iconFile, PATHINFO_EXTENSION)) $iconFile .= '-file.gif';

			$iconPathInfo = pathinfo($iconFile);

			// Base filename
			$baseFilename = $iconPathInfo['dirname'] . '/' . $iconPathInfo['filename'];
			$fileExtension = $iconPathInfo['extension'];

			$selector = ".page-icon.class-$class, li.class-$class > a .jstree-pageicon";

			if(Director::fileExists($iconFile)) {
				$css .= "$selector { background: transparent url('$iconFile') 0 0 no-repeat; }\n";
			} else {
				// Support for more sophisticated rules, e.g. sprited icons
				$css .= "$selector { $iconFile }\n";
			}

		}

		$css .= "li.type-file > a .jstree-pageicon { background: transparent url('framework/admin/images/sitetree_ss_pageclass_icons_default.png') 0 0 no-repeat; }\n}";

		return $css;
	}
1011619
function getBundledCSS() {
    return streamqueue.obj(
        gulp.src(paths.dev.vendor + 'font-awesome/css/font-awesome.css')
            .pipe(modifyCssUrls({
                modify: function (url, filePath) {
                    return url.replace('../fonts/', '/fonts/font-awesome/');
                }
            })),
        gulp.src(paths.dev.vendor + 'bootstrap/dist/css/bootstrap.css')
            .pipe(modifyCssUrls({
                modify: function (url, filePath) {
                    return url.replace('../fonts/', '/fonts/bootstrap/');
                }
            })),
        gulp.src(paths.dev.vendor + 'nattreid-file-manager/assets/fileManager.css')
            .pipe(modifyCssUrls({
                modify: function (url, filePath) {
                    return url.replace('/images/', '/images/fileManager/');
                }
            })),
        gulp.src([
            paths.dev.vendor + 'jquery-ui-dist/jquery-ui.theme.css',
            paths.dev.vendor + 'bootstrap/dist/css/bootstrap-theme.css',
            paths.dev.vendor + 'bootstrap-daterangepicker/daterangepicker.css',
            paths.dev.vendor + 'nprogress/nprogress.css',
            // datagrid
            paths.dev.vendor + 'ublaboo-datagrid/assets/dist/datagrid.css',
            paths.dev.vendor + 'ublaboo-datagrid/assets/dist/datagrid-spinners.css',
            paths.dev.vendor + 'happy/dist/happy.css',
            paths.dev.vendor + 'bootstrap-datepicker/dist/css/bootstrap-datepicker3.css',
            paths.dev.vendor + 'bootstrap-select/dist/css/bootstrap-select.css',
            // spectrum
            paths.dev.vendor + 'spectrum-colorpicker/spectrum.css',
            // plugins
            paths.dev.vendor + 'nattreid-form/assets/form.css',
            paths.dev.vendor + 'nattreid-modal/assets/modal.min.css',
            // cms
            paths.dev.css + '*.css'
        ])
    );
}
69396
function _detectIconOptions(className, imagePath) {
	var el = L.DomUtil.create('div',  className, document.body),
	    urlsContainer = _getBkgImageOrCursor(el),
	    urls = _extractUrls(urlsContainer, imagePath),
	    iconX = _getStyleInt(el, 'width'),
	    iconY = _getStyleInt(el, 'height'),
	    anchorNX = _getStyleInt(el, 'margin-left'),
	    anchorNY = _getStyleInt(el, 'margin-top');

	el.parentNode.removeChild(el);

	return {
		Url: urls[0],
		RetinaUrl: urls[1],
		Size: [iconX, iconY],
		Anchor: [-anchorNX, -anchorNY]
	};
}
561589
function (newIcon) {

            // check if initialization was successful
            if (!this._iconInfo) {
                return;
            }

            var iconInfo = this._getIconInfo(newIcon);
            // check
            if (iconInfo) {
                var domElt = this.getDom();
                domElt.style.cssText = this._getIconStyle(iconInfo);
                domElt.className = this._getIconClasses(iconInfo);
            }

            this._iconInfo = iconInfo;
        }
408265
function bundleCSS() {
    const glob      = require('glob');
    const srcmap    = require('./srcmap');
    const BUILT_PATH = path.join(__dirname, '..', config.dir.built);

    glob.sync('**/*.css', {
        cwd: BUILT_PATH
    }).forEach((file) => {
        const src = fs.readFileSync(path.join(BUILT_PATH, file)).toString()
            .replace(/^\ufeff/gm, '')
            .replace(/\r\n/gm, '\n')
        ;
        const node = srcmap.getNodeFromCode(src);
        node.prepend(banner('.css', path.basename(file, '.css')));
        const bundleSrc = '\ufeff' + srcmap.getCodeFromNode(node, (srcPath) => {
            const regex_src = new RegExp(`${config.dir.src}\\/${config.dir.stylesheet}\\/`);
            return srcPath
                .replace(/\.\.\//g, '')
                .replace(regex_src, SOURCE_MAP_NAMESPACE)
            ;
        }, { multiline: true });
        fs.writeFileSync(path.join(BUILT_PATH, file), bundleSrc);
        fs.writeFileSync(path.join(DST_PATH, file), bundleSrc);
    });
}
805231
function (skipBorder, icons) {
                var hasBorder = (skipBorder === false);
                if (skipBorder == "dependsOnIcon") {
                    hasBorder = (icons.length === 0);
                }
                return hasBorder;
            }
615620
public static void readIconicsCompoundButton(@NonNull Context ctx,
                                                 @Nullable AttributeSet attrs,
                                                 @NonNull CheckableIconBundle icon) {
        TypedArray a = ctx.obtainStyledAttributes(attrs, R.styleable.IconicsCompoundButton, 0, 0);

        //obtaining attributes for Unchecked icon state
        icon.mUncheckedIcon = getIconicsCompoundButtonUncheckedDrawable(ctx, a);

        //obtaining attributes for Checked icon state
        icon.mCheckedIcon = getIconicsCompoundButtonCheckedDrawable(ctx, a);

        a.recycle();
    }
1024563
function(iconsOrElement, icons){
		var parentElem, selectedElems, filteredElems, embedAttr, selector;

		if( !icons ){
			icons = iconsOrElement;
			parentElem = document;
		} else {
			parentElem = iconsOrElement;
		}

		// attr to specify svg embedding
		embedAttr = "data-grunticon-embed";

		for( var iconName in icons ){
			selector = iconName.slice(selectorPlaceholder.length);

			try {
				// get ALL of the elements matching the selector
				selectedElems = parentElem.querySelectorAll( selector );
			} catch (er) {
				// continue further with embeds even though it failed for this icon
				continue;
			}


			filteredElems = [];

			// keep only those elements with the embed attribute
			for( var i = 0; i < selectedElems.length; i++ ){
				if( selectedElems[i].getAttribute( embedAttr ) !== null ){
					filteredElems.push(selectedElems[i]);
				}
			}

			// continue if there are no elements left after filtering
			if( !filteredElems.length ){ continue; }

			// for all the elements matching the selector with the embed attribute
			// take the svg markup and embed it into the selected elements
			for( i = 0; i < filteredElems.length; i++ ){
				filteredElems[ i ].innerHTML = icons[ iconName ];
				filteredElems[ i ].style.backgroundImage = "none";
				filteredElems[ i ].removeAttribute( embedAttr );
			}
		}

		return filteredElems;
	}
600008
@Override
	public CssStyle getIconStyle(String iconName) {
		if (this.icons == null) {
			return SimpleStyle.EMPTY_STYLE;
		}
		return this.icons.getStyle(iconName);
	}