Sets the custom stylesheets grouped by priority.

@param array $customStylesheets Array of XSL stylesheets. Each entry
consists in a hash having "path" and "priority" keys.
355606
public function setCustomStylesheets($customStylesheets)
    {
        $this->customStylesheets = [];
        if (!$customStylesheets) {
            return;
        }
        foreach ($customStylesheets as $stylesheet) {
            if (!isset($this->customStylesheets[$stylesheet['priority']])) {
                $this->customStylesheets[$stylesheet['priority']] = [];
            }

            $this->customStylesheets[$stylesheet['priority']][] = $stylesheet['path'];
        }
    }
972030
protected function setThemeConstants()
    {
        $this->parsedHeaders = $this->headers($this->dirPath.'/style.css', $this->headers);

        // Theme text domain.
        $textdomain = (isset($this->parsedHeaders['text_domain']) && ! empty($this->parsedHeaders['text_domain']))
            ? $this->parsedHeaders['text_domain']
            : 'themosis_theme';

        defined('THEME_TD') ? THEME_TD : define('THEME_TD', $textdomain);
    }
575122
public static function setStyle($styleArray, $range=NULL)
    {
        $sheetObj = self::validSheetObj();

        $range = ($range) ? $range : self::getRangeAll();

        $sheetObj->getStyle($range)
            ->applyFromArray($styleArray);
        
        return new static();
    }
142621
public static function addStylesheet($stylesheet)
	{
		if (!$stylesheet)
		{
			return;
		}

		if (substr($stylesheet, -4) != '.css')
		{
			$stylesheet .= '.css';
		}

		$root = self::base();

		if ($document = self::app('document'))
		{
			$document->addStyleSheet(rtrim(Request::base(true), '/') . $stylesheet . '?v=' . filemtime($root . $stylesheet));
		}
	}
1034534
protected function setStyle( $styleType, $styles )
    {
        // Get the cell style
        $style = $this->getCellStyle();

        // Apply style from array
        $style->applyFromArray( [
            $styleType => $styles,
        ] );

        return $this;
    }
725687
public function addStyles(array $styles)
    {
        if (!$this->styleSet) {
            $this->styleSet = new DefaultStyleSet();
        }

        $this->styleSet->merge($styles);

        return $this;
    }
582920
public function addStylesheet($stylesheet, $inline = true)
    {
        $type = $inline ? 'inline' : 'external';
        $this->stylesheets[$type][] = $stylesheet;
    }
717539
public function updateWebBookStyleSheet( $stylesheet = null ) {

		if ( CustomCss::isCustomCss() ) {
			// Compile pressbooks-book web stylesheet when using the *DEPRECATED* Custom CSS theme
			$theme = wp_get_theme( 'pressbooks-book' );
		} else {
			$theme = wp_get_theme( $stylesheet );
		}

		// Populate $url-base variable so that links to images and other assets remain intact
		$overrides = [ '$url-base: "' . $theme->get_stylesheet_directory_uri() . '";' ];
		if ( $this->isCurrentThemeCompatible( 1 ) ) {
			$scss = \Pressbooks\Utility\get_contents( realpath( $this->getDir( $theme ) . '/style.scss' ) );
		} elseif ( $this->isCurrentThemeCompatible( 2 ) || CustomCss::isCustomCss() ) {
			$scss = \Pressbooks\Utility\get_contents( realpath( $this->getDir( $theme ) . '/assets/styles/web/style.scss' ) );
		} else {
			return;
		}

		$custom_styles = $this->getWebPost();
		if ( $custom_styles && ! empty( $custom_styles->post_content ) ) {
			// append the user's custom styles to the theme stylesheet prior to compilation
			$scss .= "\n" . $custom_styles->post_content;
		}

		$css = $this->customize( 'web', $scss, $overrides );

		$css = normalize_css_urls( $css );

		$css_file = $this->sass->pathToUserGeneratedCss() . '/style.css';
		\Pressbooks\Utility\put_contents( $css_file, $css );
	}
599035
public function addStyleSheet($stylesheet)
    {
        if ($this->html_head_entry_set === null) {
            throw new SwatException(
                sprintf(
                    "Child class '%s' did not " .
                        'instantiate a HTML head entry set. This should be done in  ' .
                        'the constructor either by calling parent::__construct() or ' .
                        'by creating a new HTML head entry set.',
                    get_class($this)
                )
            );
        }

        $this->html_head_entry_set->addEntry(
            new SwatStyleSheetHtmlHeadEntry($stylesheet)
        );
    }
985895
public function setStyle(array $css_properties=[]) :self {
		// init the style attribute is it didn't exist already
		isset($this->attributes['style']) ?: $this->attributes['style'] = '';
		// for each of the css properties
		foreach($css_properties as $css_property => $css_value) {
			// add them to the already existing ones
			$this->attributes['style'] .= $css_property.':'.$css_value.';';
		}
		// return self
		return($this);
	}
583958
public function applyStylesheetFromFile(string $stylesheetFile): self
    {
        $stylesheet = new \DOMDocument();
        if (false === @$stylesheet->load($stylesheetFile)) {
            throw new XslProcessorException('Can not read stylesheet file ' . $stylesheetFile);
        }

        return $this->applyStylesheet($stylesheet);
    }
428043
public function setDefaultStyles()
    {
        $this->query->output_allcell_styles = false;
        $this->query->output_row_styles = false;
        $this->query->output_before_form_row_styles = false;
        $this->query->output_after_form_row_styles = false;
        $this->query->output_page_styles = false;
        $this->query->output_header_styles = false;
        $this->query->output_reportbody_styles = false;
        $this->query->output_group_header_label_styles = false;
        $this->query->output_group_header_value_styles = false;
        $this->query->output_group_trailer_styles = false;
        $this->query->output_hyperlinks = false;
        $this->query->output_images = false;
    }
1170381
protected function loadStylesheets(...$styles)
    {
        $files = $this->getFilePayload($styles ?? null);

        if (empty($files)) {
            return;
        }

        foreach ($files as $style) {
            $this->loadStylesheet($style);
        }
    }
545813
public function setFormTheme($themes)
    {
        $themes = is_array($themes) ? $themes : [$themes];
        $this->formThemes = array_merge($this->formThemes, $themes);

        return $this;
    }
219482
public function withStyles(array $styles)
    {
        foreach ($styles as $name => $args) {
            $this->formatter()->setStyle($name, new OutputFormatterStyle(...$args));
        }

        return $this;
    }
1172930
protected function mergeTemplateResources(TemplateResources $templateResources)
    {
        $this->stylesheets    = array_merge($this->stylesheets, $templateResources->getStylesheets());
        $this->headerScripts  = array_merge($this->headerScripts, $templateResources->getHeaderScripts());
        $this->headerIncludes = array_merge($this->headerIncludes, $templateResources->getHeaderIncludes());
        $this->footerScripts  = array_merge($this->footerScripts, $templateResources->getFooterScripts());
        $this->footerIncludes = array_merge($this->footerIncludes, $templateResources->getFooterIncludes());
    }
271276
public function setPaths($paths)
    {
        if (!$paths instanceof PriorityQueue) {
            $paths = new PriorityQueue($paths);
        }

        $this->paths = $paths;

        return $this;
    }