|
Checker CSS and helper functions January 29, 2026 10:34PM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions January 29, 2026 10:34PM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions January 29, 2026 10:34PM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions January 29, 2026 10:34PM |
Admin Registered: 10 years ago Posts: 894 |
local args = {...}
local conf = args[1].config
local profileName = args[1].profileName
local profileId = args[1].profileId
local gccode = args[1].gccode -- gccode from the tag
ok = true;
local html = {}
table.insert(html, "<p>Geocache type icon</p>")
table.insert(html, PGC.Icon.GeocacheType('Traditional Cache'))
table.insert(html, "<p>Geocache size icon</p>")
table.insert(html, PGC.Icon.GeocacheSize('Large'))
table.insert(html, "<p>Found/owned</p>")
table.insert(html, PGC.Icon.GeocacheFound())
table.insert(html, PGC.Icon.GeocacheOwned())
table.insert(html, "<p>Misc</p>")
table.insert(html, PGC.Icon.Challenge())
table.insert(html, PGC.Icon.Check())
table.insert(html, PGC.Icon.Stop())
table.insert(html, PGC.Icon.Check(true))
table.insert(html, PGC.Icon.Stop(true))
table.insert(html, "<p>Flags</p>")
table.insert(html, PGC.Icon.CountryFlag('Sweden'))
table.insert(html, PGC.Icon.CountryFlag('United States'))
table.insert(html, PGC.Icon.CountryFlag('Ukraine'))
table.insert(html, "<p>Attributes</p>")
table.insert(html, PGC.Icon.Attribute(29))
table.insert(html, PGC.Icon.Attribute('Telephone nearby'))
table.insert(html, PGC.Icon.Attribute('Telephone nearby', 'yes'))
table.insert(html, PGC.Icon.Attribute('Telephone nearby', 'no'))
-- Showing CSS
table.insert(html, "<h3>Tables</h3>")
table.insert(html, "<h4>Basic table</h4>")
table.insert(html, "<table><tr><th>Header 1</th><th>Header 2</th><th>Header 3</th></tr><tr><td>Cell A1</td><td>Cell A2</td><td>Cell A3</td></tr><tr><td>Cell B1</td><td>Cell B2</td><td>Cell B3</td></tr></table>")
table.insert(html, "<h4>Bordered table</h4>")
table.insert(html, "<table class=\"table-bordered\"><tr><th>Header 1</th><th>Header 2</th><th>Header 3</th></tr><tr><td>Cell A1</td><td>Cell A2</td><td>Cell A3</td></tr><tr><td>Cell B1</td><td>Cell B2</td><td>Cell B3</td></tr></table>")
table.insert(html, "<h4>Striped rows</h4>")
table.insert(html, "<table class=\"table-striped\"><tbody><tr><th>Header 1</th><th>Header 2</th><th>Header 3</th></tr><tr><td>Row 1 Col 1</td><td>Row 1 Col 2</td><td>Row 1 Col 3</td></tr><tr><td>Row 2 Col 1</td><td>Row 2 Col 2</td><td>Row 2 Col 3</td></tr><tr><td>Row 3 Col 1</td><td>Row 3 Col 2</td><td>Row 3 Col 3</td></tr></tbody></table>")
table.insert(html, "<h4>Striped columns</h4>")
table.insert(html, "<table class=\"table-striped-columns\"><tr><th>Header 1</th><th>Header 2</th><th>Header 3</th><th>Header 4</th></tr><tr><td>Row 1 Col 1</td><td>Row 1 Col 2</td><td>Row 1 Col 3</td><td>Row 1 Col 4</td></tr><tr><td>Row 2 Col 1</td><td>Row 2 Col 2</td><td>Row 2 Col 3</td><td>Row 2 Col 4</td></tr></table>")
table.insert(html, "<h3>Colors</h3>")
table.insert(html, "<p><span class=\"bg-primary text-light\">Primary</span> <span class=\"bg-secondary text-light\">Secondary</span> <span class=\"bg-success text-light\">Success</span> <span class=\"bg-danger text-light\">Danger</span></p>")
table.insert(html, "<p><span class=\"bg-warning text-dark\">Warning</span> <span class=\"bg-info text-dark\">Info</span> <span class=\"bg-light text-dark\">Light</span> <span class=\"bg-dark text-light\">Dark</span></p>")
table.insert(html, "<h3>Text colors</h3>")
table.insert(html, "<p><span class=\"text-primary\">Primary text</span> <span class=\"text-success\">Success text</span> <span class=\"text-danger\">Danger text</span> <span class=\"text-warning\">Warning text</span></p>")
table.insert(html, "<h3>Text alignment</h3>")
table.insert(html, "<p class=\"align-left\">Left aligned text</p>")
table.insert(html, "<p class=\"align-center\">Center aligned text</p>")
table.insert(html, "<p class=\"align-right\">Right aligned text</p>")
table.insert(html, "<h3>Text utilities</h3>")
table.insert(html, "<p>Normal text and <span class=\"text-small\">smaller text</span></p>")
table.insert(html, "<p class=\"text-monospace\">This is monospace text for code examples</p>")
-- end CSS
html = table.concat(html, "\n")
return { ok = ok, log = log, html = html }
|
Re: Checker CSS and helper functions January 29, 2026 10:37PM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions January 31, 2026 08:50AM |
Registered: 10 years ago Posts: 2,095 |
|
Re: Checker CSS and helper functions January 31, 2026 10:13AM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions February 07, 2026 10:47PM |
Registered: 10 years ago Posts: 2,095 |
|
Re: Checker CSS and helper functions February 08, 2026 06:53PM |
Registered: 7 years ago Posts: 644 |
|
Re: Checker CSS and helper functions February 08, 2026 07:22PM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions February 08, 2026 07:31PM |
Registered: 7 years ago Posts: 644 |
|
Re: Checker CSS and helper functions February 08, 2026 07:54PM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions February 14, 2026 10:51AM |
Registered: 10 years ago Posts: 2,095 |
<table class="table-bordered" style="border: 1px solid black; border-collapse: collapse; width: auto;">
|
Re: Checker CSS and helper functions February 14, 2026 08:56PM |
Admin Registered: 10 years ago Posts: 894 |
Quote
However, I still don't manage to get tables with "1px solid black" borders using CSS classes.
Quote
I tried switching on borders with your class and then to override the border style and make it inherited to the TDs like this, but it did not work
`.align-center` can be used on `th` and `td`. It would however require the class to be added to all of them. I'll make sure to add a new CSS rule so that `aligne-left|center-right` can be added on a `table` or `tr` as well. Release expected late Wednesday CET (like 8-10 pm).Quote
Also I did not find any class for my table that would make the <TH> and <TD> elements use "text-align: center". That would be really helpful, because otherwise I need to define it again on every single cell.
I will make sure that we change the 100% to auto as well. At the same time I will add:Quote
Also can you please make "width: auto;" the default for tables? Your default "width: 100%;" is breaking the output for many scripts.
table.full-width {
width: 100%;
}
|
Re: Checker CSS and helper functions February 14, 2026 10:24PM |
Registered: 10 years ago Posts: 2,095 |
|
Re: Checker CSS and helper functions February 19, 2026 11:46PM |
Registered: 10 years ago Posts: 2,095 |
|
Re: Checker CSS and helper functions February 20, 2026 09:28AM |
Admin Registered: 10 years ago Posts: 894 |
|
Re: Checker CSS and helper functions February 23, 2026 03:03PM |
Registered: 10 years ago Posts: 2,095 |
|
Re: Checker CSS and helper functions March 04, 2026 11:25AM |
Admin Registered: 10 years ago Posts: 894 |
Quote
Notice that everything is left-aligned...
Quote
... and how badly the border is visible between the cache types.
Quote
P.S.: If you would like a more uniform design, you can define background colors for table cells that are
- not fulfilled (usually red is used in checkers so far)
- partially fulfilled (usually some kind of yellow or orange))
- fulfilled (some kind of green)
- fulfilled and selected (some other kind of green)
- primary - secondary - success - danger - warning - info - light - dark
Quote
I tested a bit more with "<table class="table-bordered align-center">".
The "align-center" works nicely for <TD>s, but not for <TH>s:
Quote
Also I'm still struggling to find background colors that work with your border color.
Your very light gray border may be OK for a white background, but with colored backgrounds it is barely visible. I still think we need something darker here.
Quote
Sure, take your time. I just wanted to give early feedback so that you can better understand our use cases and requirements.
Quote
In the meantime I compared a bit more our different grids (i.e. DT, calendar, and others) and I think we need a few more colors
Quote
So a red-yellow-green color scheme for failed / in progress / passed is pretty common, but may pose a problem for color blind people
|
Re: Checker CSS and helper functions March 04, 2026 06:42PM |
Registered: 10 years ago Posts: 2,095 |
<table class="vertical-align-middle">which would cause all TDs and THs of the table to use style "vertical-align: middle".
|
Re: Checker CSS and helper functions March 04, 2026 08:23PM |
Admin Registered: 10 years ago Posts: 894 |
/* Vertical alignment */
#cc_HtmlFeedback table.valign-top th,
#cc_HtmlFeedback table.valign-top td,
#cc_HtmlFeedback table tr.valign-top,
#cc_HtmlFeedback table tr td.valign-top,
#cc_HtmlFeedback table tr th.valign-top {
vertical-align: top;
}
#cc_HtmlFeedback table.valign-middle th,
#cc_HtmlFeedback table.valign-middle td,
#cc_HtmlFeedback table tr.valign-middle,
#cc_HtmlFeedback table tr td.valign-middle,
#cc_HtmlFeedback table tr th.valign-middle {
vertical-align: middle;
}
#cc_HtmlFeedback table.valign-bottom th,
#cc_HtmlFeedback table.valign-bottom td,
#cc_HtmlFeedback table tr.valign-bottom,
#cc_HtmlFeedback table tr td.valign-bottom,
#cc_HtmlFeedback table tr th.valign-bottom {
vertical-align: bottom;
}
|
Re: Checker CSS and helper functions March 08, 2026 09:10AM |
Registered: 10 years ago Posts: 2,095 |