CSS: Move author color padding to `setAuthorStyle()`
This prevents the padding from clashing with plugins that use the `aceSetAuthorStyle` hook.pull/5093/head
parent
2745557127
commit
3d40ab7e8c
|
@ -58,11 +58,6 @@ html.outer-editor, html.inner-editor {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#innerdocbody.authorColors span {
|
|
||||||
padding-top: 3px;
|
|
||||||
padding-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
option {
|
option {
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,18 +226,18 @@ function Ace2Inner(editorInfo, cssManagers) {
|
||||||
if ((typeof info.fade) === 'number') {
|
if ((typeof info.fade) === 'number') {
|
||||||
bgcolor = fadeColor(bgcolor, info.fade);
|
bgcolor = fadeColor(bgcolor, info.fade);
|
||||||
}
|
}
|
||||||
|
|
||||||
const authorStyle = cssManagers.inner.selectorStyle(authorSelector);
|
|
||||||
const parentAuthorStyle = cssManagers.parent.selectorStyle(authorSelector);
|
|
||||||
|
|
||||||
// author color
|
|
||||||
authorStyle.backgroundColor = bgcolor;
|
|
||||||
parentAuthorStyle.backgroundColor = bgcolor;
|
|
||||||
|
|
||||||
const textColor =
|
const textColor =
|
||||||
colorutils.textColorFromBackgroundColor(bgcolor, parent.parent.clientVars.skinName);
|
colorutils.textColorFromBackgroundColor(bgcolor, parent.parent.clientVars.skinName);
|
||||||
authorStyle.color = textColor;
|
const styles = [
|
||||||
parentAuthorStyle.color = textColor;
|
cssManagers.inner.selectorStyle(authorSelector),
|
||||||
|
cssManagers.parent.selectorStyle(authorSelector),
|
||||||
|
];
|
||||||
|
for (const style of styles) {
|
||||||
|
style.backgroundColor = bgcolor;
|
||||||
|
style.color = textColor;
|
||||||
|
style['padding-top'] = '3px';
|
||||||
|
style['padding-bottom'] = '4px';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue