Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions res/css/views/auth/_AuthPage.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Please see LICENSE files in the repository root for full details.
display: flex;
margin: 100px auto auto;
border-radius: 4px;
box-shadow: 0 2px 4px 0 rgb(0, 0, 0, 0.33);
background-color: $authpage-modal-bg-color;

@media only screen and (max-height: 768px) {
Expand All @@ -30,9 +29,8 @@ Please see LICENSE files in the repository root for full details.
margin-top: 0;
}

/* Extra class to indicate that the component is providing its own blurring/shadow,
* so we don't apply ours */
&.mx_AuthPage_modal_noBlur {
box-shadow: none;
/* Apply a blurred shadow around the modal */
&.mx_AuthPage_modal_blur {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this name feels too close to the already-existing (and different) mx_AuthPage_modalBlur

That's why I suggested mx_AuthPage_modal_withBlur, but feel free to come up with something else.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. I've changed it to your suggestion

box-shadow: 0 2px 4px 0 rgb(0, 0, 0, 0.33);
}
}
8 changes: 4 additions & 4 deletions src/components/views/auth/AuthPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,20 @@ export default class AuthPage extends React.PureComponent<React.PropsWithChildre
const modalContentStyle: React.CSSProperties = {
display: "flex",
zIndex: 1,
background: "rgba(255, 255, 255, 0.59)",
borderRadius: "8px",
};

let modalBlur;
if (this.props.addBlur !== false) {
// Blur out the background: add a `div` which covers the content behind the modal,
// and blurs it out, and make the modal's background semitransparent.
modalBlur = <div className="mx_AuthPage_modalBlur" style={blurStyle} />;
} else {
delete modalContentStyle.background;
modalContentStyle.background = "rgba(255, 255, 255, 0.59)";
}

const modalClasses = classNames({
mx_AuthPage_modal: true,
mx_AuthPage_modal_noBlur: this.props.addBlur === false,
mx_AuthPage_modal_blur: this.props.addBlur !== false,
});

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ exports[`<MatrixChat /> Multi-tab lockout waits for other tab to stop during sta
class="mx_AuthPage"
>
<div
class="mx_AuthPage_modal"
class="mx_AuthPage_modal mx_AuthPage_modal_blur"
style="position: relative;"
>
<div
Expand All @@ -122,7 +122,7 @@ exports[`<MatrixChat /> Multi-tab lockout waits for other tab to stop during sta
/>
<div
class="mx_AuthPage_modalContent"
style="display: flex; z-index: 1; background: rgba(255, 255, 255, 0.59); border-radius: 8px;"
style="display: flex; z-index: 1; border-radius: 8px; background: rgba(255, 255, 255, 0.59);"
>
<div
class="mx_Welcome"
Expand Down Expand Up @@ -231,7 +231,7 @@ exports[`<MatrixChat /> with a soft-logged-out session should show the soft-logo
class="mx_AuthPage"
>
<div
class="mx_AuthPage_modal"
class="mx_AuthPage_modal mx_AuthPage_modal_blur"
style="position: relative;"
>
<div
Expand All @@ -240,7 +240,7 @@ exports[`<MatrixChat /> with a soft-logged-out session should show the soft-logo
/>
<div
class="mx_AuthPage_modalContent"
style="display: flex; z-index: 1; background: rgba(255, 255, 255, 0.59); border-radius: 8px;"
style="display: flex; z-index: 1; border-radius: 8px; background: rgba(255, 255, 255, 0.59);"
>
<div
class="mx_AuthHeader"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`CompleteSecurity Allows verifying with another device if one is availab
class="mx_AuthPage"
>
<div
class="mx_AuthPage_modal mx_AuthPage_modal_noBlur"
class="mx_AuthPage_modal"
style="position: relative;"
>
<div
Expand Down Expand Up @@ -172,7 +172,7 @@ exports[`CompleteSecurity Allows verifying with recovery key if one is available
class="mx_AuthPage"
>
<div
class="mx_AuthPage_modal mx_AuthPage_modal_noBlur"
class="mx_AuthPage_modal"
style="position: relative;"
>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`<AuthPage /> should match snapshot 1`] = `
class="mx_AuthPage"
>
<div
class="mx_AuthPage_modal"
class="mx_AuthPage_modal mx_AuthPage_modal_blur"
style="position: relative;"
>
<div
Expand All @@ -15,7 +15,7 @@ exports[`<AuthPage /> should match snapshot 1`] = `
/>
<div
class="mx_AuthPage_modalContent"
style="display: flex; z-index: 1; background: rgba(255, 255, 255, 0.59); border-radius: 8px;"
style="display: flex; z-index: 1; border-radius: 8px; background: rgba(255, 255, 255, 0.59);"
/>
</div>
<footer
Expand Down
Loading