2019-02-13 17:27:20 +01:00
|
|
|
@import '~@lbry/components/sass/form/_index.scss';
|
2018-06-21 04:22:13 +02:00
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
// lbry/components overrides and minor styles
|
|
|
|
|
2019-02-18 18:24:56 +01:00
|
|
|
input[type='number'] {
|
|
|
|
width: 8em;
|
|
|
|
}
|
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
input[type='text'],
|
|
|
|
input[type='number'],
|
|
|
|
select {
|
|
|
|
padding-bottom: 0.2em;
|
|
|
|
|
|
|
|
[data-mode='dark'] & {
|
|
|
|
&::placeholder {
|
|
|
|
opacity: 0.4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fieldset-section {
|
|
|
|
label {
|
|
|
|
width: auto;
|
|
|
|
text-transform: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
checkbox-element,
|
|
|
|
radio-element {
|
|
|
|
label {
|
|
|
|
font-size: medium;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-18 18:24:56 +01:00
|
|
|
checkbox-element {
|
|
|
|
&[disabled='true'] {
|
|
|
|
opacity: 0.3;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
checkbox-element,
|
|
|
|
radio-element,
|
|
|
|
fieldset:last-child,
|
|
|
|
fieldset-section:last-child {
|
|
|
|
margin-bottom: 0;
|
2017-06-15 21:30:56 +02:00
|
|
|
}
|
2017-04-10 14:32:40 +02:00
|
|
|
|
2019-02-18 18:24:56 +01:00
|
|
|
checkbox-element,
|
|
|
|
radio-element {
|
|
|
|
input[type='checkbox']:checked + label {
|
|
|
|
color: $lbry-black;
|
|
|
|
|
|
|
|
[data-mode='dark'] & {
|
|
|
|
color: $lbry-white;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: $lbry-teal-4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-02-20 06:20:29 +01:00
|
|
|
|
|
|
|
label {
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2019-02-18 18:24:56 +01:00
|
|
|
}
|
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
fieldset-group {
|
|
|
|
&.fieldset-group--smushed {
|
|
|
|
justify-content: flex-start;
|
2018-03-26 23:32:43 +02:00
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
fieldset-section {
|
|
|
|
width: auto;
|
|
|
|
margin-bottom: 0;
|
2018-04-01 12:46:38 +02:00
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
&:first-of-type {
|
|
|
|
input {
|
|
|
|
border-right: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.fieldgroup--paginate {
|
|
|
|
margin-top: var(--spacing-vertical-medium);
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
.pagination {
|
|
|
|
margin-bottom: -1em;
|
2019-02-13 17:27:20 +01:00
|
|
|
}
|
|
|
|
}
|
2017-10-15 00:37:40 +02:00
|
|
|
}
|
2018-03-22 17:14:26 +01:00
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
// This is a special case where the prefix appears "inside" the input
|
|
|
|
// It would be way simpler to just use position: absolute and give it a width
|
|
|
|
// but the width can change when we use it for the name prefix
|
|
|
|
// lbry:// {input}, lbry://@short {input}, @lbry://longername {input}
|
|
|
|
// The spacing/alignment isn't very robust and will probably need to be changed
|
|
|
|
// if we use this in more places
|
|
|
|
&.fieldset-group--disabled-prefix {
|
|
|
|
align-items: flex-end;
|
|
|
|
|
|
|
|
fieldset-section:first-child .form-field__prefix,
|
|
|
|
fieldset-section:last-child input {
|
|
|
|
border-color: $lbry-black;
|
|
|
|
|
|
|
|
[data-mode='dark'] {
|
|
|
|
border-color: $lbry-gray-4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fieldset-section:first-child {
|
|
|
|
.form-field__prefix {
|
|
|
|
padding: 0.15em var(--spacing-s);
|
|
|
|
padding-right: 0;
|
|
|
|
border: 1px solid;
|
|
|
|
border-right: 0;
|
|
|
|
color: $lbry-gray-4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fieldset-section:last-child {
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
input {
|
|
|
|
border-left: 0;
|
|
|
|
padding-left: var(--spacing-xs);
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
border-image-slice: 1;
|
|
|
|
border-image-source: linear-gradient(to right, $lbry-black, $lbry-teal-5 5%);
|
|
|
|
}
|
2018-10-17 19:14:24 +02:00
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
[data-mode='dark'] & {
|
|
|
|
&:focus {
|
|
|
|
border-image-source: linear-gradient(to right, $lbry-gray-4, $lbry-teal-5 5%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-10-17 19:14:24 +02:00
|
|
|
}
|
2018-03-30 02:29:05 +02:00
|
|
|
}
|
2017-04-10 14:32:40 +02:00
|
|
|
}
|
2017-04-09 17:06:23 +02:00
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
// form buttons are black by default
|
|
|
|
form {
|
2019-02-20 06:20:29 +01:00
|
|
|
// [data-mode='dark'] & {
|
|
|
|
.button--primary:not(:hover) {
|
|
|
|
background-color: $lbry-teal-5;
|
|
|
|
border-color: $lbry-teal-5;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: $lbry-teal-3;
|
|
|
|
border-color: $lbry-teal-3;
|
2019-02-18 18:24:56 +01:00
|
|
|
}
|
2018-12-19 06:44:53 +01:00
|
|
|
}
|
2017-04-09 17:06:23 +02:00
|
|
|
}
|
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
fieldset-section {
|
2019-02-20 06:20:29 +01:00
|
|
|
input-submit {
|
2019-02-13 17:27:20 +01:00
|
|
|
input,
|
|
|
|
select {
|
2019-02-20 06:20:29 +01:00
|
|
|
&:first-child:not(:focus) {
|
|
|
|
border-right-color: transparent;
|
|
|
|
}
|
2019-02-13 17:27:20 +01:00
|
|
|
}
|
2018-06-13 07:20:53 +02:00
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
.button__content {
|
|
|
|
position: relative;
|
|
|
|
top: -0.1em;
|
2019-02-13 17:27:20 +01:00
|
|
|
}
|
2018-06-13 07:20:53 +02:00
|
|
|
}
|
2018-10-17 19:14:24 +02:00
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
select {
|
|
|
|
max-width: 12em;
|
|
|
|
background-color: $lbry-white;
|
|
|
|
|
|
|
|
[data-mode='dark'] & {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
2018-10-17 19:14:24 +02:00
|
|
|
}
|
2019-02-20 06:20:29 +01:00
|
|
|
|
|
|
|
[data-mode='dark'] & {
|
|
|
|
input,
|
|
|
|
textarea,
|
|
|
|
select {
|
|
|
|
color: $lbry-white;
|
|
|
|
}
|
|
|
|
|
|
|
|
input:not(:focus):not(.form-field--copyable),
|
|
|
|
textarea:not(:focus),
|
|
|
|
select:not(:focus) {
|
|
|
|
border-color: $lbry-gray-4;
|
|
|
|
}
|
|
|
|
}
|
2017-04-09 17:06:23 +02:00
|
|
|
}
|
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
.form-field--copyable {
|
|
|
|
background-color: rgba($lbry-gray-1, 0.3);
|
|
|
|
border: 1px solid $lbry-gray-1;
|
|
|
|
color: $lbry-gray-5;
|
|
|
|
flex: 1;
|
|
|
|
padding: 0.2rem 0.75rem;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
user-select: text;
|
2019-02-20 06:20:29 +01:00
|
|
|
cursor: default;
|
2019-02-13 17:27:20 +01:00
|
|
|
|
|
|
|
html[data-mode='dark'] & {
|
|
|
|
background-color: rgba($lbry-white, 0.3);
|
|
|
|
border-color: $lbry-gray-5;
|
|
|
|
color: inherit;
|
|
|
|
}
|
2017-04-09 17:06:23 +02:00
|
|
|
}
|
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
label + .react-toggle,
|
|
|
|
.react-toggle + label {
|
|
|
|
margin-left: var(--spacing-vertical-small);
|
2018-12-19 06:44:53 +01:00
|
|
|
}
|
|
|
|
|
2019-02-20 06:20:29 +01:00
|
|
|
.form-field--inline-prefix {
|
|
|
|
position: absolute;
|
|
|
|
top: 9.5em;
|
|
|
|
left: 2.75em;
|
|
|
|
width: auto;
|
|
|
|
|
|
|
|
& + input {
|
|
|
|
padding-left: 4em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
.form-field__help {
|
|
|
|
@extend .help;
|
2019-02-20 06:20:29 +01:00
|
|
|
margin-top: var(--spacing-vertical-medium);
|
2019-01-09 05:29:06 +01:00
|
|
|
}
|
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
.form-field--price-amount {
|
|
|
|
width: 7em;
|
2017-04-09 17:06:23 +02:00
|
|
|
}
|
2018-03-26 23:32:43 +02:00
|
|
|
|
2019-02-13 17:27:20 +01:00
|
|
|
.form-field--address {
|
|
|
|
width: 370px;
|
2018-05-25 06:36:43 +02:00
|
|
|
}
|