mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
CSS: Move author color padding to setAuthorStyle()
This prevents the padding from clashing with plugins that use the `aceSetAuthorStyle` hook.
This commit is contained in:
parent
2745557127
commit
3d40ab7e8c
2 changed files with 10 additions and 15 deletions
|
@ -58,11 +58,6 @@ html.outer-editor, html.inner-editor {
|
|||
color: inherit;
|
||||
}
|
||||
|
||||
#innerdocbody.authorColors span {
|
||||
padding-top: 3px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
option {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
|
|
@ -226,18 +226,18 @@ function Ace2Inner(editorInfo, cssManagers) {
|
|||
if ((typeof info.fade) === 'number') {
|
||||
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 =
|
||||
colorutils.textColorFromBackgroundColor(bgcolor, parent.parent.clientVars.skinName);
|
||||
authorStyle.color = textColor;
|
||||
parentAuthorStyle.color = textColor;
|
||||
const styles = [
|
||||
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 a new issue