Different rules at different counts
This commit is contained in:
		
							
								
								
									
										9
									
								
								components/00_Global/_elementAmount.scss
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								components/00_Global/_elementAmount.scss
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
@mixin RV-Utils__ElementAmount($-up-to: 20) {
 | 
			
		||||
    @for $i from 1 through $-up-to {
 | 
			
		||||
 | 
			
		||||
        *:first-child:nth-last-child(#{$i}),
 | 
			
		||||
        *:first-child:nth-last-child(#{$i})~* {
 | 
			
		||||
            @content($i);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user