Projet

Général

Profil

0001-scss-add-vars-to-manage-min-and-max-sidebar-width-38.patch

Thomas Jund (congés, retour le 29/04), 13 décembre 2019 16:42

Télécharger (2,38 ko)

Voir les différences:

Subject: [PATCH] scss: add vars to manage min and max sidebar width (#38451)

 help/fr/misc-scss.page       | 10 ++++++++++
 static/includes/_layout.scss | 11 ++++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)
help/fr/misc-scss.page
77 77
  <td><p>Largeur de la barre latérale</p></td>
78 78
  <td><p><var>300px</var></p></td>
79 79
 </tr>
80
 <tr>
81
  <td><p><code>$sidebar-max-width</code></p></td>
82
  <td><p>Largeur maximale de la barre latérale, utile dans le cas où la valeur de <code>$sidebar-width</code> est définie en %</p></td>
83
  <td><p><var>$sidebar-width</var></p></td>
84
 </tr>
85
 <tr>
86
  <td><p><code>$sidebar-min-width</code></p></td>
87
  <td><p>Largeur minimale de la barre latérale, utile dans le cas où la valeur de <code>$sidebar-width</code> est définie en %</p></td>
88
  <td><p><var>0</var></p></td>
89
 </tr>
80 90
 <tr>
81 91
  <td><p><code>$notification-style</code></p></td>
82 92
  <td><p>Rendu des notifications (messages, erreurs, etc.), soit « classic »
static/includes/_layout.scss
5 5
$footer-color: white !default;
6 6
$top-logo-width: 0 !default;
7 7
$sidebar-width: 300px !default;
8
$sidebar-max-width: $sidebar-width !default;
9
$sidebar-min-width: 0 !default;
8 10
$sidebar-position: left !default;
9 11

  
10 12
html, body {
......
99 101
		-ms-flex: 0 0 $sidebar-width;
100 102
		-webkit-flex: 0 0 $sidebar-width;
101 103
		flex: 0 0 $sidebar-width;
102
		max-width: $sidebar-width;
104
		max-width: $sidebar-max-width;
105
		@if $sidebar-min-width != 0 {
106
			min-width: $sidebar-min-width;
107
		}
103 108
		@if $sidebar-position == right {
104 109
			-ms-flex-order: 1;
105 110
			-webkit-order: 1;
......
136 141
			-webkit-flex: 0 0 auto;
137 142
			flex: 0 0 auto;
138 143
			max-width: 100%;
144
			// don't apply min-width on mobile
145
			@if $sidebar-min-width != 0 {
146
				min-width: 0;
147
			}
139 148
			margin: 0 0.7em;
140 149
			div.cell {
141 150
				margin-left: 0;
142
-