<?php

require_once( get_template_directory().'/inc/dynamic_css/parts/subheader.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/header_navigation.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/header_title.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/breadcrumbs.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/share-bar.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/page.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/portfolio-page.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/widgets.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/elements.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/footer.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/typography.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/brand.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/user_css.php' );
require_once( get_template_directory().'/inc/dynamic_css/parts/notification.php' );

$dynamic_style = StockieLayout::get_dynamic_css_buffer();

$retina_buffer = StockieLayout::get_dynamic_retina_css_buffer();
if ( $retina_buffer ) {
	$dynamic_style .= ' @media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){';
	$dynamic_style .= $retina_buffer;
	$dynamic_style .= '}';
}

wp_add_inline_style( 'stockie-style', $dynamic_style );