1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-09 07:40:53 +00:00
* Changed: Remove the `Override Channel Points Rendering` experiment. Now enabled for all users.
* Fixed: Update the theme generation rules when using accent colors.
* Fixed: Swap Sidebars and Hide Side Navigation when experiencing the experiment that expands the side navigation bar on hover.
* API Changed: Allow `overlay` rich tokens to have a background color.
This commit is contained in:
SirStendec 2020-08-21 15:59:13 -04:00
parent 6056b87202
commit 0d61922164
13 changed files with 59 additions and 33 deletions

View file

@ -19,9 +19,9 @@ const VALID_WEIGHTS = ['regular', 'bold', 'semibold'],
VALID_PADDING = {
small: '05',
normal: 'normal',
large: 'large',
huge: 'huge'
normal: '1',
large: '2',
huge: '3'
};
@ -867,13 +867,36 @@ TOKEN_TYPES.overlay = function(token, createElement, ctx) {
);
}
const classes = ['ffz--overlay'];
const style = {};
if ( token.background ) {
if ( VALID_COLORS.includes(token.background) )
classes.push(`tw-c-background-${token.background}`);
else
style.backgroundColor = token.background;
}
if ( token.color ) {
if ( VALID_COLORS.includes(token.color) )
classes.push(`tw-c-text-${token.color}`);
else
style.color = token.color;
}
if ( ctx.vue )
return createElement('div', {class: 'ffz--overlay'}, [
return createElement('div', {
class: classes,
style
}, [
createElement('div', {class: 'ffz--overlay__content'}, content),
...corners
]);
return createElement('div', {className: 'ffz--overlay'}, [
return createElement('div', {
className: classes.join(' '),
style
}, [
createElement('div', {className: 'ffz--overlay__content'}, content),
...corners
]);