だから私は、数字(回転する角度)を取り、正しいcssを出力して要素を回転させるLESS mixinを作ろうとしています。問題は、IE で "270deg" と "3" (270/90) の両方を記述する方法がわからないことです。これが私が試したことです:
.rotate(@rotation: 0) {
@deg: deg;
-webkit-transform: rotate(@rotation deg); // i can see why this doesn't work
-moz-transform: rotate((@rotation)deg); // parens
-o-transform: rotate(@rotation+deg); // variable-keyword concatenation
transform: rotate(@rotation+@deg); // variable-variable concatenation
// this is the reason I need @rotation to be just a number:
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation/90);
}
.someElement {
.rotate(270)
}
今のところ、変数/キーワードの連結の間にスペースを入れないように、コンパイラ スクリプトを修正しました。より良い解決策があることを願っています。