scinote-web/app/assets/stylesheets/shared/inline_edit.scss

83 lines
1.5 KiB
SCSS
Raw Normal View History

2022-06-09 20:40:45 +08:00
// scss-lint:disable SelectorDepth
// scss-lint:disable NestingDepth
.sci-inline-edit {
2022-06-09 20:40:45 +08:00
column-gap: .25em;
display: grid;
grid-template-columns: auto repeat(2, max-content);
transition: .4s $timing-function-sharp;
2022-07-11 16:45:25 +08:00
&.editing .sci-inline-edit__content {
background-color: $color-white;
.sci-inline-edit__content {
padding-top: 0;
}
2022-07-11 16:45:25 +08:00
}
2022-06-09 20:40:45 +08:00
.sci-inline-edit__content {
border: $border-transparent;
border-radius: 4px;
2022-06-09 20:40:45 +08:00
display: flex;
flex-direction: column;
margin-left: -.25em;
min-height: 36px;
padding-left: .25em;
padding-top: .3em;
position: relative;
2022-06-09 20:40:45 +08:00
width: 100%;
2022-06-09 20:40:45 +08:00
.sci-inline-edit__view {
cursor: pointer;
white-space: pre-wrap;
2022-06-09 20:40:45 +08:00
width: 100%;
2022-06-09 20:40:45 +08:00
&.blank {
color: $color-silver-chalice;
}
}
2022-06-09 20:40:45 +08:00
textarea {
background: transparent;
border: 0;
min-height: 1em;
outline: none;
2022-06-09 20:40:45 +08:00
overflow: hidden;
padding: 0;
width: 100%;
&:focus {
outline: none;
}
}
2022-06-09 20:40:45 +08:00
.sci-inline-edit__error {
bottom: -16px;
2022-06-09 20:40:45 +08:00
color: $brand-danger;
font-size: 12px;
font-weight: normal;
line-height: 12px;
position: absolute;
}
}
2022-06-09 20:40:45 +08:00
&.editing {
2022-06-09 20:40:45 +08:00
.sci-inline-edit__content {
background-color: $color-white;
2022-06-09 20:40:45 +08:00
border-color: $brand-focus;
&.error {
border-color: $brand-danger;
margin-bottom: 16px;
}
}
.sci-inline-edit__control {
&.btn-disabled {
background: $color-silver-chalice;
color: $color-concrete;
}
2022-06-09 20:40:45 +08:00
}
}
}