chuckya/app/javascript/styles/mastodon/forms.scss

619 lines
10 KiB
SCSS
Raw Normal View History

2016-10-23 19:05:55 +09:00
code {
font-family: 'mastodon-font-monospace', monospace;
2016-10-23 19:05:55 +09:00
font-weight: 400;
}
2016-10-18 23:37:15 +09:00
.form-container {
max-width: 400px;
padding: 20px;
margin: 0 auto;
}
.simple_form {
.input {
margin-bottom: 15px;
overflow: hidden;
2016-10-18 23:37:15 +09:00
}
.row {
display: flex;
margin: 0 -5px;
.input {
box-sizing: border-box;
flex: 1 1 auto;
width: 50%;
padding: 0 5px;
}
}
2017-03-26 20:22:38 +09:00
span.hint {
display: block;
color: $darker-text-color;
font-size: 12px;
margin-top: 4px;
}
2017-03-26 20:22:38 +09:00
p.hint {
margin-bottom: 15px;
color: $darker-text-color;
&.subtle-hint {
text-align: center;
font-size: 12px;
line-height: 18px;
margin-top: 15px;
margin-bottom: 0;
color: $darker-text-color;
a {
color: $highlight-text-color;
}
}
2017-03-26 20:22:38 +09:00
}
.card {
margin-bottom: 15px;
}
strong {
font-weight: 500;
@each $lang in $cjk-langs {
&:lang(#{$lang}) {
font-weight: 700;
}
}
}
.label_input {
display: flex;
label {
flex: 0 0 auto;
}
input {
flex: 1 1 auto;
}
}
.input.with_label {
2016-10-18 23:37:15 +09:00
padding: 15px 0;
margin-bottom: 0;
.label_input {
flex-wrap: wrap;
align-items: flex-start;
}
&.file .label_input {
flex-wrap: nowrap;
}
&.select .label_input {
align-items: initial;
}
.label_input > label {
font-family: inherit;
2016-10-18 23:37:15 +09:00
font-size: 16px;
color: $primary-text-color;
2016-11-17 01:51:02 +09:00
display: block;
padding-top: 5px;
margin-bottom: 5px;
flex: 1;
min-width: 150px;
word-wrap: break-word;
&.select {
flex: 0;
}
& ~ * {
margin-left: 10px;
}
}
ul {
flex: 390px;
2016-10-18 23:37:15 +09:00
}
&.boolean {
padding: initial;
margin-bottom: initial;
.label_input > label {
font-family: inherit;
font-size: 14px;
color: $primary-text-color;
display: block;
width: auto;
}
label.checkbox {
position: relative;
padding-left: 25px;
flex: 1 1 auto;
}
}
}
.input.with_block_label {
padding-top: 15px;
& > label {
font-family: inherit;
font-size: 16px;
color: $primary-text-color;
display: block;
padding-top: 5px;
}
.hint {
margin-bottom: 15px;
}
li {
float: left;
width: 50%;
}
2016-10-18 23:37:15 +09:00
}
.fields-group {
margin-bottom: 25px;
}
.input.radio_buttons .radio label {
margin-bottom: 5px;
font-family: inherit;
font-size: 14px;
color: $primary-text-color;
display: block;
width: auto;
}
2016-10-18 23:37:15 +09:00
.input.boolean {
margin-bottom: 5px;
label {
font-family: inherit;
2016-10-18 23:37:15 +09:00
font-size: 14px;
color: $primary-text-color;
2016-11-17 01:51:02 +09:00
display: block;
width: auto;
2016-10-18 23:37:15 +09:00
}
2016-11-25 22:01:14 +09:00
label.checkbox {
position: relative;
padding-left: 25px;
flex: 1 1 auto;
}
2016-10-18 23:37:15 +09:00
input[type=checkbox] {
position: absolute;
left: 0;
top: 5px;
2016-11-25 22:01:14 +09:00
margin: 0;
2016-10-18 23:37:15 +09:00
}
.hint {
padding-left: 25px;
margin-left: 0;
}
2016-10-18 23:37:15 +09:00
}
.check_boxes {
.checkbox {
label {
font-family: inherit;
font-size: 14px;
color: $primary-text-color;
display: block;
width: auto;
position: relative;
padding-top: 5px;
padding-left: 25px;
flex: 1 1 auto;
}
input[type=checkbox] {
position: absolute;
left: 0;
top: 5px;
margin: 0;
}
}
}
input[type=text],
input[type=number],
input[type=email],
input[type=password],
textarea {
2016-10-18 23:37:15 +09:00
background: transparent;
box-sizing: border-box;
2016-10-18 23:37:15 +09:00
border: 0;
border-bottom: 2px solid $ui-primary-color;
border-radius: 2px 2px 0 0;
padding: 7px 4px;
2016-10-18 23:37:15 +09:00
font-size: 16px;
color: $primary-text-color;
2016-10-18 23:37:15 +09:00
display: block;
width: 100%;
outline: 0;
font-family: inherit;
resize: vertical;
2016-10-18 23:37:15 +09:00
&:invalid {
box-shadow: none;
}
&:focus:invalid {
border-bottom-color: lighten($error-red, 12%);
2016-10-18 23:37:15 +09:00
}
&:required:valid {
2018-04-22 04:35:55 +09:00
border-bottom-color: $valid-value-color;
2016-10-18 23:37:15 +09:00
}
&:active,
&:focus {
border-bottom-color: $highlight-text-color;
background: rgba($base-overlay-background, 0.1);
2016-10-18 23:37:15 +09:00
}
}
.input.field_with_errors {
label {
color: lighten($error-red, 12%);
}
input[type=text],
input[type=email],
input[type=password] {
2018-04-22 04:35:55 +09:00
border-bottom-color: $valid-value-color;
2016-10-18 23:37:15 +09:00
}
.error {
display: block;
2016-10-18 23:37:15 +09:00
font-weight: 500;
color: lighten($error-red, 12%);
margin-top: 4px;
2016-10-18 23:37:15 +09:00
}
}
.actions {
margin-top: 30px;
display: flex;
&.actions--top {
margin-top: 0;
margin-bottom: 30px;
}
}
2016-10-18 23:37:15 +09:00
button,
.button,
.block-button {
display: block;
width: 100%;
border: 0;
border-radius: 4px;
background: $ui-highlight-color;
color: $primary-text-color;
font-size: 18px;
line-height: inherit;
height: auto;
padding: 10px;
text-transform: uppercase;
text-decoration: none;
text-align: center;
box-sizing: border-box;
cursor: pointer;
font-weight: 500;
outline: 0;
margin-bottom: 10px;
margin-right: 10px;
&:last-child {
margin-right: 0;
}
2016-10-18 23:37:15 +09:00
&:hover {
background-color: lighten($ui-highlight-color, 5%);
}
2016-10-18 23:37:15 +09:00
&:active,
&:focus {
background-color: darken($ui-highlight-color, 5%);
}
2016-10-18 23:37:15 +09:00
&.negative {
background: $error-value-color;
2016-10-18 23:37:15 +09:00
&:hover {
background-color: lighten($error-value-color, 5%);
}
2016-10-18 23:37:15 +09:00
&:active,
&:focus {
background-color: darken($error-value-color, 5%);
2016-10-18 23:37:15 +09:00
}
}
}
select {
font-size: 16px;
2017-10-01 17:52:39 +09:00
max-height: 29px;
}
.input-with-append {
position: relative;
.input input {
padding-right: 142px;
}
.append {
position: absolute;
right: 0;
top: 0;
padding: 7px 4px;
padding-bottom: 9px;
font-size: 16px;
2018-04-22 04:35:55 +09:00
color: $dark-text-color;
font-family: inherit;
pointer-events: none;
cursor: default;
max-width: 140px;
white-space: nowrap;
overflow: hidden;
&::after {
content: '';
display: block;
position: absolute;
top: 0;
right: 0;
bottom: 1px;
width: 5px;
background-image: linear-gradient(to right, rgba($ui-base-color, 0), $ui-base-color);
}
}
}
2016-10-18 23:37:15 +09:00
}
.flash-message {
background: lighten($ui-base-color, 8%);
color: $darker-text-color;
2016-10-18 23:37:15 +09:00
border-radius: 4px;
padding: 15px 10px;
margin-bottom: 30px;
box-shadow: 0 0 5px rgba($base-shadow-color, 0.2);
2016-10-18 23:37:15 +09:00
text-align: center;
p {
margin-bottom: 15px;
}
.oauth-code {
outline: 0;
box-sizing: border-box;
display: block;
width: 100%;
border: none;
padding: 10px;
font-family: 'mastodon-font-monospace', monospace;
background: $ui-base-color;
color: $primary-text-color;
font-size: 14px;
margin: 0;
&::-moz-focus-inner {
border: 0;
}
&::-moz-focus-inner,
&:focus,
&:active {
outline: 0 !important;
}
&:focus {
background: lighten($ui-base-color, 4%);
}
}
2016-10-18 23:37:15 +09:00
strong {
font-weight: 500;
@each $lang in $cjk-langs {
&:lang(#{$lang}) {
font-weight: 700;
}
}
2016-10-18 23:37:15 +09:00
}
@media screen and (max-width: 740px) and (min-width: 441px) {
margin-top: 40px;
}
2016-10-18 23:37:15 +09:00
}
.form-footer {
margin-top: 30px;
text-align: center;
a {
color: $darker-text-color;
2016-10-18 23:37:15 +09:00
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
.oauth-prompt,
.follow-prompt {
margin-bottom: 30px;
text-align: center;
color: $darker-text-color;
h2 {
font-size: 16px;
margin-bottom: 30px;
}
strong {
2018-04-22 04:35:55 +09:00
color: $secondary-text-color;
font-weight: 500;
@each $lang in $cjk-langs {
&:lang(#{$lang}) {
font-weight: 700;
}
}
}
@media screen and (max-width: 740px) and (min-width: 441px) {
margin-top: 40px;
}
}
.qr-wrapper {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
}
.qr-code {
flex: 0 0 auto;
background: $simple-background-color;
padding: 4px;
margin: 0 10px 20px 0;
box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
display: inline-block;
svg {
display: block;
margin: 0;
}
}
.qr-alternative {
margin-bottom: 20px;
2018-04-22 04:35:55 +09:00
color: $secondary-text-color;
flex: 150px;
samp {
display: block;
font-size: 14px;
}
}
.table-form {
p {
margin-bottom: 15px;
strong {
font-weight: 500;
@each $lang in $cjk-langs {
&:lang(#{$lang}) {
font-weight: 700;
}
}
}
}
}
.simple_form,
.table-form {
.warning {
box-sizing: border-box;
background: rgba($error-value-color, 0.5);
color: $primary-text-color;
text-shadow: 1px 1px 0 rgba($base-shadow-color, 0.3);
box-shadow: 0 2px 6px rgba($base-shadow-color, 0.4);
border-radius: 4px;
padding: 10px;
margin-bottom: 15px;
a {
color: $primary-text-color;
text-decoration: underline;
&:hover,
&:focus,
&:active {
text-decoration: none;
}
}
strong {
font-weight: 600;
display: block;
margin-bottom: 5px;
@each $lang in $cjk-langs {
&:lang(#{$lang}) {
font-weight: 700;
}
}
.fa {
font-weight: 400;
}
}
}
}
.action-pagination {
display: flex;
2017-10-05 05:49:36 +09:00
flex-wrap: wrap;
align-items: center;
.actions,
.pagination {
flex: 1 1 auto;
}
.actions {
padding: 30px 0;
padding-right: 20px;
flex: 0 0 auto;
}
}
.post-follow-actions {
text-align: center;
color: $darker-text-color;
div {
margin-bottom: 4px;
}
}
.alternative-login {
margin-top: 20px;
margin-bottom: 20px;
h4 {
font-size: 16px;
color: $primary-text-color;
text-align: center;
margin-bottom: 20px;
border: 0;
padding: 0;
}
.button {
display: block;
}
}
.scope-danger {
color: $warning-red;
}