Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Let template control CSS files order Joomla 25/3.x

Date: Fri, 19 Oct 2012 02:45:26 -0700 (PDT)
From: Seth <s...@internet-inspired.com>
To: joomlabugsquad@googlegroups.com
Message-Id: <1eeeaf2a-9cbb-4fcb-a260-8b8f40523022@googlegroups.com>
In-Reply-To: <f2bd91c5-d925-4138-92eb-4935f56d59dc@googlegroups.com>
References: <f2bd91c5-d925-4138-92eb-4935f56d59dc@googlegroups.com>
Subject: Re: Let template control CSS files order  Joomla 25/3.x
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_606_9161178.1350639927019"

------=_Part_606_9161178.1350639927019
Content-Type: multipart/alternative; 
	boundary="----=_Part_607_24188903.1350639927020"

------=_Part_607_24188903.1350639927020
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

This is the current situation, and one that I also find very annoying, but 
I do question the validity of the approach you are suggesting.

I believe it is entirely correct that any extensions css is loaded after 
the templates css, as these are additional styles relevant only to the 
extension. I think you would find that having template styles override 
extension styles would cause far more problems, causing a large-scale 
'breaking' of extensions. Personally, I would like to see extensions not 
adding their own css at all (or at least make it optional) as I agree it is 
the templates job to style output. I frequently end up overriding extension 
styles using nasty !important hacks, as the extension author have provided 
no way to sensibly disable their extension styles.

This argument aside, I do believe that the template author should always 
have the ability to define the head structure, including the asset loading 
order. In that regard I am 100% in agreement.


Seth

On Monday, October 8, 2012 2:37:57 AM UTC+1, Dan YJ wrote:
>
> By my understanding template controls the layout and it's css files should 
> load very last 
> but there is no way to do this. 
> Every module/component/plugin css file will load after template css files 
> no matter if you do 
>
> <jdoc:include type="head" />
>
> $document->addStyleSheet($this->baseurl.'/templates/'.$this->template.'/css/template.css');
>
> or 
>
> $document->addStyleSheet($this->baseurl.'/templates/'.$this->template.'/css/template.css');
> <jdoc:include type="head" />
>
> the template.css file loads first and than all other extensions css files. 
>
> Unless we hack $document->getHeadData(); 
> or make a system plugin there is no way template.css  would override any 
> other css files if needed.
>
> Now days everyone is asking for custom.css file and we have it included in 
> our framework with direct link which I am very tired off. 
>
> I would love to use default style calls $document->addStyleSheet
> instead direct links or $document->addCustomTag
>
> Can we get this to work as it should?
>
>
------=_Part_607_24188903.1350639927020
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

This is the current situation, and one that I also find very annoying, but =
I do question the validity of the approach you are suggesting.<div><br></di=
v><div>I believe it is entirely correct that any extensions css is loaded a=
fter the templates css, as these are additional styles relevant only to the=
 extension. I think you would find that having template styles override ext=
ension styles would cause far more problems, causing a large-scale 'breakin=
g' of extensions. Personally, I would like to see extensions not adding the=
ir own css at all (or at least make it optional) as I agree it is the templ=
ates job to style output. I frequently end up overriding extension styles u=
sing nasty !important hacks, as the extension author have provided no way t=
o sensibly disable their extension styles.</div><div><br></div><div>This ar=
gument aside, I do believe that the template author should always have the =
ability to define the head structure, including the asset loading order. In=
 that regard I am 100% in agreement.</div><div><br></div><div><br></div><di=
v>Seth<br><br>On Monday, October 8, 2012 2:37:57 AM UTC+1, Dan YJ wrote:<bl=
ockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border=
-left: 1px #ccc solid;padding-left: 1ex;">By my understanding template&nbsp=
;controls&nbsp;the layout and it's css files should load very last&nbsp;<di=
v>but there is no way to do this.&nbsp;</div><div>Every module/component/pl=
ugin css file will load after template css files&nbsp;</div><div>no matter =
if you do&nbsp;</div><div><br></div><div>&lt;jdoc:include type=3D"head" /&g=
t;<br></div><div>$document-&gt;addStyleSheet($<wbr>this-&gt;baseurl.'/templ=
ates/'.$<wbr>this-&gt;template.'/css/template.<wbr>css');<br></div><div><br=
></div><div>or&nbsp;</div><div>$document-&gt;addStyleSheet($<wbr>this-&gt;b=
aseurl.'/templates/'.$<wbr>this-&gt;template.'/css/template.<wbr>css');<br>=
</div><div><div>&lt;jdoc:include type=3D"head" /&gt;<br></div><div><br></di=
v><div>the template.css file loads first and than all other&nbsp;extensions=
 css files.&nbsp;</div></div><div><br></div><div>Unless we hack&nbsp;$docum=
ent-&gt;getHeadData();<wbr>&nbsp;</div><div>or make a&nbsp;system&nbsp;plug=
in there is no way template.css &nbsp;would override any other css files if=
 needed.</div><div><br></div><div>Now days everyone is asking for custom.cs=
s file and we have it included in our framework with direct link&nbsp;which=
&nbsp;I am very&nbsp;tired&nbsp;off.&nbsp;</div><div><br></div><div>I would=
 love to use default style calls&nbsp;$document-&gt;addStyleSheet</div><div=
>instead direct links or&nbsp;$document-&gt;addCustomTag</div><div><br></di=
v><div>Can we get this to work as it should?</div><div><br></div></blockquo=
te></div>
------=_Part_607_24188903.1350639927020--

------=_Part_606_9161178.1350639927019--