protected function scrapeKneadAndSaveCss( $path_to_original_stylesheet, $path_to_copy_of_stylesheet ) {

		$styles = Container::get( 'Styles' );

		$scss = \Pressbooks\Utility\get_contents( $path_to_copy_of_stylesheet );

		if ( $this->extraCss ) {
			$scss .= "\n" . $this->loadTemplate( $this->extraCss );
		}

		$custom_styles = $styles->getEpubPost();
		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 = $styles->customize( 'epub', $scss, $this->cssOverrides );

		$scss_dir = pathinfo( $path_to_original_stylesheet, PATHINFO_DIRNAME );
		$path_to_epub_assets = $this->tmpDir . '/OEBPS/assets';
		$css = $this->normalizeCssUrls( $css, $scss_dir, $path_to_epub_assets );

		// Overwrite the new file with new info
		\Pressbooks\Utility\put_contents( $path_to_copy_of_stylesheet, $css );

		if ( WP_DEBUG ) {
			Container::get( 'Sass' )->debug( $css, $scss, 'epub' );
		}

	}
protected function scrapeKneadAndSaveCss( $path_to_original_stylesheet, $path_to_copy_of_stylesheet ) {

		$styles = Container::get( 'Styles' );

		$scss = \Pressbooks\Utility\get_contents( $path_to_copy_of_stylesheet );

		if ( $this->extraCss ) {
			$scss .= "\n" . $this->loadTemplate( $this->extraCss );
		}

		$custom_styles = $styles->getEpubPost();
		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 = $styles->customize( 'epub', $scss, $this->cssOverrides );

		$scss_dir = pathinfo( $path_to_original_stylesheet, PATHINFO_DIRNAME );
		$path_to_epub_assets = $this->tmpDir . '/OEBPS/assets';
		$css = $this->normalizeCssUrls( $css, $scss_dir, $path_to_epub_assets );

		// Overwrite the new file with new info
		\Pressbooks\Utility\put_contents( $path_to_copy_of_stylesheet, $css );

		if ( WP_DEBUG ) {
			Container::get( 'Sass' )->debug( $css, $scss, 'epub' );
		}

	}
protected function scrapeKneadAndSaveCss ( $ path_to_original_stylesheet , $ path_to_copy_of_stylesheet ) { $ styles = Container :: get ( 'Styles' ) ; $ scss = \ Pressbooks \ Utility \ get_contents ( $ path_to_copy_of_stylesheet ) ; if ( $ this -> extraCss ) { $ scss .= "\n" . $ this -> loadTemplate ( $ this -> extraCss ) ; } $ custom_styles = $ styles -> getEpubPost ( ) ; 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 = $ styles -> customize ( 'epub' , $ scss , $ this -> cssOverrides ) ; $ scss_dir = pathinfo ( $ path_to_original_stylesheet , PATHINFO_DIRNAME ) ; $ path_to_epub_assets = $ this -> tmpDir . '/OEBPS/assets' ; $ css = $ this -> normalizeCssUrls ( $ css , $ scss_dir , $ path_to_epub_assets ) ; // Overwrite the new file with new info \ Pressbooks \ Utility \ put_contents ( $ path_to_copy_of_stylesheet , $ css ) ; if ( WP_DEBUG ) { Container :: get ( 'Sass' ) -> debug ( $ css , $ scss , 'epub' ) ; } }
Parse CSS, copy assets, rewrite copy.

@param string $path_to_original_stylesheet *
@param string $path_to_copy_of_stylesheet
Parse CSS copy assets rewrite copy .