You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by James Piechota <pi...@gmail.com> on 2013/02/11 21:12:50 UTC

CSS stylesheets link order

Hi,

I noticed recently that the visual themes were clobbering some of the CSS
styles I'd created. The maincss.css in the visual theme resets a lot of
styles, and the stylesheet link order defined in header.ftl loads custom
style sheets (i.e. those in layoutSettings.styleSheets) before the Visual
Theme maincss.css.

A couple questions if anyone has any insight:

1. I can "fix" this easily be changing the stylesheet link order in the
Visual Theme header.ftl to move layoutSettings.styleSheets after the Visual
Theme stylesheets. However, does anyone know if the original order was by
design and therefore changes may have unexpected consequences?

2. If the link order is by design, is the recommended approach to defining
custom styles to create a new Visual Theme?

Thanks!

Re: CSS stylesheets link order

Posted by James Piechota <pi...@gmail.com>.
Perfect, thanks!


On Wed, Feb 13, 2013 at 12:18 AM, Adrian Crum <
adrian.crum@sandglass-software.com> wrote:

> Add your style sheets to the theme data in the database - via Web Tools or
> the Entity Engine data loader:
>
> <VisualThemeResource visualThemeId="FLAT_GREY" resourceTypeEnumId="VT_**STYLESHEET"
> resourceValue="/path/to/my/**custom/stylesheet.css " sequenceId="99"/>
>
> -Adrian
>
>
> On 2/12/2013 11:50 PM, James Piechota wrote:
>
>> Thanks, Adrian. You mean add something like the following in my
>> application:
>>
>> <set field="layoutSettings.VT_RTL_**STYLESHEET[]"
>> value="/path/to/my/custom/**stylesheet.css" global="true" />
>>
>> ?
>>
>> Or actually hack flatgrey/data/**FlatGreyThemeData.xml to include my
>> custom
>> css?
>>
>> Thanks!
>>
>> James
>>
>>
>> On Mon, Feb 11, 2013 at 10:10 PM, Adrian Crum <
>> adrian.crum@sandglass-**software.com <ad...@sandglass-software.com>>
>> wrote:
>>
>>  Add the style sheets to the theme data.
>>>
>>> -Adrian
>>>
>>>
>>> On 2/11/2013 8:12 PM, James Piechota wrote:
>>>
>>>  Hi,
>>>>
>>>> I noticed recently that the visual themes were clobbering some of the
>>>> CSS
>>>> styles I'd created. The maincss.css in the visual theme resets a lot of
>>>> styles, and the stylesheet link order defined in header.ftl loads custom
>>>> style sheets (i.e. those in layoutSettings.styleSheets) before the
>>>> Visual
>>>> Theme maincss.css.
>>>>
>>>> A couple questions if anyone has any insight:
>>>>
>>>> 1. I can "fix" this easily be changing the stylesheet link order in the
>>>> Visual Theme header.ftl to move layoutSettings.styleSheets after the
>>>> Visual
>>>> Theme stylesheets. However, does anyone know if the original order was
>>>> by
>>>> design and therefore changes may have unexpected consequences?
>>>>
>>>> 2. If the link order is by design, is the recommended approach to
>>>> defining
>>>> custom styles to create a new Visual Theme?
>>>>
>>>> Thanks!
>>>>
>>>>
>>>>
>

Re: CSS stylesheets link order

Posted by Adrian Crum <ad...@sandglass-software.com>.
Add your style sheets to the theme data in the database - via Web Tools 
or the Entity Engine data loader:

<VisualThemeResource visualThemeId="FLAT_GREY" 
resourceTypeEnumId="VT_STYLESHEET" 
resourceValue="/path/to/my/custom/stylesheet.css " sequenceId="99"/>

-Adrian

On 2/12/2013 11:50 PM, James Piechota wrote:
> Thanks, Adrian. You mean add something like the following in my application:
>
> <set field="layoutSettings.VT_RTL_STYLESHEET[]"
> value="/path/to/my/custom/stylesheet.css" global="true" />
>
> ?
>
> Or actually hack flatgrey/data/FlatGreyThemeData.xml to include my custom
> css?
>
> Thanks!
>
> James
>
>
> On Mon, Feb 11, 2013 at 10:10 PM, Adrian Crum <
> adrian.crum@sandglass-software.com> wrote:
>
>> Add the style sheets to the theme data.
>>
>> -Adrian
>>
>>
>> On 2/11/2013 8:12 PM, James Piechota wrote:
>>
>>> Hi,
>>>
>>> I noticed recently that the visual themes were clobbering some of the CSS
>>> styles I'd created. The maincss.css in the visual theme resets a lot of
>>> styles, and the stylesheet link order defined in header.ftl loads custom
>>> style sheets (i.e. those in layoutSettings.styleSheets) before the Visual
>>> Theme maincss.css.
>>>
>>> A couple questions if anyone has any insight:
>>>
>>> 1. I can "fix" this easily be changing the stylesheet link order in the
>>> Visual Theme header.ftl to move layoutSettings.styleSheets after the
>>> Visual
>>> Theme stylesheets. However, does anyone know if the original order was by
>>> design and therefore changes may have unexpected consequences?
>>>
>>> 2. If the link order is by design, is the recommended approach to defining
>>> custom styles to create a new Visual Theme?
>>>
>>> Thanks!
>>>
>>>


Re: CSS stylesheets link order

Posted by James Piechota <pi...@gmail.com>.
Thanks, Adrian. You mean add something like the following in my application:

<set field="layoutSettings.VT_RTL_STYLESHEET[]"
value="/path/to/my/custom/stylesheet.css" global="true" />

?

Or actually hack flatgrey/data/FlatGreyThemeData.xml to include my custom
css?

Thanks!

James


On Mon, Feb 11, 2013 at 10:10 PM, Adrian Crum <
adrian.crum@sandglass-software.com> wrote:

> Add the style sheets to the theme data.
>
> -Adrian
>
>
> On 2/11/2013 8:12 PM, James Piechota wrote:
>
>> Hi,
>>
>> I noticed recently that the visual themes were clobbering some of the CSS
>> styles I'd created. The maincss.css in the visual theme resets a lot of
>> styles, and the stylesheet link order defined in header.ftl loads custom
>> style sheets (i.e. those in layoutSettings.styleSheets) before the Visual
>> Theme maincss.css.
>>
>> A couple questions if anyone has any insight:
>>
>> 1. I can "fix" this easily be changing the stylesheet link order in the
>> Visual Theme header.ftl to move layoutSettings.styleSheets after the
>> Visual
>> Theme stylesheets. However, does anyone know if the original order was by
>> design and therefore changes may have unexpected consequences?
>>
>> 2. If the link order is by design, is the recommended approach to defining
>> custom styles to create a new Visual Theme?
>>
>> Thanks!
>>
>>
>

Re: CSS stylesheets link order

Posted by Adrian Crum <ad...@sandglass-software.com>.
Add the style sheets to the theme data.

-Adrian

On 2/11/2013 8:12 PM, James Piechota wrote:
> Hi,
>
> I noticed recently that the visual themes were clobbering some of the CSS
> styles I'd created. The maincss.css in the visual theme resets a lot of
> styles, and the stylesheet link order defined in header.ftl loads custom
> style sheets (i.e. those in layoutSettings.styleSheets) before the Visual
> Theme maincss.css.
>
> A couple questions if anyone has any insight:
>
> 1. I can "fix" this easily be changing the stylesheet link order in the
> Visual Theme header.ftl to move layoutSettings.styleSheets after the Visual
> Theme stylesheets. However, does anyone know if the original order was by
> design and therefore changes may have unexpected consequences?
>
> 2. If the link order is by design, is the recommended approach to defining
> custom styles to create a new Visual Theme?
>
> Thanks!
>