Fossil User Forum

customizing a skin
Login

customizing a skin

customizing a skin

(1) By anonymous on 2020-02-20 02:33:05 [source]

I am trying to setup a new repo on chiselapp.com, which appears to using Fossil [9aa9ba8bd2]. Admittedly out of date, but what I have to work with.

Anyway, I went to the setup_skin page and initialized draft1 to the built-in "Eagle" skin, which close to what I want.

I clicked on the link to display "draft1/home". It looked as expected.

I then clicked on "CSS" to edit the draft1 CSS. My first edit was to change the background color to darker blue:

    body {
      margin: 0ex 1ex;
      padding: 0px;
      background-color: #000066;
      font-family: sans-serif;
      color: white;
      -moz-text-size-adjust: none;
      -webkit-text-size-adjust: none;
      -mx-text-size-adjust: none;
    }

I then clicked the link display "draft1/home" again. The background color didn't change. Even after finding and changing all background-color attributes, the background color still didn't change.

So, I opened the page source and looked at the style element in the HTML header. The link was to "draft2/style.css?id=1397b4f3". When I used wget to view that link, I saw that the backgound-color attributes had not changed.

Then I used wget to view "draft2/style.css" In that, the background-color attributes had the value I specified.

What is going on?

(2) By Stephan Beal (stephan) on 2020-02-20 03:23:13 in reply to 1 [link] [source]

i don't have an answer but want to suggest a different approach to editing skin CSS which has worked out well for me...

In the page's header HTML, immediately after the line which imports skin.css, add something like:

<link rel="stylesheet" href="$baseurl/doc/ckout/path/to/skin-overrides.css" type="text/css" />

And add the file path/to/skin-overrides.css to your repository.

When running in local fossil server or fossil ui mode, /doc/ckout will use the copy of that file which is checked out locally, meaning that you can use your CSS-aware tools to edit that file and see the changes in fossil each time you reload a page. When accessing the repo via a remote server or CGI (like chiselapp), /doc/ckout is equivalent to /doc/tip, so the newest version will be served (with the minor caveat that "tip" necessarily ignores branches: it will pull the copy from whichever branch is the the most current in the timeline).

Aside from being easier (IMO) to manage and edit, it removes the possibility of accidentally losing skin customizations when updating a repo's skin after a fossil upgrade which modifies that skin.

(3) By anonymous on 2020-02-20 03:26:41 in reply to 2 [link] [source]

Thanks, I will try that.