User:DoggoBit/Sandbox/Infobox board: Difference between revisions
No edit summary |
No edit summary |
||
Line 32: | Line 32: | ||
==Implementation details== | ==Implementation details== | ||
All CSS properties are implemented via variables, so style inheritance | The ''"logical"'' elements of the box are also captured via CSS classes, so any styles could be incorporated into the website's [[MediaWiki:common.css]]. Each element has two classes: <code>nix-wiki</code> and <code>infobox-something</code>. | ||
All CSS properties are implemented via variables, so style inheritance would apply if the styles would be moved into the global CSS. I.e. surrounding the template in a div that overrides any one of the values will propagate the changes. For example: | |||
<pre> | <pre> | ||
Line 42: | Line 44: | ||
</pre> | </pre> | ||
In the meantime, the CSS variables can also be set via MediaWiki variables, so we could easily implement something like: | |||
<pre> | |||
{{Infobox board | |||
|color=green | |||
... | |||
}} | |||
</pre> | |||
I wold ''personally'' love to top-align the content cells, so that we don't get the staggered lines on multi-line cells, but that would be a lot of manual work now, and would result in an overly complicated template. However, it should be a common.css one-liner. | I wold ''personally'' love to top-align the content cells, so that we don't get the staggered lines on multi-line cells, but that would be a lot of manual work now, and would result in an overly complicated template. However, it should be a common.css one-liner. | ||
</noinclude> | </noinclude> |