You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by "Geir Magnusson Jr." <ge...@pobox.com> on 2006/09/21 18:19:57 UTC

[doc] problem w/ css locally?

I'm doing some website work, and things aren't working locally.

I can of course build, but when I look at the generated results, it  
can't find the stylesheet, and the result is, well, awful.   Am I  
doing something wrong?

I can fix it by having

         <link rel="Stylesheet" type="text/css" href="site.css"/>

but that means that we have site.css everywhere?

One of the advantages of our xdoc system is that you can generate and  
view the site exactly as it will be seen when deployed, so we should  
try and ensure we keep that property...

geir


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Sep 21, 2006, at 12:34 PM, Tim Ellison wrote:

> are you practising for the faq :-) ?
>
> the hack is to point to a local copy (and remember not to check the  
> hack
> in).

LOL

geir

>
> Tim
>
> Geir Magnusson Jr. wrote:
>> I'm doing some website work, and things aren't working locally.
>>
>> I can of course build, but when I look at the generated results, it
>> can't find the stylesheet, and the result is, well, awful.   Am I  
>> doing
>> something wrong?
>>
>> I can fix it by having
>>
>>         <link rel="Stylesheet" type="text/css" href="site.css"/>
>>
>> but that means that we have site.css everywhere?
>>
>> One of the advantages of our xdoc system is that you can generate and
>> view the site exactly as it will be seen when deployed, so we  
>> should try
>> and ensure we keep that property...
>>
>> geir
>>
>>
>> ---------------------------------------------------------------------
>> Terms of use : http://incubator.apache.org/harmony/mailing.html
>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>> For additional commands, e-mail: harmony-dev- 
>> help@incubator.apache.org
>>
>>
>
> -- 
>
> Tim Ellison (t.p.ellison@gmail.com)
> IBM Java technology centre, UK.
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by Tim Ellison <t....@gmail.com>.
are you practising for the faq :-) ?

the hack is to point to a local copy (and remember not to check the hack
in).

Tim

Geir Magnusson Jr. wrote:
> I'm doing some website work, and things aren't working locally.
> 
> I can of course build, but when I look at the generated results, it
> can't find the stylesheet, and the result is, well, awful.   Am I doing
> something wrong?
> 
> I can fix it by having
> 
>         <link rel="Stylesheet" type="text/css" href="site.css"/>
> 
> but that means that we have site.css everywhere?
> 
> One of the advantages of our xdoc system is that you can generate and
> view the site exactly as it will be seen when deployed, so we should try
> and ensure we keep that property...
> 
> geir
> 
> 
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> 
> 

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Sep 22, 2006, at 8:04 AM, Stefano Mazzocchi wrote:

> Geir Magnusson Jr. wrote:
>> I see Tim and Nadya  discussed this already.
>>
>> I think we want to keep it as error-free as possible...  I'm going to
>> try to just copy site.css on deployment - it means we still only
>> maintain one copy, but then offline and online is the same  
>> experience.
>
> I tend to hook the css file to an absolute http URL or use ../../
> relative locations.
>
> having a working copy that needs to be updated before every commit is
> asking for trouble.

Right - so I switched the <link> to be simply local, and modified  
build.xml to copy it where it's needed.  So we have extra copies in  
the doc tree, but what you see locally is what you see when deployed,  
and nothing has to be touched to go between.

geir

>
> -- 
> Stefano.
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by Stefano Mazzocchi <st...@apache.org>.
Geir Magnusson Jr. wrote:
> I see Tim and Nadya  discussed this already.
> 
> I think we want to keep it as error-free as possible...  I'm going to
> try to just copy site.css on deployment - it means we still only
> maintain one copy, but then offline and online is the same experience.

I tend to hook the css file to an absolute http URL or use ../../
relative locations.

having a working copy that needs to be updated before every commit is
asking for trouble.

-- 
Stefano.


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
On Sep 21, 2006, at 1:42 PM, robert burrell donkin wrote:

> On 9/21/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>> that would work, but again, it takes away the simplicity of never
>> having to think about it - what you see locally is what you get when
>> you deploy, which is a really, really good QA benefit.
>
> the other problem with relativised urls is that local links don't
> work. this makes it difficult to test links locally.

Right - up to now, our site was completely testable locally.  That's  
the major benefit of using this system.

>
> using the absolute URL for the style works except when you want to
> edit the style sheet.
>
> i've been trying to find a good solution to relatized URLs for a
> while. having a switch means there's a risk of committing the local
> only files.

yep

>
> what would be good is a browser where it's possible to set the base
> URL for local files. anyone know one?

There's no reason to worry about this here.  if we just use a  
site.css in each directory, I think we're ok.

geir

>
> - robert
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by robert burrell donkin <ro...@gmail.com>.
On 9/21/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> that would work, but again, it takes away the simplicity of never
> having to think about it - what you see locally is what you get when
> you deploy, which is a really, really good QA benefit.

the other problem with relativised urls is that local links don't
work. this makes it difficult to test links locally.

using the absolute URL for the style works except when you want to
edit the style sheet.

i've been trying to find a good solution to relatized URLs for a
while. having a switch means there's a risk of committing the local
only files.

what would be good is a browser where it's possible to set the base
URL for local files. anyone know one?

- robert

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
that would work, but again, it takes away the simplicity of never  
having to think about it - what you see locally is what you get when  
you deploy, which is a really, really good QA benefit.

geir

On Sep 21, 2006, at 12:44 PM, robert burrell donkin wrote:

> On 9/21/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
>> I see Tim and Nadya  discussed this already.
>>
>> I think we want to keep it as error-free as possible...  I'm going to
>> try to just copy site.css on deployment - it means we still only
>> maintain one copy, but then offline and online is the same  
>> experience.
>
> one approach would be to parameterise the build by adding a local
> flag. when this flag is set on the command line, the template would
> used filepath logic when relativising. means changing the velocity
> template (but i'm guessing that you still remember how to do that ;-)
>
> - robert
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by robert burrell donkin <ro...@gmail.com>.
On 9/21/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> I see Tim and Nadya  discussed this already.
>
> I think we want to keep it as error-free as possible...  I'm going to
> try to just copy site.css on deployment - it means we still only
> maintain one copy, but then offline and online is the same experience.

one approach would be to parameterise the build by adding a local
flag. when this flag is set on the command line, the template would
used filepath logic when relativising. means changing the velocity
template (but i'm guessing that you still remember how to do that ;-)

- robert

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Re: [doc] problem w/ css locally?

Posted by "Geir Magnusson Jr." <ge...@pobox.com>.
I see Tim and Nadya  discussed this already.

I think we want to keep it as error-free as possible...  I'm going to  
try to just copy site.css on deployment - it means we still only  
maintain one copy, but then offline and online is the same experience.

geir

On Sep 21, 2006, at 12:19 PM, Geir Magnusson Jr. wrote:

> I'm doing some website work, and things aren't working locally.
>
> I can of course build, but when I look at the generated results, it  
> can't find the stylesheet, and the result is, well, awful.   Am I  
> doing something wrong?
>
> I can fix it by having
>
>         <link rel="Stylesheet" type="text/css" href="site.css"/>
>
> but that means that we have site.css everywhere?
>
> One of the advantages of our xdoc system is that you can generate  
> and view the site exactly as it will be seen when deployed, so we  
> should try and ensure we keep that property...
>
> geir
>
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org