22 * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>
33 *
44 * @author John Molakvoæ <skjnldsv@protonmail.com>
5+ * @author Richard Steinmetz <richard@steinmetz.cloud>
56 *
67 * @license GNU AGPL version 3 or any later version
78 *
1920 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2021 *
2122 */
22- $property-label-min-width : 60px ;
23- $property-label-max-width : 2 * $property-label-min-width ;
24- $property-value-max-width : 250px ;
23+
24+ $property-label-min-width : 100px ;
25+ $property-label-max-width : 200px ;
26+ $property-label-width : calc (($property-label-min-width + $property-label-max-width ) / 2 );
27+
28+ $property-value-min-width : 200px ;
29+ $property-value-max-width : 300px ;
30+ $property-value-width : calc (($property-value-min-width + $property-value-max-width ) / 2 );
31+
2532$property-ext-padding-right : 8px ;
33+ $property-row-gap : 15px ;
2634
2735.property {
28- position : relative ;
2936 width : 100% ;
30- // we need this to keep the alignment of the ext and delete/action button
31- // The flex grow will never go over those values. Therefore we can set
32- // the max width and keep the right alignment
33- max-width : $property-label-max-width + $property-value-max-width + 44px ;
3437
35- justify-self : center ;
36-
37- & --last {
38- margin-bottom : $grid-height-unit ;
39- }
40- // no delete/action icon on addressbook selector
41- & --addressbooks & __actions {
42- display : none !important ;
43- }
38+ // property title row
39+ & --title {
40+ display : flex ;
41+ align-items : center ;
42+ gap : $property-row-gap ;
4443
45- & --without-actions {
46- padding-right : 44px ; // actions menu / button
44+ .property__actions {
45+ // placeholder for the actions menu
46+ & __empty {
47+ width : 44px ;
48+ }
49+ }
4750 }
4851
4952 // property row
5053 & __row {
51- position : relative ;
5254 display : flex ;
5355 align-items : center ;
56+ gap : $property-row-gap ;
57+
58+ & --without-actions {
59+ .property__value {
60+ margin-right : $property-row-gap + 44px ; // actions menu / button
61+ }
62+ }
63+
64+ // fix default margin from server stylesheet causing slight misalignment
65+ input {
66+ margin-right : 0 ;
67+ }
5468 }
5569
5670 // property label or multiselect within row
57- & __label ,
58- & __label .multiselect {
59- flex : 1 0 ; // min width is 60px, let's grow until 120px
60- width : $property-label-min-width ;
61- min-width : $property-label-min-width !important ; // override multiselect
62- max-width : $property-label-max-width ;
71+ & __label {
72+ display : flex ;
73+ justify-content : end ;
74+ flex : 1 auto ;
75+
76+ width : $property-label-width !important ;
77+ min-width : $property-label-min-width !important ;
78+ max-width : $property-label-max-width !important ;
6379
6480 & :not (.multiselect ) {
6581 overflow : hidden ;
@@ -68,35 +84,6 @@ $property-ext-padding-right: 8px;
6884 text-overflow : ellipsis ;
6985 opacity : .7 ;
7086 }
71-
72- // mouse feedback
73- .multiselect__tags {
74- opacity : .7 ;
75- }
76- & :hover ,
77- & :focus ,
78- & :active {
79- .multiselect__tags {
80- opacity : 1 ;
81- border-color : var (--color-border-dark );
82- }
83- }
84-
85- // read-only mode
86- & .multiselect--disabled {
87- & , .multiselect__single {
88- & , & :hover , & :focus & :active {
89- border-color : transparent !important ;
90- background-color : var (--color-main-background ) !important ;
91- }
92- }
93- }
94- }
95-
96- & __label .multiselect {
97- .multiselect__tags {
98- border : none !important ; // override multiselect
99- }
10087 }
10188
10289 // Hide delete buttons initially
@@ -106,7 +93,12 @@ $property-ext-padding-right: 8px;
10693
10794 // Property value within row, after label
10895 & __value {
109- flex : 1 1 ;
96+ flex : 1 auto ;
97+
98+ width : $property-value-width !important ;
99+ // min-width: $property-value-min-width !important;
100+ min-width : unset !important ;
101+ max-width : $property-value-max-width !important ;
110102
111103 textarea {
112104 align-self : flex-start ;
@@ -123,21 +115,19 @@ $property-ext-padding-right: 8px;
123115 padding-right : 24px ;
124116 }
125117
126- // Show ext and delete icon permanently on focus
118+ // Show ext icon permanently on focus
127119 & :hover ,
128120 & :focus ,
129121 & :active {
130- ~ .property__ext ,
131- ~ .action-item.icon-delete {
122+ ~ .property__ext {
132123 opacity : .5 ;
133124 }
134125 }
135126 }
136127
137- // Show ext and delete buttons on full row hover
128+ // Show ext buttons on full row hover
138129 & :hover {
139- .property__ext ,
140- .action-item {
130+ .property__ext {
141131 opacity : .5 ;
142132 }
143133 }
@@ -162,15 +152,5 @@ $property-ext-padding-right: 8px;
162152 // Delete property button + actions
163153 & __actions {
164154 z-index : 10 ;
165- margin-left : auto !important ;
166- // floating actions next to the title
167- & --floating {
168- position : absolute !important ;
169- right : 0 ;
170- bottom : 0 ;
171- }
172- }
173- .property__value {
174- margin-right : 0 ;
175155 }
176156}
0 commit comments