discourse/app/assets/stylesheets/desktop/login.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

309 lines
5.1 KiB
SCSS
Raw Normal View History

// shared styles used
// on both the login and
2018-05-26 01:12:33 -04:00
// create account modals
.login-modal,
.create-account {
#login-buttons:not(.hidden) {
display: flex;
flex: 0 1 auto;
flex-direction: column;
align-items: stretch;
min-height: 75px;
2020-04-24 19:32:02 -04:00
padding: 0 24px;
order: 2;
button {
2019-03-15 19:25:51 -04:00
display: flex;
text-align: left;
margin: 0.35em;
white-space: nowrap;
align-items: center;
&:lang(zh_CN) {
min-width: 200px;
}
&:first-of-type:last-of-type {
&.oauth2_basic {
// Handles a strange fringe case where OAuth2 and account approval are enabled
margin-left: auto;
margin-right: auto;
justify-content: center;
}
}
}
2013-09-05 15:37:07 -04:00
}
form {
min-width: 300px;
max-width: 100%;
}
#modal-alert {
max-width: 100%;
margin-bottom: 0;
2020-04-24 19:32:02 -04:00
padding: 8px 16px;
}
.login-modal {
#login-buttons:not(.hidden) {
button {
&:first-of-type {
margin-top: 2.8em;
}
&:last-of-type {
margin-bottom: 3em;
}
}
}
}
.create-account {
#login-buttons:not(.hidden) {
justify-content: flex-start;
padding-top: 2.7em;
+ .login-form {
border-right: 1px solid var(--primary-low); // Only show border when login-form is present
}
}
}
#login-form {
box-sizing: border-box;
flex: 1 0 auto;
2020-04-24 19:32:02 -04:00
padding: 0 24px;
+ #login-buttons {
border-left: 1px solid var(--primary-low); // Only show border when login-form is present
}
}
2013-09-05 15:37:07 -04:00
tr:not(.instructions) {
td {
display: flex;
padding: 5px 0 0 0;
}
}
.tip,
td label {
display: block;
overflow: hidden;
word-wrap: break-word;
margin-bottom: 0;
max-width: 280px;
@media screen and (min-width: 500px) {
max-width: 400px;
}
}
}
.has-alt-auth {
.tip,
td label {
max-width: 100%;
}
}
// styles used on
// login modal only
.d-modal.login-modal {
.modal-body,
#credentials {
display: flex;
align-items: center;
padding: 15px 0;
tr {
display: flex;
flex-direction: column;
}
&.hidden {
display: none;
}
2018-06-28 04:12:32 -04:00
}
}
// styles used on the
// create account
// modal only
.d-modal.create-account {
.modal-body {
display: flex;
padding: 15px 0;
}
.create-account-form tr {
display: flex;
flex-direction: column;
}
.login-form {
position: relative;
display: flex;
overflow: hidden;
flex: 1 1 auto;
&:after,
&:before {
content: "";
display: block;
position: absolute;
width: 100%;
pointer-events: none;
}
&:after {
bottom: 0;
height: 35px;
@media screen and (max-height: 650px) {
height: 45px;
}
background-image: linear-gradient(
to bottom,
rgba(var(--secondary-rgb), 0),
rgba(var(--secondary-rgb), 0.9)
);
}
&:before {
top: 0;
height: 25px;
background-image: linear-gradient(
to top,
rgba(var(--secondary-rgb), 0),
rgba(var(--secondary-rgb), 1)
);
}
form {
box-sizing: border-box;
2020-04-24 19:32:02 -04:00
padding: 16px 24px;
margin-bottom: 0;
2018-11-08 16:06:17 -05:00
max-height: 475px;
@media screen and (max-height: 650px) {
max-height: calc(65vh - 100px);
> *:last-child {
margin-bottom: 40px;
}
}
overflow-x: hidden;
overflow-y: auto;
}
form,
table {
width: 100%;
}
tr {
display: flex;
flex-direction: column;
margin-top: 0.15em;
&.password-confirmation {
display: none;
}
}
}
tr.input {
input,
label {
margin-bottom: 0;
width: 100%;
}
.tip {
max-width: 340px;
}
}
.user-fields {
margin-bottom: 20px;
}
.user-field {
display: flex;
flex-direction: column;
&.confirm {
margin-top: 5px;
}
> label {
width: auto;
}
.controls {
margin-left: 0;
}
}
.invites-show {
padding-top: 20px;
.two-col {
margin-top: 30px;
}
.col-form {
margin-left: 200px;
.inline-invite-img {
display: none;
}
}
form {
.controls,
.input {
margin-left: 20px;
}
input,
label {
margin-bottom: 0;
}
.user-field .control-label:not(.checkbox-label) {
margin-left: 20px;
}
}
}
.tos-agree {
margin-bottom: 12px;
}
}
2018-05-25 17:33:45 -04:00
.login-form {
.tip {
&:not(:empty) + td {
2018-05-25 17:33:45 -04:00
display: none;
}
&:not(:empty),
&:empty + td {
min-height: 1.75em;
&.bad .svg-icon {
vertical-align: middle;
}
2018-05-25 17:33:45 -04:00
}
}
}
.password-reset,
.email-login,
.invites-show {
.col-form {
padding-left: 20px;
}
.col-image {
width: 175px;
img {
width: 100%;
}
}
h2 {
margin-bottom: 12px;
}
input:not([type="checkbox"]) {
// 80% width on checkboxes messes up the layout for custom fields
width: 80%;
}
}
.password-reset,
.email-login {
.col-form {
padding-top: 40px;
}
}