Loads a CSS file

@param string  $handle The stylesheet handle
@param string  $url    The stylesheet URL
@param array   $deps   An array of dependencies
@param string  $media  The media type for this stylesheet

@return $this
963612
public function loadStyle($handle, $url, array $deps = [], $media = 'all')
    {
        $this->assets->loadStyle($handle, $url, $deps, $media);

        return $this;
    }
685293
protected function enqueue_style( $style, $hook = null ) {
		if ( $style['condition']( $hook ) ) {
			wp_enqueue_style(
				$style['handle'],
				$this->url . $style['src'] . $this->min . '.css',
				isset( $style['deps'] ) ? $style['deps'] : array(),
				$this->version,
				isset( $style['media'] ) ? $style['media'] : 'all'
			);
		}
	}
545604
public function onStyleLoaderTag($tag, $handle): string
    {
        $tag    = (string) $tag;
        $handle = (string) $handle;

        if (!($style = $this->didEnqueueStyle($handle))) {
            return $tag; // We did not enqueue this style.
        }
        if ($style['sri'] !== '' && !preg_match('/\sintegrity\s*\=/ui', $tag)) {
            if (($sri = $style['sri']) || ($sri = $this->c::sri($style['url']))) {
                $tag = str_replace(' rel=', ' integrity="'.esc_attr($sri).'" crossorigin="anonymous" rel=', $tag);
            } // NOTE: SRI may or may not be possible right now. Always check if `$sri` is non-empty.
            // NOTE: `c::sri()` also will not return an SRI for local resources on the current hostname.
        }
        return $tag; // Possibly modifed above.
    }
1106782
public function removeCss($handle = null)
    {
        if (is_null($handle)) {
            return $this->styles = [];
        }

        unset($this->styles[$handle]);
    }
575765
public function wpEnqueueScript($handle, $src = '', $deps = [], $ver = false, $inFooter = false)
    {
        return $this->callGlobalFunction('wp_enqueue_script', [$handle, $src, $deps, $ver, $inFooter]);
    }
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);
  }
1225537
public function addCssUrl(string $url, string $media = 'all'): PageHead
    {
        $this->css_urls[$url] = $media;

        return $this;
    }
105376
public function enqueue_script( $handle, $file, $depends = [], $ver = false, $in_footer = true, $dir = 'js' ) {
		$path    = $dir . DS . $file;
		$result  = false;
		$_handle = $handle;
		$index   = 0;
		foreach ( $this->get_check_assets_dirs( true ) as $_dir => $_url ) {
			$_dir = rtrim( $_dir, DS . '/' );
			if ( file_exists( $_dir . DS . $path ) && is_file( $_dir . DS . $path ) ) {
				wp_enqueue_script( $handle, $_url . '/' . $dir . '/' . $file, $depends, $ver, $in_footer );

				if ( ! $this->app->is_theme ) {
					return true;
				}
				$result = true;
				$handle = "{$_handle}-{$index}";
				$index ++;
			}
		}

		return $result;
	}
408909
public function addStyle($url, $options = [], $attribs = [])
    {
        // B/C
        if (!is_array($options)) {
            $options = ['version' => $options];
        }

        $options = array_merge([
            'version' => null,
        ], $options);

        $alias = $this->resolveRawAlias($url);

        $file = [
            'url' => $this->handleUri($url),
            'attribs' => array_merge($attribs, $alias['attrs'] ?? []),
            'options' => array_merge($options, $alias['options'] ?? []),
        ];

        $this->styles[$url] = $file;

        return $this;
    }
49068
public function addStyle($handle, $style, array $attributes = [])
    {
        if (is_null($handle)) {
            $handle = $style;
        }

        $this->package->css($handle, $style, $attributes);

        return $this;
    }
9130
protected function loadCss($css, $options=array())
    {
        $location = (isset($options['location'])) ? $options['location']:'internal';

        //after:file, before:file, first, last
        $position = (isset($options['position'])) ? $options['position']:'last';

        if(!in_array($css,$this->data['css'][$location])){
            if($position=='first' || $position=='last'){
                $key = $position;
                $file='';
            }else{
                list($key,$file) =  explode(':',$position);
            }

            switch($key){
                case 'first':
                    array_unshift($this->data['css'][$location],$css);
                break;

                case 'last':
                    $this->data['css'][$location][]=$css;
                break;

                case 'before':
                case 'after':
                    $varkey = array_keys($this->data['css'][$location],$file);
                    if($varkey){
                        $nextkey = ($key=='after') ? $varkey[0]+1 : $varkey[0];
                        array_splice($this->data['css'][$location],$nextkey,0,$css);
                    }else{
                        $this->data['css'][$location][]=$css;
                    }
                break;
            }
        }
    }
139594
public static function eagerLoadingMap(array $sourceElements, string $handle)
    {
        // Get the block type
        $supertableFieldId = ArrayHelper::firstValue($sourceElements)->fieldId;
        $blockTypes = SuperTable::$plugin->getService()->getBlockTypesByFieldId($supertableFieldId);

        if (!isset($blockTypes[0])) {
            // Not a valid block type handle (assuming all $sourceElements are blocks from the same SuperTable field)
            return false;
        }

        $blockType = $blockTypes[0];

        // Set the field context
        $contentService = Craft::$app->getContent();
        $originalFieldContext = $contentService->fieldContext;
        $contentService->fieldContext = 'superTableBlockType:' . $blockType->uid;

        $map = parent::eagerLoadingMap($sourceElements, $handle);

        $contentService->fieldContext = $originalFieldContext;

        return $map;
    }
406125
public function get($handle, array $options = [])
    {
        /** @var AbstractHttpRequest $request */
        $request          = $this->getRequest();
        $request->options = $options;
        $request->path    = $this->client->fullDatabasePath . static::API_PATH . '/' . $handle;
        $request->method  = static::METHOD_GET;

        return $this->getReturnObject($request);
    }
255665
public function handle($handle = null)
    {
        if (!is_null($handle)) {
            $this->handle_attribute = $handle;
        }
        if (isset($this->handle_attribute)) {
            return $this->handle_attribute;
        }

        return $this->handle($this->loadImageHandle());
    }
999621
public function css($handle = null, $src = null, $dependency = null, array $attributes = [])
    {
        if ($handle === null) {
            $handle = $this->getName();
        }

        // Set default media attribute
        if (!isset($attributes['media'])) {
            $attributes['media'] = 'all';
        }

        return $this->put($handle.'.css', new Css($handle, $src, $dependency, $attributes));
    }
541198
public function media($media, $format, $options = [])
    {
        $media = $this->getMedia($media);

        if (null === $media) {
            return '';
        }

        $provider = $this
            ->getMediaService()
            ->getProvider($media->getProviderName());

        $format = $provider->getFormatName($media, $format);

        $options = $provider->getHelperProperties($media, $format, $options);

        return $this->render($provider->getTemplate('helper_view'), [
            'media' => $media,
            'format' => $format,
            'options' => $options,
        ]);
    }
1219532
public function applyAction(&$source, &$target, $handler, &$action)
    {
        $result = null;
        $this->hook->attach('image.style.apply.before', $source, $target, $handler, $action, $result);

        if (isset($result)) {
            return $result;
        }

        try {
            $callback = Handler::get($handler, null, 'process');
            $result = call_user_func_array($callback, array(&$source, &$target, &$action));
        } catch (Exception $ex) {
            $result = $ex->getMessage();
        }

        $this->hook->attach('image.style.apply.after', $source, $target, $handler, $action, $result);
        return $result;
    }