N°3685 Optimize CSS size: .ibo-button is extended at multiple places, reducing its use in loops when possible greatly improves compiled selectors

This commit is contained in:
Stephen Abello
2021-09-13 16:34:56 +02:00
committed by Molkobain
parent 61f3d3aeda
commit 1fb2ff355d
2 changed files with 5 additions and 3 deletions

View File

@@ -48,8 +48,10 @@ $ibo-button-group--elements-separator--border-left: 1px solid transparent !defau
border-left: $ibo-button-group--elements-separator--border-left;
}
/* Note: Selector cannot be simplified in the one above as the "::before" must be after the different classes */
.ibo-button + .ibo-button {
/* Note: Selector cannot be simplified in the one above as the "::before" must be after the different classes.
* A more precise selector could be .ibo-button + .ibo-button, however .ibo-button is extended by multiple element and in a multiple loop it creates heavy selectors.
*/
> * + * {
@each $sType, $aColors in $ibo-button-colors {
@each $sColor, $aPseudoclasses in $aColors {
@each $sPseudoclass, $aAttributes in $aPseudoclasses {