Add additional CSS features?
Would be nice to have some helper classes in mdi.css to easily alter icons. I was thinking basic rotation classes such as mdi-rot-90, mdi-rot-180 and mdi-rot-270 which can be used to easily reorient icons. Animated icons would also be useful such as spinning icons. I'd be happy to provide some code.
It sounds like the FontAwesome CSS features. Icon stacking would be awesome too :+1:
Okay, I've added the following scripts to the _extras.scss. I'll close this issue out after the next official font release which will be at v1.3.0.
$degrees: 45 90 135 180 225 270 315;
@each $degree in $degrees {
.#{$mdi-css-prefix}-rotate-#{$degree} {
-webkit-transform: rotate(#{$degree}deg);
-ms-transform: rotate(#{$degree}deg);
transform: rotate(#{$degree}deg);
}
}
.#{$mdi-css-prefix}-flip-horizontal {
-webkit-transform: scaleX(-1);
transform: scaleX(-1);
filter: FlipH;
-ms-filter: "FlipH";
}
.#{$mdi-css-prefix}-flip-vertical {
-webkit-transform: scaleY(-1);
transform: scaleY(-1);
filter: FlipV;
-ms-filter: "FlipV";
}
@REJack Stacking might be a good idea. Not sure how useful it would be though.
The barebones stacking that Font Awesome provides can be better coded on a per element basis through your own CSS. IMHO.
I have to agree with @r3volution11 on that. Stacking would be great if you could simply specify multiple icon classes on the element and have them all stack how you wanted, but, as it can't be implemented in such a way, it is better to implement yourself. Due to the manipulation of positioning, the CSS to enable stacking could, in the worst case, break existing styles on the element and cause unexpected effects.
It might be an idea to mention these somewhere on the main page but other than that this issue can be closed assuming there were no issues with implementation.
@Templarian Came across this when searching on how to accomplish a rotation. I didn't have success out of the box, not sure if it's a regression or incorrect usage:
https://jsfiddle.net/qL8rpy2d/
This was added a while ago, closing this out.