Projet

Général

Profil

0001-scss-don-t-use-overflow-hidden-for-bordered-radius-c.patch

Thomas Jund, 03 mars 2020 12:02

Télécharger (2,73 ko)

Voir les différences:

Subject: [PATCH] scss: don't use overflow:hidden for bordered-radius cells
 (#40261)

 static/includes/_cells.scss | 50 +++++++++++++++++++++++++++++++------
 1 file changed, 43 insertions(+), 7 deletions(-)
static/includes/_cells.scss
78 78
	color: $cell-color;
79 79
	box-sizing: border-box;
80 80
	border: $cell-border;
81
	@if is-positive-number($cell-border-radius)  {
82
		border-radius: $cell-border-radius;
83
		overflow: hidden;
84
	}
81
	border-radius: $cell-border-radius;
85 82
}
86 83

  
87 84
div#services > ul > li,
......
125 122
	@if $cell-title-cover-border == true {
126 123
		margin: #{extract-width($cell-border) * -1};
127 124
	}
128
	border-bottom-left-radius: 0;
129
	border-bottom-right-radius: 0;
125

  
126
	@if is-positive-number($cell-border-radius)  {
127
		// make sure cell title don't overflow the cell radius
128
		border-radius: $cell-border-radius;
129
		&:not(:only-child) {
130
			border-bottom-left-radius: 0;
131
			border-bottom-right-radius: 0;
132
		};
133
	}
130 134
}
131 135

  
132 136
div.links-list p {
......
151 155
	position: relative;
152 156
	z-index: 0;
153 157

  
154
	& > li {
158
	& > li:not(:last-child):not(.more-items) {
155 159
		border-bottom: 1px solid $cell-entry-border-color;
156 160
	}
157 161
	& > li > a {
......
223 227
			margin-bottom: 0.7em;
224 228
		}
225 229
	}
230

  
231
	@if is-positive-number($cell-border-radius)  {
232
		// make sure last link don't overflow the cell radius
233
		li.more-items a,
234
		> li:last-child a:only-child {
235
			border-bottom-left-radius: $cell-border-radius;
236
			border-bottom-right-radius: $cell-border-radius;
237
		}
238
		// make sure first link don't overflow the cell radius
239
		> li:first-child a {
240
			border-top-left-radius: $cell-border-radius;
241
			border-top-right-radius: $cell-border-radius;
242
		}
243
		// BUT don't apply border-radius on not last item of sub-list links
244
		li:not(:last-child) li a:only-child {
245
			border-radius: 0;
246
		}
247
		// BUT don't apply top border-radius on first link to sub-list
248
		li li:first-child a {
249
			border-top-left-radius: 0;
250
			border-top-right-radius: 0;
251
		}
252
	}
226 253
}
227 254

  
228 255
.gru-content div.wcsformsofcategorycell {
......
313 340
			margin-bottom: 0;
314 341
			padding-bottom: 0.7em;
315 342
		}
343
		ul > li:last-child {
344
			border-bottom: 1px solid $cell-entry-border-color;
345

  
346
			@if is-positive-number($cell-border-radius) {
347
				> a {
348
					border-radius: 0;
349
				}
350
			}
351
		}
316 352
		+ div {
317 353
			margin-top: 0;
318 354
			border-radius: 0 0 $cell-border-radius $cell-border-radius;
319
-