Apply Custom CSS Class
186500
function() {
			if(that.settings.cssClass !== null) {
				that.bar.addClass(that.settings.cssClass);
			}
		}
328399
private function applyColumnWidths()
	{
		$styles = [];
		if (!empty($this->columnWidth)) $styles['width'] = $this->prepareWidthStyleValue($this->columnWidth);
		if (!empty($this->minColumnWidth)) $styles['min-width'] = $this->prepareWidthStyleValue($this->minColumnWidth);
		if (!empty($this->maxColumnWidth)) $styles['max-width'] = $this->prepareWidthStyleValue($this->maxColumnWidth);

		Html::addCssStyle($this->options, $styles, true);
	}
889602
def bootstrap_styled(cls=None, add_meta=True, form_group=True, 
    input_class='form-control'):
    

    def real_decorator(cls):
        class NewClass(cls): pass
        NewClass.__name__ = cls.__name__
        NewClass = custom_widget_wrapper(NewClass)

        _call = NewClass.__call__

        def call(*args, **kwargs):
            if input_class:
                kwargs.setdefault('class', input_class)

            return _call(*args, **kwargs)

        if add_meta: call = meta_wrapped(call)
        if form_group: call = form_group_wrapped(call)

        NewClass.__call__ = call
        return NewClass

    if cls:
        # Allow calling decorator(cls) instead of decorator()(cls)
        rv = real_decorator(cls)
        return rv

    return real_decorator
1177835
function setClassName(element, cssClass) {
    cssClass = snippet.isArray(cssClass) ? cssClass.join(' ') : cssClass;

    cssClass = trim(cssClass);

    if (snippet.isUndefined(element.className.baseVal)) {
        element.className = cssClass;

        return;
    }

    element.className.baseVal = cssClass;
}
35440
function doPostCss(css, callback) {
	postcss([autoprefixer]).process(css, {from: undefined}).then(function gotCssResult(result) {
		callback(null, result.css);
	}).catch(function gotError(err) {
		callback(err);
	});
}
1031364
function updatePseudoClassStyle(styleId, properties, preventFocusStyleForTouchAndClick) {
  let focusStyle;
  if (preventFocusStyleForTouchAndClick) {
    focusStyle = { outline: 0 };
  } else {
    focusStyle = {
      ...style.focusStyle,
      ...properties.focusStyle,
    };
  }

  const styles = [
    {
      id: styleId,
      style: focusStyle,
      pseudoClass: 'focus',
    },
  ];

  injectStyles(styles);
}
269805
function apply() {
		document.getElementById("editorThemeName").value = currentTheme.name; //$NON-NLS-0$
		for (var i = 0; i < scopeList.length; i++){
			scopeList[i].value = defaultColor; // scopes with no value will have defaultColor showing
			for (var l = 0; l < scopeList[i].objPath.length; l++){
				var temp = getValueFromPath(currentTheme,scopeList[i].objPath[l]);
				if (temp){
					scopeList[i].value = temp;
					break;
				}
			}
		}
		for (i = 0; i < scopeList.length; i++){
			var element = document.getElementById(scopeList[i].id);
			element.value = scopeList[i].value; // updates the select or input[type=color] with correct value
			if (element.type === "color") { //$NON-NLS-0$
				// make the color value available in a tooltip and aria-label
				makeTooltip(element, scopeList[i]);
			}
		}
		checkForChanges(); // checks if any value is changed
	}
474559
def toggle_class(self, csscl):
        """"""
        self._stable = False
        action = ("add", "remove")[self.has_class(csscl)]
        return getattr(self.attrs["klass"], action)(csscl)
1188356
function (css) {
                        return function () {
                            var currentCss = d3.select(this).attr("class") || "";
                            if (currentCss.indexOf(css) === -1) {
                                currentCss += " " + css;
                            }
                            return currentCss.trim();
                        };
                    }
1372111
public void addCSSClassOrLogError(CSSClass cls) {
    try {
      cssman.addClass(cls);
    }
    catch(CSSNamingConflict e) {
      LoggingUtil.exception(e);
    }
  }
506112
def update_element_css_classes(obj, old_classes, new_classes)
      (old_classes - new_classes).each do |name|
        `#{obj.element}.classList.remove(#{name})`
      end

      (new_classes - old_classes).each do |name|
        `#{obj.element}.classList.add(#{name})`
      end
    end
342595
function (cmenu) {
            cmenu.shadowObj = $('<div class="' + cmenu.shadowClass + '"></div>').css({
                display: 'none',
                position: "absolute",
                zIndex: 9998,
                opacity: cmenu.shadowOpacity,
                backgroundColor: cmenu.shadowColor
            });
            $(cmenu.appendTo).append(cmenu.shadowObj);
        }
1103159
function createMarkupOnPseudoClass(pseudoClasses, id, disabled) {
  return mapObject(pseudoClasses, (style, pseudoClass) => {
    if (style && Object.keys(style).length > 0) {
      const styleString = CSSPropertyOperations.createMarkupForStyles(style);
      const styleWithImportant = styleString.replace(/;/g, ' !important;');

      return disabled ?
        `.${id}[disabled]:${pseudoClass} {${styleWithImportant}}` :
        `.${id}:${pseudoClass} {${styleWithImportant}}`;
    }

    return undefined;
  });
}
942397
async function exportCustomSelectorsToCssFile(to, customSelectors) {
	const cssContent = Object.keys(customSelectors).reduce((cssLines, name) => {
		cssLines.push(`@custom-selector ${name} ${customSelectors[name]};`);

		return cssLines;
	}, []).join('\n');
	const css = `${cssContent}\n`;

	await writeFile(to, css);
}
1266493
private static function _css()
	{
		static $_css = false;

		// already printed ?
		//
		if ($_css)
		{
			return true;
		}

		$css = '';
		$skin = self::$skin;

		// custom selected skin ?
		//
		$_ = KRUMO_DIR . "skins/{$skin}/skin.css";
		if (!file_exists($_))
		{
			trigger_error(
				"Unable to find \"{$_}\"",
				E_USER_WARNING);
		} else
		{
			$css = file_get_contents($_);
		}

		// default skin ?
		//
		if (!$css && ($skin != 'default'))
		{
			$skin = 'default';
			$_ = KRUMO_DIR . "skins/default/skin.css";
			$css = file_get_contents($_);
		}

		// print ?
		//
		if ($_css = ($css != ''))
		{
			?>
<style type="text/css">
<?php echo $css?>
/* Using Krumo Skin: <?php echo preg_replace(
	'~^' . preg_quote(realpath(KRUMO_DIR) . DIRECTORY_SEPARATOR) . '~Uis',
	'',
	realpath($_));?> */
</style><?php
			self::_js();
		}

		return $_css;
	}
1236678
def process_styles (out)
      out.gsub /(<style\b[^>]*?>([\s\S]*?)<\/style>)\s*/i do
        css = $2
        m = $1.gsub /^<style\s([^>]+)>/i do |m|
          attrs(m, 'style', true)
        end
        begin
          css_compressed = MultiCss.min css
          m.gsub!(css, css_compressed)
        rescue Exception => e
          log e.message
        end
        reserve m
      end
    end
1225847
def from_css(Class, csstext, encoding=None, href=None, media=None, title=None, validate=None):
        
        styles = Class()
        cssStyleSheet = cssutils.parseString(csstext, encoding=encoding, href=href, media=media, title=title, validate=validate)
        for rule in cssStyleSheet.cssRules:
            if rule.type==cssutils.css.CSSRule.FONT_FACE_RULE:
                if styles.get('@font-face') is None: styles['@font-face'] = []
                styles['@font-face'].append(Class.styleProperties(rule.style))
            
            elif rule.type==cssutils.css.CSSRule.IMPORT_RULE:
                if styles.get('@import') is None: styles['@import'] = []
                styles['@import'].append("url(%s)" % rule.href)

            elif rule.type==cssutils.css.CSSRule.NAMESPACE_RULE:
                if styles.get('@namespace') is None: styles['@namespace'] = {}
                styles['@namespace'][rule.prefix] = rule.namespaceURI
            
            elif rule.type==cssutils.css.CSSRule.MEDIA_RULE:
                if styles.get('@media') is None: styles['@media'] = []
                styles['@media'].append(rule.cssText)
            
            elif rule.type==cssutils.css.CSSRule.PAGE_RULE:
                if styles.get('@page') is None: styles['@page'] = []
                styles['@page'].append(rule.cssText)

            elif rule.type==cssutils.css.CSSRule.STYLE_RULE:
                for selector in rule.selectorList:
                    sel = selector.selectorText
                    if sel not in styles:
                        styles[sel] = Class.styleProperties(rule.style)
            
            elif rule.type==cssutils.css.CSSRule.CHARSET_RULE:
                styles['@charset'] = rule.encoding

            elif rule.type==cssutils.css.CSSRule.COMMENT:   # comments are thrown away
                pass

            elif rule.type==cssutils.css.CSSRule.VARIABLES_RULE:
                pass
            
            else:
                log.warning("Unknown rule type: %r" % rule.cssText)

        return styles