Projet

Général

Profil

0001-scss-add-vertical-margin-to-autocomplete-element-649.patch

Corentin Séchet, 10 août 2022 16:28

Télécharger (2,21 ko)

Voir les différences:

Subject: [PATCH] scss: add vertical margin to autocomplete element (#64967)

 static/includes/_forms.scss |  7 +++++
 static/includes/_utils.scss | 52 +++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+)
static/includes/_forms.scss
445 445
	}
446 446
	span.select2-selection--multiple {
447 447
		min-height: 0;
448
		padding-top: calc(#{extract-top($widget-padding)} - 0.2rem);
449
		padding-bottom: calc(#{extract-bottom($widget-padding)} - 0.2rem);
450

  
451
		.select2-selection__choice, .select2-search {
452
			margin: 0.2rem 0.5rem 0.2rem 0;
453
        }
454

  
448 455
		.select2-selection__rendered {
449 456
			display: block;
450 457
		}
static/includes/_utils.scss
34 34
	@return 0;
35 35
}
36 36

  
37
@function extract-top($spacing){
38
	@return nth($spacing, 1);
39
}
40

  
41
@function extract-right($spacing){
42
	@if (length($spacing) == 1) {
43
		@return nth($spacing, 1);
44
	}
45

  
46
	@if (length($spacing) == 2) {
47
		@return nth($spacing, 2);
48
	}
49

  
50
	@if (length($spacing) == 4) {
51
		@return nth($spacing, 2);
52
	}
53

  
54
	@error "Invalid spacing #{spacing}";
55
}
56

  
57
@function extract-bottom($spacing){
58
	@if (length($spacing) == 1) {
59
		@return nth($spacing, 1);
60
	}
61

  
62
	@if (length($spacing) == 2) {
63
		@return nth($spacing, 1);
64
	}
65

  
66
	@if (length($spacing) == 4) {
67
		@return nth($spacing, 3);
68
	}
69

  
70
	@error "Invalid spacing #{spacing}";
71
}
72

  
73
@function extract-left($spacing){
74
	@if (length($spacing) == 1) {
75
		@return nth($spacing, 1);
76
	}
77

  
78
	@if (length($spacing) == 2) {
79
		@return nth($spacing, 2);
80
	}
81

  
82
	@if (length($spacing) == 4) {
83
		@return nth($spacing, 4);
84
	}
85

  
86
	@error "Invalid spacing #{spacing}";
87
}
88

  
37 89
// Check if value is a number > 0;
38 90
@function is-positive-number($value) {
39 91
	@return type-of($value) == 'number' and $value > 0;
40
-