[Grok-dev] How do I use browser-specific stylesheets with grok?
Vincent Fretin
vincent.fretin at gmail.com
Tue Jan 5 07:54:24 EST 2010
Well I give me the full example:
<!-- IE workaround CSS/JS -->
<tal:iefixstart replace="structure string:<!--[if IE]>" />
<link rel="stylesheet" type="text/css"
tal:attributes="href static/menu.css"/>
<tal:iefixend replace="structure string:<![endif]-->" />
Vincent
On Tue, Jan 5, 2010 at 1:52 PM, Vincent Fretin <vincent.fretin at gmail.com> wrote:
> Hi,
>
> Plone use that:
> <tal:iefixstart replace="structure string:<!--[if lte IE 7]>" />
>
>
> Vincent Fretin
> Ecreall
> Site : http://vincentfretin.ecreall.com
>
>
>
> On Tue, Jan 5, 2010 at 10:52 AM, Sebastian Ware <sebastian at urbantalk.se> wrote:
>> I would either set a variable on the view and use:
>>
>> <tal:block condition="python:view.browser == 'MSIE'">bla bla</
>> tal:block>
>>
>> ...or use javascript on the webpage.
>>
>> Usually the IE-css will only need a couple of overrides for
>> positioning and minor tweaks so that css is quite small.
>>
>> Mvh Sebastian
>>
>> 5 jan 2010 kl. 10.24 skrev Marcel Klapschus:
>>
>>>
>>> I want to use two different stylesheets for my templatepage (one for
>>> IE-Browser, the other for non-IE-Browser). The two stylesheets are
>>> placed in
>>> my static folder, but since tags like "<!--[if IE]>" just ignore my
>>> "tal:attributes href", I have no idea how to add the path to my css
>>> files
>>> here.
>>>
>>> This is what I try in template:
>>>
>>> <!--[if IE]>
>>> <link rel="stylesheet" type="text/css"
>>> tal:attributes="href static/menu_ie.css"/>
>>> <![endif]-->
>>>
>>> <!--[if !IE]>
>>> <link rel="stylesheet" type="text/css"
>>> tal:attributes="href static/menu.css"/>
>>> <![endif]-->
>>>
>>> The lines "tal:attributes="href static/menu....." are ignored :-(
>>> --
>>> View this message in context: http://old.nabble.com/How-do-I-use-browser-specific-stylesheets-with-grok--tp27025693p27025693.html
>>> Sent from the Grok mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> Grok-dev mailing list
>>> Grok-dev at zope.org
>>> https://mail.zope.org/mailman/listinfo/grok-dev
>>
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev at zope.org
>> https://mail.zope.org/mailman/listinfo/grok-dev
>>
>
More information about the Grok-dev
mailing list