2323
2424@import ' ../ContactDetailsLayout.scss' ;
2525
26- $property-label-min-width : $contact-details-label-min-width ;
2726$property-label-max-width : $contact-details-label-max-width ;
28- $property-label-width : $contact-details-label-width ;
29-
30- $property-value-min-width : $contact-details-value-min-width ;
3127$property-value-max-width : $contact-details-value-max-width ;
32- $property-value-width : $contact-details-value-width ;
3328
3429$property-ext-padding-right : 8px ;
3530$property-row-gap : $contact-details-row-gap ;
@@ -42,13 +37,6 @@ $property-row-gap: $contact-details-row-gap;
4237 display : flex ;
4338 align-items : center ;
4439 gap : $property-row-gap ;
45-
46- .property__actions {
47- // placeholder for the actions menu
48- & __empty {
49- width : 44px ;
50- }
51- }
5240 }
5341
5442 // property row
@@ -57,12 +45,6 @@ $property-row-gap: $contact-details-row-gap;
5745 align-items : center ;
5846 gap : $property-row-gap ;
5947
60- & --without-actions {
61- .property__value {
62- margin-right : $property-row-gap + 44px ; // actions menu / button
63- }
64- }
65-
6648 // fix default margin from server stylesheet causing slight misalignment
6749 input {
6850 margin-right : 0 ;
@@ -71,88 +53,89 @@ $property-row-gap: $contact-details-row-gap;
7153
7254 // property label or multiselect within row
7355 & __label {
56+ // Global single column layout
7457 display : flex ;
75- justify-content : end ;
76- flex : 1 auto ;
77-
78- width : $property-label-width !important ;
79- min-width : $property-label-min-width !important ;
80- max-width : $property-label-max-width !important ;
58+ flex : 0 1 auto ;
59+ justify-content : flex-end ;
60+ width : $contact-details-label-max-width ;
61+ min-width : 0 ; // Has to be zero unless we implement wrapping
8162
82- & :not (.multiselect ) {
63+ // Text label styling
64+ > :not (.multiselect ):not (.material-design-icon ) {
8365 overflow : hidden ;
84- overflow-x : hidden ;
8566 white-space : nowrap ;
8667 text-overflow : ellipsis ;
8768 opacity : .7 ;
8869 }
8970 }
9071
91- // Hide delete buttons initially
92- .action-item.icon-delete {
93- opacity : 0 ;
94- }
95-
9672 // Property value within row, after label
9773 & __value {
98- flex : 1 auto ;
74+ align-items : center ;
9975
100- width : $property-value-width !important ;
101- // min-width: $property-value-min-width !important;
102- min-width : unset !important ;
103- max-width : $property-value-max-width !important ;
76+ // Global single column layout
77+ display : flex ;
78+ flex : 0 1 auto ;
79+ width : $property-value-max-width ;
80+ min-width : 0 ; // Has to be zero unless we implement wrapping
10481
10582 textarea {
106- align-self : flex-start ;
83+ // Limit max height to make scrolling the form a bit easier
10784 min-height : 2 * $grid-height-unit - 2 * $grid-input-margin ;
10885 max-height : 5 * $grid-height-unit - 2 * $grid-input-margin ;
10986 }
11087
111- // read-only mode
112- & :read-only {
113- border-color : var (--color-border-dark );
88+ input ,
89+ textarea {
90+ width : 100% ;
91+
92+ // Remove default input styling for read-only inputs.
93+ // We can't use plain divs because that would cause jumping on switching modes.
94+ & [readonly ] {
95+ border : none ;
96+ overflow : auto ;
97+ outline : none ;
98+ resize : none ;
99+ padding : 0 ;
100+ border-radius : 0 ;
101+ }
114102 }
115- & --with-ext {
116- // ext icon width + 8px padding
117- padding-right : 24px ;
103+ }
104+
105+ & __label ,
106+ & __value {
107+ // Fix default multiselect styling
108+ > .multiselect {
109+ width : 100% ;
110+ min-width : unset ;
118111 }
119112
120- // Show ext icon permanently on focus
121- & :hover ,
122- & :focus ,
123- & :active {
124- ~ .property__ext {
125- opacity : .5 ;
126- }
113+ // Fix default date time picker styling
114+ > .mx-datepicker {
115+ width : 100% ;
127116 }
128117 }
129118
130119 // Show ext buttons on full row hover
131120 & :hover {
132121 .property__ext {
133- opacity : .5 ;
122+ opacity : .7 ;
134123 }
135124 }
136125
137126 // External link (tel, mailto, http, ftp...)
138127 & __ext {
139- position : absolute ;
140- // 8px padding + actions
141- right : 44px + $property-ext-padding-right ;
142128 opacity : 0 ;
129+
143130 & :hover ,
144- & :focus ,
145- & :active {
131+ & :focus {
146132 opacity : .7 ;
147133 }
148134 }
149135
150- .no-move {
151- right : $property-ext-padding-right ;
152- }
153-
154136 // Delete property button + actions
155137 & __actions {
156138 z-index : 10 ;
139+ width : 44px ;
157140 }
158141}
0 commit comments