cssOMS/layout.scss
2025-04-02 13:33:51 +00:00

143 lines
2.3 KiB
SCSS
Executable File

// @questions it seems stupid to have ipt-wrap, flex-line, simple-flex and input-control
// I have the feeling we maybe only need 1 or 2 of these (input-control has nice behavior)
.ipt-wrap {
display: table;
vertical-align: top;
box-sizing: border-box;
.ipt-start, .ipt-second, .ipt-first {
display: table-cell;
vertical-align: inherit;
}
.ipt-first {
width: 100%;
}
.ipt-second {
padding-left: .75rem;
}
}
.simple-flex {
display: flex;
flex-direction: row;
align-content: center;
align-items: center;
}
// @question consider to replace with input-control which has better behavior
.flex-line {
display: flex;
flex-direction: row;
& + * {
margin-top: .75rem;
}
> div {
flex: 1;
&:nth-child(n+2) {
padding-left: .75rem;
}
}
> div.fixed {
flex: 0;
flex-basis: auto;
}
}
div.sticky, section.sticky {
position: sticky;
top: 1rem;
}
.inline {
display: inline;
}
.form-group {
display: flex;
flex-direction: row;
flex-wrap: wrap;
p {
font-size: .9rem;
}
> *:not(label) {
flex: 0 1 auto;
}
& + * {
margin-top: .75rem;
}
label {
font-size: .9rem;
flex: 0 0 100%;
display: inline-flex;
align-items: center;
padding-bottom: 5px;
&> i {
margin-right: .5rem;
}
}
span.checkbox+span.checkbox {
margin-left: 1.5rem;
}
.input-control {
flex: 1;
display: flex;
flex-direction: row;
flex-wrap: wrap;
& +.input-control {
margin-left: 1rem;
}
}
textarea, .contenteditable {
height: 8rem;
}
}
@media (max-width: 768px) {
.form-group, .flex-line {
flex-direction: column;
}
.form-group .input-control+.input-control {
margin-top: 1rem;
margin-left: 0;
}
}
@each $name, $width in
('wf-100': 100%,
'wf-80': 80%,
'wf-20': 20%,
'wf-66': 66.66%,
'wf-50': 50%,
'wf-33': 33.33%,
'wf-25': 25%,
'wf-75': 75%) {
.#{$name} {
width: $width;
}
}
.spacer {
padding: 5px;
}
.resizable {
resize: both;
overflow: auto;
}