I have made changes according to turt2live recommandations, mainly css indentation and variable definition

This commit is contained in:
unknown 2020-02-09 15:05:08 +01:00
parent 153703426a
commit 06ba55e1a1
2 changed files with 31 additions and 31 deletions

View file

@ -15,44 +15,44 @@ limitations under the License.
*/ */
@define-mixin mx_InviteOnlyIcon { @define-mixin mx_InviteOnlyIcon {
width: 12px; width: 12px;
height: 12px; height: 12px;
position: relative; position: relative;
display: block !important; display: block !important;
} }
@define-mixin mx_InviteOnlyIcon_padlock { @define-mixin mx_InviteOnlyIcon_padlock {
background-color: $roomtile-name-color; background-color: $roomtile-name-color;
mask-image: url("$(res)/img/feather-customised/lock-solid.svg"); mask-image: url("$(res)/img/feather-customised/lock-solid.svg");
mask-position: center; mask-position: center;
mask-repeat: no-repeat; mask-repeat: no-repeat;
mask-size: contain; mask-size: contain;
content: ""; content: "";
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
} }
.mx_InviteOnlyIcon_large { .mx_InviteOnlyIcon_large {
@mixin mx_InviteOnlyIcon; @mixin mx_InviteOnlyIcon;
margin: 0 4px; margin: 0 4px;
&::before { &::before {
@mixin mx_InviteOnlyIcon_padlock; @mixin mx_InviteOnlyIcon_padlock;
width: 12px; width: 12px;
height: 12px; height: 12px;
} }
} }
.mx_InviteOnlyIcon_small { .mx_InviteOnlyIcon_small {
@mixin mx_InviteOnlyIcon; @mixin mx_InviteOnlyIcon;
left: -2px; left: -2px;
&::before { &::before {
@mixin mx_InviteOnlyIcon_padlock; @mixin mx_InviteOnlyIcon_padlock;
width: 10px; width: 10px;
height: 10px; height: 10px;
} }
} }

View file

@ -37,7 +37,7 @@ export default class InviteOnlyIcon extends React.Component {
}; };
render() { render() {
const style = this.props.collapsedPanel ? "mx_InviteOnlyIcon_small": "mx_InviteOnlyIcon_large"; const classes = this.props.collapsedPanel ? "mx_InviteOnlyIcon_small": "mx_InviteOnlyIcon_large";
if (!SettingsStore.isFeatureEnabled("feature_invite_only_padlocks")) { if (!SettingsStore.isFeatureEnabled("feature_invite_only_padlocks")) {
return null; return null;
@ -48,7 +48,7 @@ export default class InviteOnlyIcon extends React.Component {
if (this.state.hover) { if (this.state.hover) {
tooltip = <Tooltip className="mx_InviteOnlyIcon_tooltip" label={_t("Invite only")} dir="auto" />; tooltip = <Tooltip className="mx_InviteOnlyIcon_tooltip" label={_t("Invite only")} dir="auto" />;
} }
return (<div className={style} return (<div className={classes}
onMouseEnter={this.onHoverStart} onMouseEnter={this.onHoverStart}
onMouseLeave={this.onHoverEnd} onMouseLeave={this.onHoverEnd}
> >