This article is a stub.
You can help the Fandom Developers Wiki by expanding it.
- Description
- This creates a button consistent with Fandom Design System.
- Dependencies
- Styling in MediaWiki:Wds-button.css (cf. w:Help:Including additional CSS and JS)
- CSS (syntax)
.wds-button.<classname> {
color: #fff;
background: none;
}
.wds-button.<classname>:not(.wds-is-text):not(.wds-is-secondary) {
background-color: <color 1a>;
}
.wds-button .<classname>:not(.wds-is-text):not(.wds-is-secondary):focus:not(:disabled),
.wds-button .<classname>:not(.wds-is-text):not(.wds-is-secondary):hover:not(:disabled),
.wds-button .<classname>:not(.wds-is-text):not(.wds-is-secondary):active,
.wds-button .<classname>:not(.wds-is-text):not(.wds-is-secondary).wds-is-active {
background-color: <color 1b>;
border-color: <color 1b>;
}
.wds-button.<classname>:not(.wds-is-text) {
border-color: <color 1a>;
}
.wds-button.<classname>.wds-is-secondary{
border-color: <color 2a>;
color: <color 2a>;
}
.wds-button.<classname>.wds-is-secondary:focus:not(:disabled),
.wds-button.<classname>.wds-is-secondary:hover:not(:disabled),
.wds-button.<classname>.wds-is-secondary:active,
.wds-button.<classname>.wds-is-secondary.wds-is-active {
border-color: <color 2b>;
color: <color 2b>;
}
.wds-button.<classname>.wds-is-text{
color: <color 2a>;
}
.wds-button.<classname>.wds-is-text:focus:not(:disabled),
.wds-button.<classname>.wds-is-text:hover:not(:disabled),
.wds-button.<classname>.wds-is-text:active,
.wds-button.<classname>.wds-is-text.wds-is-active{
color: <color 2b>;
}
- Syntax
{{button|<link or URL>|<text>}}
- There are several variables for customization.
- text= <text shown in button>
- link= <internal link redirected by the button>
- elink= <external link redirected by the button, must start with http://>
- tooltip= <hover text>
- position= <position, left/center/right>
- class= <class(es) of button>
- style= <style of button>
- Example
- Normal example
{{button|Main Page}}
{{button|https://www.fandom.com/|Fandom}}
{{button|text=Disabled}}
gives
{{button|Main Page|position=right}}
{{button|Main Page|position=center}}gives
- Secondary button (on light backgrounds)
{{button|Main Page|link=Main Page|class=wds-is-secondary}}
- Secondary button (on dark backgrounds)
- Text button (on light backgrounds)
{{button|Main Page|link=Main Page|class=wds-is-text}}
- Text button (on dark backgrounds)
- Other examples
- Fandom default buttons
{{button|Main Page|link=Main Page|class=wds-is-fandom-color}}
{{button|Disabled|link=Main Page|class=wds-is-fandom-color}}
- Secondary button (on light backgrounds)
{{button|Main Page|link=Main Page|class=wds-is-fandom-color wds-is-secondary}}
- Secondary button (on dark backgrounds)
- Text button (on light backgrounds)
{{button|Main Page|link=Main Page|class=wds-is-fandom-color wds-is-text}}
- Text button (on dark backgrounds)
- Oasis buttons
{{button|Main Page|link=Main Page|class=wds-is-oasis-color}}
{{button|text=Disabled|class=wds-is-oasis-color}}
gives
- Jade buttons
{{button|Main Page|link=Main Page|class=wds-is-jade-color}}
{{button|text=Disabled|class=wds-is-jade-color}}
gives
- Babygirl buttons
{{button|Main Page|link=Main Page|class=wds-is-babygirl-color}}
{{button|text=Disabled|class=wds-is-babygirl-color}}
gives
- Carbon buttons
{{button|Main Page|link=Main Page|class=wds-is-carbon-color}}
{{button|text=Disabled|class=wds-is-carbon-color}}
gives
- Secondary button (on light backgrounds)
{{button|Main Page|link=Main Page|class=wds-is-carbon-color wds-is-secondary}}
- Secondary button (on dark backgrounds)
- Text button (on light backgrounds)
{{button|Main Page|link=Main Page|class=wds-is-carbon-color wds-is-text}}
- Text button (on dark backgrounds)
- Rockgarden buttons
{{button|Main Page|link=Main Page|class=wds-is-rockgarden-color}}
{{button|text=Disabled|class=wds-is-rockgarden-color}}
gives
- Opulence buttons
{{button|Main Page|link=Main Page|class=wds-is-opulence-color}}
{{button|text=Disabled|class=wds-is-opulence-color}}
gives
- Bluesteel buttons
{{button|Main Page|link=Main Page|class=wds-is-bluesteel-color}}
{{button|text=Disabled|class=wds-is-bluesteel-color}}
gives
- Creamsicle buttons
{{button|Main Page|link=Main Page|class=wds-is-creamsicle-color}}
{{button|text=Disabled|class=wds-is-creamsicle-color}}
gives
- Plated buttons
{{button|Main Page|link=Main Page|class=wds-is-plated-color}}
{{button|text=Disabled|class=wds-is-plated-color}}
gives
- Police buttons
{{button|Main Page|link=Main Page|class=wds-is-police-color}}
{{button|text=Disabled|class=wds-is-police-color}}
gives
- Aliencrate buttons
{{button|Main Page|link=Main Page|class=wds-is-aliencrate-color}}
{{button|text=Disabled|class=wds-is-aliencrate-color}}
gives
- Theming buttons
{{button|Main Page|link=Main Page|class=primary-only}}
{{button|Main Page|link=Main Page|class=primary-only wds-is-secondary}}
{{button|Main Page|link=Main Page|class=primary-only wds-is-text}}
{{button|text=Disabled|class=primary-only}}
gives
{{button|Main Page|link=Main Page|class=different-secondary}}
{{button|Main Page|link=Main Page|class=different-secondary wds-is-secondary}}
{{button|Main Page|link=Main Page|class=different-secondary wds-is-text}}
{{button|text=Disabled|class=different-secondary}}
gives
- Customized
{{button|https://discord.gg/fandom|Fandom Discord Server|style=background:#7289da; border:4px solid #7289da; color:#FFF; display:inline-block; font-weight:bold; font-family:rubik;}}
- See also