[Cartoweb-users] non-cartoweb CSS file location
Chris Duncan, GISmatters
duncan at gismatters.com
Fri Jun 20 15:06:57 EDT 2008
Is it correct that if I want to use a CSS file that has nothing to do
with Cartoweb (for example, it styles the website's "skin" in which
I'm embedding a Cartoweb application), I just put that CSS file
directly into the cartoweb3/htdocs/css folder?
That appears to be the way I have to do it, but it seems inconsistent
with Cartoweb's project customization approach. I first expected that
I should put the custom CSS file into
cartoweb3/projects/myproject/htdocs/css, along with my other
Cartoweb-override CSS files; but if I do that, it doesn't get copied
to the main htdocs/css folder as I expected, and it certainly doesn't
get used (it's outside the web server's root folder).
So, I'm just looking for clarification that I'm doing it right, or
making a suggestion to improve the consistency. The way it is now (if
I've understood it correctly), I cannot keep all of my project files
under my project folder... at least this one CSS file has to live in
the live htdocs/css folder, which makes it more difficult to manage my
project files, backups, portability, etc. because they are not all
under one project directory.
I should also say that the reason I need this file in the Cartoweb
universe is that there were a number of collisions of CSS ids and
classes between this CSS file and some of the Cartoweb CSS files.
Also, I do not have control over the rest of the website -- I'm just
developing a single page with their skin and a Cartoweb application.
Therefore, I had to take one of their CSS files and rename some of the
classes and ids to avoid collision with the Cartoweb names, and now I
consider it a part of my Cartoweb project and want to keep it with the
other project files. Am I making sense?
It's probably too late now, without breaking lots of Cartoweb apps,
but it would be a good practice to use a prefix (e.g., "cw_") in CSS
files as well, so you don't have generic CSS entities like
"content"... they should be "cw_content", etc.
Chris Duncan, Ph.D.
duncan at GISmatters.com
1 Tuckerman Ln
Amherst, MA 01002
More information about the Cartoweb-users