I asked a while back how to have a custom font in my wiki. I was told that I need to edit the CCS. I am using the 'vector' style. I was not able to find the css for it. How does that work. Thank you.
Topic on Project:Support desk
You can make the change in your wiki's [[MediaWiki:Common.css]] page.
Thanks for your reply. What's the expected path? I don't see a common.css file or a vector.css in my wiki? Is it a file I have to create to override the default?
See Manual:Interface/Stylesheets for expected location, but basically it's a page you need to create on your wiki
Hi Ciencia Al Poder. Thank you for the link. I looked at it and checked the link (MediaWiki:Common.css) for a global common css which is I need. The page that it links to has been deleted. I'm not sure where to put the common.css file. Thank you.
You need to look at the MediaWiki:Common.css wiki page on your own wiki. If you want to see a wiki with a working copy of the page, you can see one one Wikipedia: https://en.wikipedia.org/wiki/MediaWiki:Common.css
Thanks, Mark.
Is this the correct link? It doesn't bring anything up for me.
http://wiki.worldofasdar.com/wiki/MediaWiki:Common.css
nor does this
This is your link: http://wiki.worldofasdar.com/index.php?title=MediaWiki:Common.css
A friend helped me find it. doh. http://wiki.worldofasdar.com/index.php?title=MediaWiki:Common.css
Thanks again.
Is this all the code I need in the CSS (with the appropriate substitutions)?
@font-face {
[ font-family: <family-name>; ] ||
[ src: [ <url> [ format(<string>#) ]? | <font-face-name> ]#; ] ||
[ unicode-range: <urange>#; ] ||
[ font-variant: <font-variant>; ] ||
[ font-feature-settings: normal | <feature-tag-value>#; ] ||
[ font-stretch: <font-stretch>; ] ||
[ font-weight: <weight>; ] ||
[ font-style: <style>; ]
}
where
<family-name> = <string> | <IDENT>+
<feature-tag-value> = <string> [ <integer> | on | off ]?
My intention is not to have the text of the entire wiki changed arbitrarily to another font or even of specific formatted sections (header, index, etc.). I want to be able to specify within a page that such and such text is in this font and have the rest of the text in the same given page be the standard font.
Once you've defined the @font-face, you can create your own CSS class like .specificfont { font-family: <family-name> } and then use that class where you want, like in <span class="specificfont>text</span>.
That's more a general CSS question than a MediaWiki-specific question, though. You can find more information about CSS fonts out there