cryptpad/www/form/app-form.less

222 lines
6.8 KiB
Text
Raw Normal View History

2021-05-20 08:43:29 +00:00
@import (reference) '../../customize/src/less2/include/framework.less';
@import (reference) '../../customize/src/less2/include/tools.less';
@import (reference) '../../customize/src/less2/include/avatar.less';
&.cp-app-form {
@form_input-width: 400px;
.framework_main(
@bg-color: @colortheme_apps[form]
);
display: flex;
flex-flow: column;
2021-05-21 15:40:41 +00:00
font: @colortheme_app-font;
color: @cryptpad_text_col;
2021-05-20 08:43:29 +00:00
#cp-app-form-editor {
flex: 1;
display: flex;
flex-flow: row;
height: 100%;
overflow: hidden;
}
2021-05-21 11:39:33 +00:00
&.cp-app-form-results {
div.cp-form-creator-content, .cp-app-form-button-results {
display: none !important;
}
}
&:not(.cp-app-form-results) {
div.cp-form-creator-results, .cp-app-form-button-creator {
display: none !important;
}
}
2021-05-20 08:43:29 +00:00
#cp-app-form-container {
display: flex;
flex: 1;
justify-content: center;
2021-05-26 15:02:34 +00:00
.cp-form-input-block {
display: flex;
}
2021-05-20 08:43:29 +00:00
div.cp-form-creator-container {
display: flex;
flex: 1;
max-width: 1300px;
div.cp-form-creator-control {
padding: 10px;
display: flex;
flex-flow: column;
width: 300px;
2021-05-21 11:39:33 +00:00
.cp-form-creator-types {
margin-top: 20px;
display: flex;
flex-flow: column;
}
2021-05-20 08:43:29 +00:00
}
2021-05-21 11:39:33 +00:00
div.cp-form-creator-content, div.cp-form-creator-results {
2021-05-20 08:43:29 +00:00
padding: 10px;
display: flex;
flex-flow: column;
flex: 1;
2021-05-21 15:40:41 +00:00
overflow: auto;
2021-05-20 08:43:29 +00:00
.cp-form-block {
2021-05-21 15:40:41 +00:00
.tools_unselectable();
background: @cp_form-bg1;
padding: 10px;
2021-05-20 08:43:29 +00:00
&:not(:last-child) {
margin-bottom: 20px;
}
2021-05-21 15:40:41 +00:00
.cp-form-block-question {
margin-bottom: 5px;
}
2021-05-20 08:43:29 +00:00
.cp-form-input-block {
//width: @form_input-width;
2021-05-21 15:40:41 +00:00
&:not(.editing) {
2021-05-20 08:43:29 +00:00
input {
background: transparent;
border: none;
2021-05-21 15:40:41 +00:00
padding: 0 !important;
2021-05-20 08:43:29 +00:00
& ~ button:not(:disabled) {
.cp-form-edit { display: inline; }
.cp-form-save { display: none; }
}
}
}
input {
flex: 1;
min-width: 100px;
2021-05-21 15:40:41 +00:00
padding: 0 10px !important;
height: auto;
2021-05-20 08:43:29 +00:00
}
button {
.cp-form-edit {
display: none;
}
.cp-form-save { display: inline; }
}
2021-05-21 15:40:41 +00:00
.cp-form-block-drag {
font-size: 22px;
width: 20px;
margin-left: 5px;
text-align: center;
line-height: 31px;
}
2021-05-20 08:43:29 +00:00
}
2021-05-21 15:40:41 +00:00
&.editable { cursor: grab; }
2021-05-20 08:43:29 +00:00
}
2021-05-27 15:46:46 +00:00
.cp-form-edit-max-options {
display: flex;
align-items: center;
input {
width: 100px;
margin-left: 10px;
}
}
.cp-form-edit-options-block {
display: flex;
flex-wrap: wrap;
}
2021-05-20 08:43:29 +00:00
.cp-form-edit-block {
.cp-form-edit-block-input {
display: flex;
width: 400px;
input {
flex: 1;
min-width: 100px;
}
button {
i { margin: 0 !important; }
}
}
}
}
}
2021-05-21 11:39:33 +00:00
div.cp-form-creator-results {
display: flex;
flex-flow: column;
position: relative;
& > div {
2021-05-21 15:40:41 +00:00
background: @cp_form-bg1;
2021-05-21 11:39:33 +00:00
padding: 10px;
&:not(:last-child) {
margin-bottom: 20px;
}
}
.cp-form-block-question {
margin-bottom: 5px;
}
.cp-form-block-type {
float: right;
padding: 5px;
margin-top: -10px;
margin-right: -10px;
i { margin-right: 5px; }
2021-05-21 15:40:41 +00:00
background: @cp_form-bg2;
2021-05-21 11:39:33 +00:00
}
.cp-form-results-type-text {
max-height: 300px;
overflow: auto;
.cp-form-results-type-text-data {
padding: 5px 10px;
2021-05-21 15:40:41 +00:00
background: @cp_form-bg2;
2021-05-21 11:39:33 +00:00
&:not(:last-child) { margin-bottom: 1px; }
}
}
.cp-form-results-type-radio {
display: table;
2021-05-27 15:46:46 +00:00
.cp-form-results-type-multiradio-data {
display: flex;
flex-flow: column;
}
2021-05-21 11:39:33 +00:00
.cp-form-results-type-radio-data {
display: table-row;
2021-05-21 15:40:41 +00:00
border: 1px solid @cp_form-border;
2021-05-21 11:39:33 +00:00
& > span {
2021-05-21 15:40:41 +00:00
border: 1px solid @cp_form-border;
2021-05-21 11:39:33 +00:00
display: table-cell;
padding: 5px 10px;
2021-05-21 15:40:41 +00:00
background: @cp_form-bg2;
2021-05-21 11:39:33 +00:00
&.cp-value {
min-width: 200px;
}
}
}
}
}
2021-05-20 08:43:29 +00:00
}
2021-05-27 15:46:46 +00:00
.cp-form-type-radio, .cp-form-type-checkbox {
2021-05-21 15:40:41 +00:00
display: flex;
flex-flow: column;
align-items: baseline;
.cp-radio {
display: inline-flex;
}
}
2021-05-27 15:46:46 +00:00
.cp-form-type-multiradio {
display: table;
& > * {
display: table-row;
& > * {
display: table-cell;
padding: 5px 20px;
vertical-align: middle;
&:first-child {
min-width: 200px;
}
.cp-radio-mark {
margin: auto;
}
}
}
}
2021-05-21 15:40:41 +00:00
2021-05-20 08:43:29 +00:00
}