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

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

405 lines
7.7 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 {
.modal-body {
&.has-alt-auth {
background: var(--tertiary);
}
@media (prefers-color-scheme: dark) {
&.has-alt-auth {
background: rgba(var(--tertiary-rgb), 0.5);
}
}
}
.btn-flat.btn.modal-close svg {
color: rgba(var(--primary-rgb), 0.5);
&:hover {
color: rgba(var(--primary-rgb), 0.85);
}
}
#login-buttons:not(.hidden) {
display: flex;
flex: 0 1 auto;
flex-direction: column;
align-items: stretch;
min-height: 75px;
order: 2;
button {
&:first-of-type {
margin-top: 2.8em;
}
&:last-of-type {
margin-bottom: 3em;
}
margin: 0.35em;
&: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
}
.tip {
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 {
max-width: 100%;
}
}
.login-modal:not(.hidden).has-alt-auth.no-local-login {
padding: 0 2em !important;
min-width: 350px !important;
.login-right-side {
width: 100%;
padding: 2em 0;
#login-buttons:not(.hidden) {
width: 80%;
.btn.btn-social:first-of-type {
margin-top: 2em;
}
.btn.btn-social,
.btn,
.login-with-email-button {
border: 1px solid var(--primary-low-mid);
margin-bottom: 0.5em;
&:hover {
background: var(--primary-very-low) !important;
}
}
}
}
}
.login-modal.modal-body:not(.hidden).second-factor {
.login-left-side {
max-width: 350px;
}
.modal-footer {
margin-top: 1em;
}
}
// styles used on
// login modal only
.login-modal:not(.hidden) {
padding: 0 !important;
&.has-alt-auth {
min-width: 700px;
.login-left-side {
align-self: stretch;
width: calc(60% - 4em);
padding: 1em 2em;
}
}
.login-left-side {
background: var(--secondary);
width: calc(100% - 4em);
display: flex;
flex-direction: column;
padding: 1em 4em 1em 2em;
.login-welcome-header {
.login-title {
font-size: 2.75em;
}
.login-subheader {
font-size: 1.125em !important;
}
}
#credentials {
display: flex;
flex-direction: column;
align-items: flex-start !important;
}
#login-form {
margin: 1.5em 0 0 0;
}
.modal-footer {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 100%;
padding: 0;
border: 0;
}
}
.login-right-side {
display: none;
}
&.has-alt-auth .login-right-side {
width: 40%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
#login-buttons {
button {
&.login-with-email-button {
border-radius: 4px;
.d-icon {
color: #000 !important;
}
&:hover {
box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.25);
.d-icon {
color: #000 !important;
}
}
}
}
}
}
.modal-body,
#credentials {
display: flex;
align-items: center;
&.hidden {
display: none;
}
2018-06-28 04:12:32 -04:00
}
}
// styles used on the
// create account
// modal only
.d-modal.create-account {
.create-account {
position: relative;
.modal-body:not(.reorder-categories):not(.poll-ui-builder):not(.poll-breakdown) {
max-height: 65vh !important;
overflow: hidden;
}
}
.has-alt-auth .create-account-form {
display: grid;
grid-template-columns: 65% 35%;
grid-template-rows: 20% 80%;
grid-template-areas:
"header login-buttons"
"form login-buttons";
}
.create-account-form {
display: flex;
flex-direction: column;
width: 100%;
}
.create-account-login-buttons {
display: none;
}
.has-alt-auth .create-account-login-buttons {
grid-area: login-buttons;
padding: 1em;
display: flex;
flex-direction: column;
justify-content: center;
h3 {
color: var(--secondary);
text-align: center;
}
#login-buttons {
button:first-of-type {
margin-top: 0;
}
button {
margin-bottom: 1em;
}
}
}
.modal-body {
display: flex;
padding: 0;
}
.login-welcome-header {
grid-area: header;
padding: 1em 1em 1em 1em;
height: calc(110px - 2em);
.login-title {
font-size: 2.75em;
}
.login-subheader {
font-size: 1.125em !important;
align-self: start;
}
}
.modal-body:not(.has-alt-auth) .login-form {
&:after,
&:before {
width: 100%;
}
&:before {
top: calc(8em - 10px) !important;
}
}
.has-alt-auth .login-form,
.login-form {
background: var(--secondary);
padding: 1em;
grid-area: form;
overflow-y: scroll;
&:after,
&:before {
content: "";
display: block;
position: absolute;
width: 65%;
pointer-events: none;
z-index: 100;
margin-left: -1em;
height: 1em;
}
&:after {
bottom: 93px;
background-image: linear-gradient(
to bottom,
rgba(var(--secondary-rgb), 0),
rgba(var(--secondary-rgb), 1)
);
}
&:before {
top: 110px;
background-image: linear-gradient(
to top,
rgba(var(--secondary-rgb), 0),
rgba(var(--secondary-rgb), 1)
);
}
.input-group {
margin-bottom: 1em;
input {
width: 100%;
}
input:not(.value-entered):not(:focus) + label.alt-placeholder {
top: 12px;
}
}
.password-confirmation {
display: none;
}
scrollbar-color: rgba(var(--primary-rgb), 0.5) transparent;
&::-webkit-scrollbar {
width: 15px;
}
&::-webkit-scrollbar-track {
box-shadow: inset 0 0 14px 14px transparent;
border: 4px solid transparent;
}
&::-webkit-scrollbar-thumb {
box-shadow: inset 0 0 14px 14px rgba(var(--primary-rgb), 0.5);
border: 4px solid transparent;
border-radius: 14px;
}
/* set button(top and bottom of the scrollbar) */
&::-webkit-scrollbar-button {
display: none;
}
}
.user-fields {
margin-bottom: 1em;
}
.user-field {
display: flex;
flex-direction: column;
&.confirm {
margin-top: 5px;
}
}
.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) {
2018-05-25 17:33:45 -04:00
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;
}
}