Baptiste Mahé b7de48c821
[ADF-5074] Scrollable card-view-textitem when value too long for display (#5480)
* ADF-5074 Scrollable non-multiline and full display for multiline

* ADF-5074 Refactor template

* ADF-5074 Scrollbar displayed only on overflow

* ADF-5074 adf-textitem-ellipsis is now replaced by adf-textitem-scroll

* ADF-5074 Scrollable non-multiline and full display for multiline

* ADF-5074 Refactor template

* ADF-5074 Scrollbar displayed only on overflow

* ADF-5074 adf-textitem-ellipsis is now replaced by adf-textitem-scroll
2020-02-21 11:02:45 +00:00

153 lines
3.6 KiB
SCSS

@import '~@angular/material/theming';
@mixin adf-card-view-textitem-theme($theme) {
$foreground: map-get($theme, foreground);
$outline: 1px solid mat-color($alfresco-ecm-blue, A200) !default;
.adf {
&-textitem-icon {
font-size: 16px;
width: 16px;
height: 16px;
}
&-textitem-action {
color: mat-color($foreground, text, 0.25);
}
&-textitem-action:hover, &-textitem-action:focus {
color: mat-color($foreground, text);
}
&-update-icon {
padding-left: 13px;
}
&-textitem-readonly {
cursor: pointer !important;
&:hover .adf-textitem-action,
&:focus .adf-textitem-action {
color: mat-color($foreground, text);
}
}
&-textitem-clickable {
cursor: pointer !important;
&:hover .adf-textitem-action {
color: mat-color($foreground, text);
}
}
&-textitem-clickable-value {
cursor: pointer !important;
color: mat-color($primary);
}
&-textitem-editable {
&-controls {
display: flex;
align-items: center;
mat-icon:not(.adf-button-disabled):hover {
color: mat-color($foreground, text);
cursor: pointer !important;
}
mat-form-field {
width: 100%;
}
input:focus,
textarea:focus {
border: $outline;
}
}
&-error {
font-size: 12px;
padding-top: 4px;
ul {
margin: 0;
padding: 0;
list-style-type: none;
li {
margin: 0;
padding: 0;
}
}
}
}
&-textitem-default-value {
color: mat-color($foreground, text, 0.54);
}
&-textitem-editable .mat-form-field-wrapper {
margin: 0;
padding-bottom: 0;
}
&-textitem-editable .mat-form-field-underline {
display: none;
}
&-textitem-editable .mat-form-field-infix {
padding: 0;
border-top: none;
}
&-textitem-editable .mat-form-field-label-wrapper {
padding-top: 2em;
position: static;
}
&-textitem-editable .mat-form-field-label {
top: 4px;
}
&-textitem-editable .mat-input-element {
font-family: inherit;
position: relative;
padding-top: 6px;
}
&-textitem-editable .mat-input-element:focus {
padding: 5px;
left: -6px;
top: 0;
}
&-textitem-editable input.mat-input-element {
margin-bottom: 2px;
}
&-textitem-editable input.mat-input-element:focus {
margin-bottom: -8px;
}
&-textitem-scroll {
overflow-x: auto;
white-space: nowrap;
display: block;
&::-webkit-scrollbar {
height: 5px;
}
&:hover::-webkit-scrollbar-thumb {
display: block;
background-color: mat-color($foreground, text, 0.25);
border-radius: 2px;
}
}
&-textitem-multiline {
display: block;
}
}
}