Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Initial version of css-tricks.md, as requested in [https://fossil-scm.org/forum/forumpost/eb04fd28b5|forumpost/eb04fd28b5]. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
5900530223fc605d42b65a1f456164bb |
| User & Date: | stephan 2020-04-07 12:27:50.144 |
Context
|
2020-04-08
| ||
| 10:11 | Increase the default scroll threshold on forum posts from 25em to 40em. ... (check-in: 23d17bd248 user: drh tags: trunk) | |
|
2020-04-07
| ||
| 12:27 | Initial version of css-tricks.md, as requested in [https://fossil-scm.org/forum/forumpost/eb04fd28b5|forumpost/eb04fd28b5]. ... (check-in: 5900530223 user: stephan tags: trunk) | |
|
2020-04-06
| ||
| 15:54 | Prevent ridicuously wide forum posts display with the "vfx" query parameter on /timeline. ... (check-in: da7d816201 user: drh tags: trunk) | |
Changes
Added www/css-tricks.md.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# Fossil CSS Tips and Tricks
Many aspects of Fossil's appearance can be customized by
[customizing the site skin](customskin.md). This document
details certain specific CSS tweaks which users have asked
about via the forums.
This is a "living document" - please feel free to suggest
additions via [the Fossil forum](https://fossil-scm.org/forum/).
This document is *not* an introduction to CSS - the web is
full of tutorials on that topic. It covers only the specifics
of customizing certain CSS-based behaviors in a Fossil UI. That said...
# Overriding Default Rules
One behavior of the skinning system works considerably differently
from the cascading nature of CSS: if a skin applies a CSS selector for
which Fossil has a built-in default value, Fossil elides the entire
default definition for that rule. i.e., the skin's definition is the
only one which is applied, rather than cascading the definition from
the default value.
For example, if Fossil has a default CSS rule which looks like:
```css
div.foo {
font-size: 120%;
margin-left: 1em;
}
```
And a skin has:
```css
div.foo {}
```
Then Fossil will *not* emit its default rule and the user's copy will
become the only definition of that CSS rule. This is different from
normal CSS cascading rules, in which the above sequence would result
in, effectively, the top set of rules being applied because the second
(empty) one does not override anything from the first.
If a skin applies a given selector more than once, or imports external
style sheets which do, those cascade following CSS's normal rules.
## Is it Really `!important`?
By and large, CSS's `!important` qualifier is not needed when
customzing Fossil's CSS. On occasion, however, particular styles may
be set directly on DOM elements when Fossil generates its HTML, and
such cases require the user of `!important` to override them.
<!-- ============================================================ -->
# Main UI CSS
## Number of Columns in `/dir` View
The width of columns on the [`/dir` page](/dir) is calculated
dynamically as the page is generated, to attempt to fit the widest
name in a given directory. The number of columns is determined
automatically by CSS. To modify the number of columns and/or the entry width:
```css
div.columns {
columns: WIDTH COLUMN_COUNT !important;
/* Examples:
columns: 20ex 3 !important
columns: auto auto !important
*/
}
/* The default rule uses div.columns, but it can also be selected using: */
div.columns.files { ... }
```
The `!important` qualifier is required here because the style values are dynamically
calculated and applied when the HTML is emitted.
The file list itself can be further customized via:
```css
div.columns > ul {
...
}
ul.browser {
...
}
```
<!-- ============================================================ -->
# Forum-specific CSS
## Limiting Display Length of Long Posts
Excessively long posts can make scrolling through threads problematic,
especially on mobile devices. The amount of a post which is visible can
be configured using:
```css
div.forumPostBody {
max-height: 25em; /* change to the preferred maximum effective height */
overflow: auto; /* tells the browser to add scrollbars as needed */
}
```
|
Changes to www/mkindex.tcl.
| ︙ | ︙ | |||
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
changes.wiki {Fossil Changelog}
checkin_names.wiki {Check-in And Version Names}
checkin.wiki {Check-in Checklist}
childprojects.wiki {Child Projects}
copyright-release.html {Contributor License Agreement}
concepts.wiki {Fossil Core Concepts}
contribute.wiki {Contributing Code or Documentation To The Fossil Project}
customgraph.md {Theming: Customizing the Timeline Graph}
customskin.md {Theming: Customizing The Appearance of Web Pages}
customskin.md {Custom Skins}
custom_ticket.wiki {Customizing The Ticket System}
defcsp.md {The Default Content Security Policy}
delta_encoder_algorithm.wiki {Fossil Delta Encoding Algorithm}
delta_format.wiki {Fossil Delta Format}
| > | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
changes.wiki {Fossil Changelog}
checkin_names.wiki {Check-in And Version Names}
checkin.wiki {Check-in Checklist}
childprojects.wiki {Child Projects}
copyright-release.html {Contributor License Agreement}
concepts.wiki {Fossil Core Concepts}
contribute.wiki {Contributing Code or Documentation To The Fossil Project}
css-tricks.md {Fossil CSS Tips and Tricks}
customgraph.md {Theming: Customizing the Timeline Graph}
customskin.md {Theming: Customizing The Appearance of Web Pages}
customskin.md {Custom Skins}
custom_ticket.wiki {Customizing The Ticket System}
defcsp.md {The Default Content Security Policy}
delta_encoder_algorithm.wiki {Fossil Delta Encoding Algorithm}
delta_format.wiki {Fossil Delta Format}
|
| ︙ | ︙ |
Changes to www/permutedindex.html.
| ︙ | ︙ | |||
74 75 76 77 78 79 80 81 82 83 84 85 86 87 | <li><a href="contribute.wiki"><b>Contributing Code or Documentation To The Fossil Project</b></a></li> <li><a href="copyright-release.html"><b>Contributor License Agreement</b></a></li> <li><a href="whyusefossil.wiki">Control — Benefits Of Version</a></li> <li><a href="concepts.wiki">Core Concepts — Fossil</a></li> <li><a href="newrepo.wiki">Create A New Fossil Repository — How To</a></li> <li><a href="private.wiki"><b>Creating, Syncing, and Deleting Private Branches</b></a></li> <li><a href="qandc.wiki">Criticisms — Questions And</a></li> <li><a href="customskin.md"><b>Custom Skins</b></a></li> <li><a href="customskin.md">Customizing The Appearance of Web Pages — Theming:</a></li> <li><a href="custom_ticket.wiki"><b>Customizing The Ticket System</b></a></li> <li><a href="customgraph.md">Customizing the Timeline Graph — Theming:</a></li> <li><a href="tech_overview.wiki">Databases Used By Fossil — SQLite</a></li> <li><a href="defcsp.md">Default Content Security Policy — The</a></li> <li><a href="antibot.wiki"><b>Defense against Spiders and Bots</b></a></li> | > | 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | <li><a href="contribute.wiki"><b>Contributing Code or Documentation To The Fossil Project</b></a></li> <li><a href="copyright-release.html"><b>Contributor License Agreement</b></a></li> <li><a href="whyusefossil.wiki">Control — Benefits Of Version</a></li> <li><a href="concepts.wiki">Core Concepts — Fossil</a></li> <li><a href="newrepo.wiki">Create A New Fossil Repository — How To</a></li> <li><a href="private.wiki"><b>Creating, Syncing, and Deleting Private Branches</b></a></li> <li><a href="qandc.wiki">Criticisms — Questions And</a></li> <li><a href="css-tricks.md">CSS Tips and Tricks — Fossil</a></li> <li><a href="customskin.md"><b>Custom Skins</b></a></li> <li><a href="customskin.md">Customizing The Appearance of Web Pages — Theming:</a></li> <li><a href="custom_ticket.wiki"><b>Customizing The Ticket System</b></a></li> <li><a href="customgraph.md">Customizing the Timeline Graph — Theming:</a></li> <li><a href="tech_overview.wiki">Databases Used By Fossil — SQLite</a></li> <li><a href="defcsp.md">Default Content Security Policy — The</a></li> <li><a href="antibot.wiki"><b>Defense against Spiders and Bots</b></a></li> |
| ︙ | ︙ | |||
119 120 121 122 123 124 125 126 127 128 129 130 131 132 | <li><a href="image-format-vs-repo-size.md">Format vs Fossil Repo Size — Image</a></li> <li><a href="../../../md_rules">Formatting Rules — Markdown</a></li> <li><a href="../../../wiki_rules">Formatting Rules — Wiki</a></li> <li><a href="forum.wiki">Forums — Fossil</a></li> <li><a href="blockchain.md"><b>Fossil As Blockchain</b></a></li> <li><a href="changes.wiki"><b>Fossil Changelog</b></a></li> <li><a href="concepts.wiki"><b>Fossil Core Concepts</b></a></li> <li><a href="delta_encoder_algorithm.wiki"><b>Fossil Delta Encoding Algorithm</b></a></li> <li><a href="delta_format.wiki"><b>Fossil Delta Format</b></a></li> <li><a href="hacker-howto.wiki"><b>Fossil Developers Guide</b></a></li> <li><a href="fileformat.wiki"><b>Fossil File Format</b></a></li> <li><a href="forum.wiki"><b>Fossil Forums</b></a></li> <li><a href="grep.md"><b>Fossil grep vs POSIX grep</b></a></li> <li><a href="quickstart.wiki"><b>Fossil Quick Start Guide</b></a></li> | > | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | <li><a href="image-format-vs-repo-size.md">Format vs Fossil Repo Size — Image</a></li> <li><a href="../../../md_rules">Formatting Rules — Markdown</a></li> <li><a href="../../../wiki_rules">Formatting Rules — Wiki</a></li> <li><a href="forum.wiki">Forums — Fossil</a></li> <li><a href="blockchain.md"><b>Fossil As Blockchain</b></a></li> <li><a href="changes.wiki"><b>Fossil Changelog</b></a></li> <li><a href="concepts.wiki"><b>Fossil Core Concepts</b></a></li> <li><a href="css-tricks.md"><b>Fossil CSS Tips and Tricks</b></a></li> <li><a href="delta_encoder_algorithm.wiki"><b>Fossil Delta Encoding Algorithm</b></a></li> <li><a href="delta_format.wiki"><b>Fossil Delta Format</b></a></li> <li><a href="hacker-howto.wiki"><b>Fossil Developers Guide</b></a></li> <li><a href="fileformat.wiki"><b>Fossil File Format</b></a></li> <li><a href="forum.wiki"><b>Fossil Forums</b></a></li> <li><a href="grep.md"><b>Fossil grep vs POSIX grep</b></a></li> <li><a href="quickstart.wiki"><b>Fossil Quick Start Guide</b></a></li> |
| ︙ | ︙ | |||
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | <li><a href="th1.md"><b>The TH1 Scripting Language</b></a></li> <li><a href="customskin.md"><b>Theming: Customizing The Appearance of Web Pages</b></a></li> <li><a href="customgraph.md"><b>Theming: Customizing the Timeline Graph</b></a></li> <li><a href="theory1.wiki"><b>Thoughts On The Design Of The Fossil DVCS</b></a></li> <li><a href="custom_ticket.wiki">Ticket System — Customizing The</a></li> <li><a href="tickets.wiki">Ticket System — The Fossil</a></li> <li><a href="customgraph.md">Timeline Graph — Theming: Customizing the</a></li> <li><a href="hints.wiki">Tips And Usage Hints — Fossil</a></li> <li><a href="bugtheory.wiki">Tracking In Fossil — Bug</a></li> <li><a href="unvers.wiki"><b>Unversioned Files</b></a></li> <li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li> <li><a href="hints.wiki">Usage Hints — Fossil Tips And</a></li> <li><a href="javascript.md"><b>Use of JavaScript in Fossil</b></a></li> <li><a href="fiveminutes.wiki">User — Up and Running in 5 Minutes as a Single</a></li> <li><a href="caps/">User Capabilities — Administering</a></li> <li><a href="caps/ref.html"><b>User Capability Reference</b></a></li> | > > | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 | <li><a href="th1.md"><b>The TH1 Scripting Language</b></a></li> <li><a href="customskin.md"><b>Theming: Customizing The Appearance of Web Pages</b></a></li> <li><a href="customgraph.md"><b>Theming: Customizing the Timeline Graph</b></a></li> <li><a href="theory1.wiki"><b>Thoughts On The Design Of The Fossil DVCS</b></a></li> <li><a href="custom_ticket.wiki">Ticket System — Customizing The</a></li> <li><a href="tickets.wiki">Ticket System — The Fossil</a></li> <li><a href="customgraph.md">Timeline Graph — Theming: Customizing the</a></li> <li><a href="css-tricks.md">Tips and Tricks — Fossil CSS</a></li> <li><a href="hints.wiki">Tips And Usage Hints — Fossil</a></li> <li><a href="bugtheory.wiki">Tracking In Fossil — Bug</a></li> <li><a href="css-tricks.md">Tricks — Fossil CSS Tips and</a></li> <li><a href="unvers.wiki"><b>Unversioned Files</b></a></li> <li><a href="fiveminutes.wiki"><b>Up and Running in 5 Minutes as a Single User</b></a></li> <li><a href="hints.wiki">Usage Hints — Fossil Tips And</a></li> <li><a href="javascript.md"><b>Use of JavaScript in Fossil</b></a></li> <li><a href="fiveminutes.wiki">User — Up and Running in 5 Minutes as a Single</a></li> <li><a href="caps/">User Capabilities — Administering</a></li> <li><a href="caps/ref.html"><b>User Capability Reference</b></a></li> |
| ︙ | ︙ |