Projet

Général

Profil

0001-scss-add-variables-to-control-widget-backgrounds-bor.patch

Frédéric Péters, 25 juin 2018 11:15

Télécharger (3,33 ko)

Voir les différences:

Subject: [PATCH] scss: add variables to control widget backgrounds/borders
 (#24745)

 help/fr/misc-scss.page      | 15 +++++++++++++++
 static/includes/_forms.scss | 10 +++++++++-
 2 files changed, 24 insertions(+), 1 deletion(-)
help/fr/misc-scss.page
333 333
  <td><p>Taille de l'arrondi à appliquer aux boutons</p></td>
334 334
  <td><p><var>$border-radius</var></p></td>
335 335
 </tr>
336
 <tr>
337
  <td><p><code>$widget-background</code></p></td>
338
  <td><p>Couleur de fond des champs de formulaire (texte, liste…)</p></td>
339
  <td><p><var>white</var></p></td>
340
 </tr>
336 341
 <tr>
337 342
  <td><p><code>$widget-border</code></p></td>
338 343
  <td><p>Style de bordure des champs de formulaire (texte, liste…)</p></td>
339 344
  <td><p><var>1px solid #AAA</var></p></td>
340 345
 </tr>
346
 <tr>
347
  <td><p><code>$widget-focus-background</code></p></td>
348
  <td><p>Couleur de fond des champs de formulaire lorsqu'ils sont actifs (texte, liste…)</p></td>
349
  <td><p><var>white</var></p></td>
350
 </tr>
351
 <tr>
352
  <td><p><code>$widget-focus-border</code></p></td>
353
  <td><p>Style de bordure des champs de formulaire lorsqu'ils sont actifs (texte, liste…)</p></td>
354
  <td><p><var>white</var></p></td>
355
 </tr>
341 356
 <tr>
342 357
  <td><p><code>$widget-border-radius</code></p></td>
343 358
  <td><p>Taille de l'arrondi à appliquer aux champs de formulaire (texte, liste…)</p></td>
static/includes/_forms.scss
8 8
$button-hover-color: $button-color !default;
9 9
$button-border-radius: $border-radius !default;
10 10

  
11
$widget-background: white !default;
11 12
$widget-border: 1px solid #AAA !default;
12 13
$widget-border-radius: 0 !default;
14
$widget-focus-background: inherit !default;
15
$widget-focus-border: 1px solid #AAA !default;
13 16

  
14 17
/* $form-style: global style of form elements; possible values
15 18
 * are:
......
110 113
}
111 114

  
112 115
input, input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="tel"], input[type="number"], input[type="search"], input[type="file"], input[type="date"], input[type="datetime-local"], input[type="month"], input[type="time"], input[type="week"], textarea, select {
116
	background: $widget-background;
113 117
	border: $widget-border;
114 118
	border-radius: $widget-border-radius;
115 119
	box-sizing: border-box;
......
117 121
	outline: medium none;
118 122
	padding: 0.7ex 0.7em 0.7ex 0.7em;
119 123
	max-width: 100%;
124
	transition: all 0.5s ease;
125
	&:focus {
126
		background-color: $widget-focus-background;
127
		border: $widget-focus-border;
128
	}
120 129
}
121 130

  
122 131
input[readonly], select[readonly], textarea[readonly] {
......
134 143
}
135 144

  
136 145
select {
137
	background: white;
138 146
	@include vendor-prefix('appearance', 'none');
139 147
	padding-right: 4em;
140 148
	background-image: url($data_uri_arrow-down);
141
-