MediaWiki:Mobile.css: Difference between revisions
Jump to navigation
Jump to search
Add ItemIcon css |
mNo edit summary |
||
Line 2: | Line 2: | ||
:root.skin-citizen-dark { | :root.skin-citizen-dark { | ||
--color-primary__h: 20; | |||
--color-surface-0: hsl(var(--color-primary__h) 20% 8%); | |||
--color-surface-1: hsl(var(--color-primary__h) 20% 10%); | |||
--color-surface-2: hsl(var(--color-primary__h) 20% 12%); | |||
--background-color-overlay: hsla(var(--color-primary__h) 20% 8% / 95%); | |||
--background-color-overlay--lighter: hsl(var(--color-primary__h) 20% 8% / 60%) | |||
} | } | ||
Line 122: | Line 122: | ||
/* ItemIcon rarity colors */ | /* ItemIcon rarity colors */ | ||
:root { | :root { | ||
--bg3wiki-itemicon-common: 72, 72, 72; | |||
--bg3wiki-itemicon-uncommon: 1, 189, 57; | |||
--bg3wiki-itemicon-rare: 1, 191, 255; | |||
--bg3wiki-itemicon-very-rare: 209, 1, 123; | |||
--bg3wiki-itemicon-legendary: 183, 134, 29; | |||
--bg3wiki-itemicon-story: 255, 89, 1; | |||
--bg3wiki-itemicon-gradient-top-opacity: 0%; | |||
--bg3wiki-itemicon-gradient-bot-opacity: 12.5%; | |||
--bg3wiki-itemicon-border-opacity: 60%; | |||
} | } | ||
.bg3wiki-itemicon-wrapper { | .bg3wiki-itemicon-wrapper { | ||
text-align: center; | |||
white-space: nowrap; | |||
} | } | ||
.bg3wiki-itemicon { | .bg3wiki-itemicon { | ||
display: inline-block; | |||
background: linear-gradient( | |||
rgba(var(--rarity-color), var(--bg3wiki-itemicon-gradient-top-opacity)), | |||
rgba(var(--rarity-color), var(--bg3wiki-itemicon-gradient-bot-opacity)) | |||
); | |||
border: solid 1px rgba(var(--rarity-color), var(--bg3wiki-itemicon-border-opacity)); | |||
} | } | ||
/* we will alias the appropriate color to improve readability */ | /* we will alias the appropriate color to improve readability */ | ||
body .bg3wiki-itemicon-common { | body .bg3wiki-itemicon-common { | ||
--rarity-color: var(--bg3wiki-itemicon-common); | |||
} | } | ||
body .bg3wiki-itemicon-uncommon { | body .bg3wiki-itemicon-uncommon { | ||
--rarity-color: var(--bg3wiki-itemicon-uncommon); | |||
} | } | ||
body .bg3wiki-itemicon-rare { | body .bg3wiki-itemicon-rare { | ||
--rarity-color: var(--bg3wiki-itemicon-rare); | |||
} | } | ||
Line 164: | Line 164: | ||
This helps work around that issue.*/ | This helps work around that issue.*/ | ||
body .bg3wiki-itemicon-very.rare { | body .bg3wiki-itemicon-very.rare { | ||
--rarity-color: var(--bg3wiki-itemicon-very-rare); | |||
} | } | ||
body .bg3wiki-itemicon-very-rare { | body .bg3wiki-itemicon-very-rare { | ||
--rarity-color: var(--bg3wiki-itemicon-very-rare); | |||
} | } | ||
body .bg3wiki-itemicon-legendary { | body .bg3wiki-itemicon-legendary { | ||
--rarity-color: var(--bg3wiki-itemicon-legendary); | |||
} | } | ||
body .bg3wiki-itemicon-story { | body .bg3wiki-itemicon-story { | ||
--rarity-color: var(--bg3wiki-itemicon-story); | |||
} | } |
Revision as of 11:36, 18 September 2023
/* All CSS here will be loaded for users of the mobile site */
:root.skin-citizen-dark {
--color-primary__h: 20;
--color-surface-0: hsl(var(--color-primary__h) 20% 8%);
--color-surface-1: hsl(var(--color-primary__h) 20% 10%);
--color-surface-2: hsl(var(--color-primary__h) 20% 12%);
--background-color-overlay: hsla(var(--color-primary__h) 20% 8% / 95%);
--background-color-overlay--lighter: hsl(var(--color-primary__h) 20% 8% / 60%)
}
/*
* Various elements used across the wiki
*/
/* Info blob */
div.bg3wiki-info-blob {
display: inline-block;
padding: 0 1em 0 1em;
border-radius: 20px;
}
span.bg3wiki-info-blob {
padding: 0 0.5em 0 0.5em;
border-radius: 10px;
}
.bg3wiki-info-blob {
background-color: var(--color-surface-1);
font-family: monospace;
}
/* D20 background image for numbers */
.bg3wiki-d20-bg {
background-image: url('/static/d20-bg.png');
background-position: center;
background-repeat: no-repeat;
background-size: 35px;
}
/* Coordinates */
.skin-citizen-dark .bg3wiki-coordinates {
font-family: 'Linux Libertine', 'Georgia', serif;
text-shadow: 1px 1px 2px #000, -1px -1px 2px #000;
color: #AB9F89;
background: #34323285;
border-radius: 5px;
padding: 3px 5px;
box-shadow: 1px 1px 5px #00000030;
}
/* Item, spell, etc. properties */
.bg3wiki-property-list dt {
font-weight: normal;
}
.bg3wiki-property-list dd {
margin-left: 0;
}
.mw-content-ltr ul.bg3wiki-property-list {
margin-left: 0;
list-style: none;
}
/* Imitating in-game tooltips */
.skin-citizen-dark .bg3wiki-tooltip-box {
background: #1B1A19;
box-shadow:
rgba(0, 0, 0, 0.14) 3px 3px 6px 0px inset,
rgba(0, 0, 0, 0.14) -3px -3px 6px 1px inset;
border: 0.15rem solid #785000;
border-radius: 10px;
padding: 15px;
}
.skin-citizen-dark .bg3wiki-tooltip-gradient-common {
background: linear-gradient(to bottom, #1B1A1999, #1B1A1999, #1B1A1999, #40295199);
}
.skin-citizen-dark .bg3wiki-tooltip-gradient-uncommon {
background: linear-gradient(to bottom, #00491599, #1B1A1999, #1B1A1999, #40295199);
}
.skin-citizen-dark .bg3wiki-tooltip-gradient-rare {
background: linear-gradient(to bottom, #00374999, #1B1A1999, #1B1A1999, #40295199);
}
.skin-citizen-dark .bg3wiki-tooltip-gradient-veryrare {
background: linear-gradient(to bottom, #54003299, #1B1A1999, #1B1A1999, #40295199);
}
.skin-citizen-dark .bg3wiki-tooltip-gradient-legendary {
background: linear-gradient(to bottom, #563E0D99, #1B1A1999, #1B1A1999, #40295199);
}
.skin-citizen-dark .bg3wiki-tooltip-gradient-story {
background: linear-gradient(to bottom, #561D0099, #1B1A1999, #1B1A1999, #40295199);
}
.bg3wiki-book-text p {
font-family: 'Linux Libertine', 'Georgia', serif;
}
/* Spoilers */
.bg3wiki-spoiler-blur {
filter: blur(3px);
opacity: 0.2;
transition-property: filter, opacity;
transition-duration: .4s;
}
.bg3wiki-spoiler-blur:hover, .bg3wiki-spoiler-blur:focus {
filter: none;
opacity: 1;
}
/* ItemIcon rarity colors */
:root {
--bg3wiki-itemicon-common: 72, 72, 72;
--bg3wiki-itemicon-uncommon: 1, 189, 57;
--bg3wiki-itemicon-rare: 1, 191, 255;
--bg3wiki-itemicon-very-rare: 209, 1, 123;
--bg3wiki-itemicon-legendary: 183, 134, 29;
--bg3wiki-itemicon-story: 255, 89, 1;
--bg3wiki-itemicon-gradient-top-opacity: 0%;
--bg3wiki-itemicon-gradient-bot-opacity: 12.5%;
--bg3wiki-itemicon-border-opacity: 60%;
}
.bg3wiki-itemicon-wrapper {
text-align: center;
white-space: nowrap;
}
.bg3wiki-itemicon {
display: inline-block;
background: linear-gradient(
rgba(var(--rarity-color), var(--bg3wiki-itemicon-gradient-top-opacity)),
rgba(var(--rarity-color), var(--bg3wiki-itemicon-gradient-bot-opacity))
);
border: solid 1px rgba(var(--rarity-color), var(--bg3wiki-itemicon-border-opacity));
}
/* we will alias the appropriate color to improve readability */
body .bg3wiki-itemicon-common {
--rarity-color: var(--bg3wiki-itemicon-common);
}
body .bg3wiki-itemicon-uncommon {
--rarity-color: var(--bg3wiki-itemicon-uncommon);
}
body .bg3wiki-itemicon-rare {
--rarity-color: var(--bg3wiki-itemicon-rare);
}
/* Parser functions break when used in dynamic cargo tables.
We need to use a parser function to turn "very rare" rarity to "very-rare".
This helps work around that issue.*/
body .bg3wiki-itemicon-very.rare {
--rarity-color: var(--bg3wiki-itemicon-very-rare);
}
body .bg3wiki-itemicon-very-rare {
--rarity-color: var(--bg3wiki-itemicon-very-rare);
}
body .bg3wiki-itemicon-legendary {
--rarity-color: var(--bg3wiki-itemicon-legendary);
}
body .bg3wiki-itemicon-story {
--rarity-color: var(--bg3wiki-itemicon-story);
}