<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>You can use the add_inline_style function and assign it the handle of the parent theme. That way the custom CSS will be printed precisely after the parent theme's stylesheet link and before the child theme's stylesheet link (assuming the parent theme's stylesheet has been correctly added as a dependency of the child theme's stylesheet)</div><div><br></div><div>Daniel<br><br>Sent from my iPhone</div><div><br>On 06 Jul 2014, at 04:05, "Philip M. Hofer \(Frumph\)" <<a href="mailto:philip@frumph.net">philip@frumph.net</a>> wrote:<br><br></div><blockquote type="cite"><div>
<div dir="ltr">
<div style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<div>It’s a love-hate relationship for sure</div>
<div style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<div style="FONT: 10pt tahoma">
<div> </div>
<div style="BACKGROUND: #f5f5f5">
<div style="font-color: black"><b>From:</b> <a title="emil@uzelac.me" href="mailto:emil@uzelac.me">Emil Uzelac</a> </div>
<div><b>Sent:</b> Saturday, July 05, 2014 5:59 PM</div>
<div><b>To:</b> <a title="theme-reviewers@lists.wordpress.org" href="mailto:theme-reviewers@lists.wordpress.org">Discussion list for WordPress
theme reviewers.</a> </div>
<div><b>Subject:</b> Re: [theme-reviewers] CSS in a PHP file</div></div></div>
<div> </div></div>
<div style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<div dir="ltr">
<div style="FONT-FAMILY: arial,helvetica,sans-serif" class="gmail_default">And
enemy as well ;)</div></div>
<div class="gmail_extra"><br><br>
<div class="gmail_quote">On Sat, Jul 5, 2014 at 7:52 PM, Philip M. Hofer (Frumph)
<span dir="ltr"><<a href="mailto:philip@frumph.net" target="_blank">philip@frumph.net</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div dir="ltr" lang="EN-CA" link="blue" vlink="purple">
<div dir="ltr">
<div style="FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: 12pt">
<div>the !important CSS flag in the customizer can be your friend</div>
<div> </div>
<div style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<div style="FONT: 10pt tahoma">
<div> </div>
<div style="BACKGROUND: #f5f5f5">
<div><b>From:</b> <a title="wptr@edge22.com" href="mailto:wptr@edge22.com" target="_blank">Tom</a> </div>
<div><b>Sent:</b> Saturday, July 05, 2014 5:22 PM</div>
<div>
<div class="h5">
<div><b>To:</b> <a title="theme-reviewers@lists.wordpress.org" href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">'Discussion
list for WordPress theme reviewers.'</a> </div>
<div><b>Subject:</b> Re: [theme-reviewers] CSS in a PHP
file</div></div></div></div></div>
<div> </div></div>
<div style="FONT-STYLE: normal; DISPLAY: inline; FONT-FAMILY: 'Calibri'; COLOR: #000000; FONT-SIZE: small; FONT-WEIGHT: normal; TEXT-DECORATION: none">
<div>
<div class="h5">
<div>
<p class="MsoNormal"><span style="COLOR: #1f497d">… Well I thought I was smart
and figured it out, but now it's above the parent theme CSS and the
customize.php css is being ignored if it's also in the parent's
css.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR: #1f497d"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="COLOR: #1f497d">If anyone has any tips that
would be awesome.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR: #1f497d"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="COLOR: #1f497d">Sorry for the multiple
emails.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR: #1f497d"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="COLOR: #1f497d">Tom<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR: #1f497d"><u></u><u></u></span> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang="EN-US">From:</span></b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang="EN-US">
theme-reviewers [mailto:<a href="mailto:theme-reviewers-bounces@lists.wordpress.org" target="_blank">theme-reviewers-bounces@lists.wordpress.org</a>] <b>On Behalf Of
</b>Tom<br><b>Sent:</b> Saturday, July 5, 2014 5:13 PM<br><b>To:</b>
'Discussion list for WordPress theme reviewers.'<br><b>Subject:</b> Re:
[theme-reviewers] CSS in a PHP file<u></u><u></u></span></p></div></div>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal"><span style="COLOR: #1f497d">No need to answer this – after
writing all that and sending I thought why not just add the CSS to wp_head
above where the files are being queued – no need to include an extra file and
do all that fancy stuff if it's not needed.
*facepalm*<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR: #1f497d"><u></u><u></u></span> </p>
<p class="MsoNormal"><span style="COLOR: #1f497d">Thanks
guys!<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR: #1f497d">Tom<u></u><u></u></span></p>
<p class="MsoNormal"><span style="COLOR: #1f497d"><u></u><u></u></span> </p>
<div>
<div style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<p class="MsoNormal"><b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang="EN-US">From:</span></b><span style="FONT-FAMILY: 'Tahoma','sans-serif'; FONT-SIZE: 10pt" lang="EN-US">
theme-reviewers [mailto:<a href="mailto:theme-reviewers-bounces@lists.wordpress.org" target="_blank">theme-reviewers-bounces@lists.wordpress.org</a>] <b>On Behalf Of
</b>Tom<br><b>Sent:</b> Saturday, July 5, 2014 4:57 PM<br><b>To:</b> <a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br><b>Subject:</b>
[theme-reviewers] CSS in a PHP file<u></u><u></u></span></p></div></div>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">Hi all, quick question!<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">Up until now, I've been generating all of my custom CSS
generated by customize.php straight into wp_head, which works
fine.<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">However, my child theme queues the style.css above where my
generated CSS is output, meaning the child theme's CSS has to be more specific
than what's being set in customize.php.<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">This isn't a huge problem, but can be quite annoying for
people trying to add their own custom CSS.<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">I've been working on moving the CSS from wp_head into its
own file – css.php. Here are the stripped down contents of that file: <a href="https://gist.github.com/proframework/79dd529afbbad4d84ea0" target="_blank">https://gist.github.com/proframework/79dd529afbbad4d84ea0</a><u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">Then, in my functions.php file I include the css.php file,
and then enqueue the script like so:<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">wp_enqueue_style( 'generate-customize', site_url() . '/?' .
$name . '-css=css', false, GENERATE_VERSION, 'all' );<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">Now, this works perfectly when changing settings, saving
and then refreshing.<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">However, it doesn't work when changing the settings in
customize.php, and hoping to see them change right in front of you. You need
to actually save and refresh to see the changes.<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">I'm assuming this has something to do with using the $_GET
variable?<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">I've thought of including the CSS in wp_head only while in
customize.php, but I figure I'd ask your opinion first.<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">First, is the way I've set up css.php safe using the $_GET
variable? Any downfalls there?<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">Second, is there any way I can get css.php and
customize.php to play nice?<u></u><u></u></p>
<p class="MsoNormal"><u></u><u></u> </p>
<p class="MsoNormal">Thanks!<u></u><u></u></p>
<p class="MsoNormal">Tom<u></u><u></u></p></div></div></div>
<hr>
_______________________________________________<br>theme-reviewers mailing
list<br><a href="mailto:theme-reviewers@lists.wordpress.org" target="_blank">theme-reviewers@lists.wordpress.org</a><br><a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br></div></div></div></div><br>_______________________________________________<br>theme-reviewers
mailing list<br><a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br><a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers" target="_blank">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br><br></blockquote></div>
<div> </div></div>
<p>
</p><hr>
_______________________________________________<br>theme-reviewers mailing
list<br><a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a><br><a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a><br></div></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>theme-reviewers mailing list</span><br><span><a href="mailto:theme-reviewers@lists.wordpress.org">theme-reviewers@lists.wordpress.org</a></span><br><span><a href="http://lists.wordpress.org/mailman/listinfo/theme-reviewers">http://lists.wordpress.org/mailman/listinfo/theme-reviewers</a></span><br></div></blockquote></body></html>