mirror of
				https://github.com/mdbootstrap/mdb-ui-kit.git
				synced 2025-10-30 23:47:42 +03:00 
			
		
		
		
	sass button-variations now being replaced
This commit is contained in:
		
							parent
							
								
									7fc8f47437
								
							
						
					
					
						commit
						cfa603321e
					
				
							
								
								
									
										14
									
								
								Gruntfile.js
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								Gruntfile.js
									
									
									
									
									
								
							|  | @ -29,16 +29,10 @@ module.exports = function(grunt) { | |||
|             }, | ||||
| 
 | ||||
|             // button variations mixin replacement(s)
 | ||||
|             //{ // http://rubular.com/r/r198CndVsf
 | ||||
|             //  pattern: /.generic-variations\(unquote\((.*)\).*\).*(\d+).*}\);/m,
 | ||||
|             //  replacement: '@include button-variations(unquote($1), $btn-default, $2%);',
 | ||||
|             //  order: 200
 | ||||
|             //}
 | ||||
|             // attempting multi-line replacement - https://github.com/duvillierA/grunt-less-to-sass/issues/6
 | ||||
|             { // http://rubular.com/r/oL4O1x6Wda
 | ||||
|               pattern: /.generic-variations\(unquote\(("[^"]+")\), (\$.+?(?!\r|\n)), {$\n.+?(?!\r|\n)(\d+).+?(?!\r|\n)}\);$\n/m, | ||||
|               replacement: '@include button-variations(unquote($1), $2, $3%);', | ||||
|               order: 2 | ||||
|             { // Multi-line replacement -https://regex101.com/r/qD9qB8/2
 | ||||
|               pattern: /.generic-variations\(unquote\(("[^"]+")\), (\$[\s\S]+?(?!\r|\n)), {$\n[\s\S]+?(?!\r|\n)contrast[\s\S]+?(?!\r|\n)(\d+)[\s\S]+?(?!\r|\n)}\);$\n/mg, | ||||
|               replacement: '@include button-variations(unquote($1), $2, $3%);\n', | ||||
|               order: 20 | ||||
|             } | ||||
| 
 | ||||
|           ] | ||||
|  |  | |||
|  | @ -24,17 +24,11 @@ | |||
|   @include background-variations(unquote(":not(.btn-link):not(.btn-flat)"), $btn-default); | ||||
| 
 | ||||
|   // BTN hover effect | ||||
|   .generic-variations(unquote(":hover:not(.btn-link):not(.btn-flat)"), $btn-default, { | ||||
|     background-color: contrast($material-color, darken($material-color, 4%), lighten($material-color, 4%), $contrast-factor); | ||||
|   }); | ||||
|   @include button-variations(unquote(":hover:not(.btn-link):not(.btn-flat)"), $btn-default, 4%); | ||||
|   // BTN active effect | ||||
|   .generic-variations(unquote(":active:not(.btn-link):not(.btn-flat)"), $btn-default, { | ||||
|     background-color: contrast($material-color, darken($material-color, 6%), lighten($material-color, 6%), $contrast-factor); | ||||
|   }); | ||||
|   @include button-variations(unquote(":active:not(.btn-link):not(.btn-flat)"), $btn-default, 6%); | ||||
|   // BTN .active effect | ||||
|   .generic-variations(unquote(".active:not(.btn-link):not(.btn-flat)"), $btn-default, { | ||||
|     background-color: contrast($material-color, darken($material-color, 6%), lighten($material-color, 6%), $contrast-factor); | ||||
|   }); | ||||
|   @include button-variations(unquote(".active:not(.btn-link):not(.btn-flat)"), $btn-default, 6%); | ||||
|   // BTN flat hover effect | ||||
|   .generic-variations(unquote(".btn-flat:hover:not(.btn-link)"), $btn-default, { | ||||
|     background-color: rgba($material-color, (20/100)); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user