2015-06-29 11:33:26 +08:00
|
|
|
// rotated and flipped icons
|
2013-10-23 03:55:08 +08:00
|
|
|
// -------------------------
|
|
|
|
|
Less refactor, changes outlined below:
**functions.less**
- added convenience functions
- `fudge` fudge a number from 0-6 decimal places
- `unitless` simple hack to parse a number from a unit
**icons.less**
- removed explicit definitions in favor of a loop iterating `@fa-var-glyphs`
**mixins.less**
- removed requirement to pass `@rotation` to `@fa-icon-rotate`, it is now calculated
- calculation required since `@fa-rotation-increment` is configurable, meaning not every rotation may adhere to 90 degree increments requiring @rotation
**rotated-flipped.less**
- rotations are now calculated by a loop iterating `@fa-rotation-increment`
- the ie fix is now calculated using a loop iterating only the rotation selectors requiring intervention
- this is required now that `@fa-rotation-increment` eists
**sizes.less**
- sizes are now calculated by a loop iterating `@fa-var-scales`
- this new method supports the existing `.fa-lg` selector, as well as introducing: `.fa-xsm` (33%), `.fa-sm` (66%x), `.fa-default` (100%), `.fa-xlg` (166%)
- multipliers are now calculated by a loop iterating `@fa-var-multipliers`
- this new method supports all existing multipliers (`.fa-2x`, `.fa-3x`, `.fa-4x`, `.fa-5x`)
**variables.less**
- added variables:
- deprecated explicit icon variables in favor of an array value (`@fa-var-glyphs`)
- `@fa-rotation-increment`
- `@fa-var-scales`
- `@fa-var-multipliers`
**font-awesome.less**
- added `functions.less`
**misc.**
- minor code cleanup
2015-06-29 09:43:06 +08:00
|
|
|
@rotations-requiring-ie-fix:
|
|
|
|
"flip-horizontal",
|
|
|
|
"flip-vertical";
|
|
|
|
@rotation-selector: '';
|
2013-10-23 03:55:08 +08:00
|
|
|
|
Less refactor, changes outlined below:
**functions.less**
- added convenience functions
- `fudge` fudge a number from 0-6 decimal places
- `unitless` simple hack to parse a number from a unit
**icons.less**
- removed explicit definitions in favor of a loop iterating `@fa-var-glyphs`
**mixins.less**
- removed requirement to pass `@rotation` to `@fa-icon-rotate`, it is now calculated
- calculation required since `@fa-rotation-increment` is configurable, meaning not every rotation may adhere to 90 degree increments requiring @rotation
**rotated-flipped.less**
- rotations are now calculated by a loop iterating `@fa-rotation-increment`
- the ie fix is now calculated using a loop iterating only the rotation selectors requiring intervention
- this is required now that `@fa-rotation-increment` eists
**sizes.less**
- sizes are now calculated by a loop iterating `@fa-var-scales`
- this new method supports the existing `.fa-lg` selector, as well as introducing: `.fa-xsm` (33%), `.fa-sm` (66%x), `.fa-default` (100%), `.fa-xlg` (166%)
- multipliers are now calculated by a loop iterating `@fa-var-multipliers`
- this new method supports all existing multipliers (`.fa-2x`, `.fa-3x`, `.fa-4x`, `.fa-5x`)
**variables.less**
- added variables:
- deprecated explicit icon variables in favor of an array value (`@fa-var-glyphs`)
- `@fa-rotation-increment`
- `@fa-var-scales`
- `@fa-var-multipliers`
**font-awesome.less**
- added `functions.less`
**misc.**
- minor code cleanup
2015-06-29 09:43:06 +08:00
|
|
|
// calculate classes and values for rotation
|
|
|
|
.calculateRotations(@i) when (@i >= 0) {
|
|
|
|
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
2015-06-29 10:12:03 +08:00
|
|
|
.@{rotation-selector} when (mod(@i, @fa-rotation-increment) = 0) {
|
Less refactor, changes outlined below:
**functions.less**
- added convenience functions
- `fudge` fudge a number from 0-6 decimal places
- `unitless` simple hack to parse a number from a unit
**icons.less**
- removed explicit definitions in favor of a loop iterating `@fa-var-glyphs`
**mixins.less**
- removed requirement to pass `@rotation` to `@fa-icon-rotate`, it is now calculated
- calculation required since `@fa-rotation-increment` is configurable, meaning not every rotation may adhere to 90 degree increments requiring @rotation
**rotated-flipped.less**
- rotations are now calculated by a loop iterating `@fa-rotation-increment`
- the ie fix is now calculated using a loop iterating only the rotation selectors requiring intervention
- this is required now that `@fa-rotation-increment` eists
**sizes.less**
- sizes are now calculated by a loop iterating `@fa-var-scales`
- this new method supports the existing `.fa-lg` selector, as well as introducing: `.fa-xsm` (33%), `.fa-sm` (66%x), `.fa-default` (100%), `.fa-xlg` (166%)
- multipliers are now calculated by a loop iterating `@fa-var-multipliers`
- this new method supports all existing multipliers (`.fa-2x`, `.fa-3x`, `.fa-4x`, `.fa-5x`)
**variables.less**
- added variables:
- deprecated explicit icon variables in favor of an array value (`@fa-var-glyphs`)
- `@fa-rotation-increment`
- `@fa-var-scales`
- `@fa-var-multipliers`
**font-awesome.less**
- added `functions.less`
**misc.**
- minor code cleanup
2015-06-29 09:43:06 +08:00
|
|
|
.fa-icon-rotate(@i);
|
|
|
|
}
|
|
|
|
.calculateRotations((@i - 1));
|
|
|
|
}
|
|
|
|
.calculateRotations(359);
|
|
|
|
|
|
|
|
// flip icons horizontal/vertical
|
2013-10-23 11:40:21 +08:00
|
|
|
.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
|
|
|
|
.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
|
2014-05-27 16:20:44 +08:00
|
|
|
|
Less refactor, changes outlined below:
**functions.less**
- added convenience functions
- `fudge` fudge a number from 0-6 decimal places
- `unitless` simple hack to parse a number from a unit
**icons.less**
- removed explicit definitions in favor of a loop iterating `@fa-var-glyphs`
**mixins.less**
- removed requirement to pass `@rotation` to `@fa-icon-rotate`, it is now calculated
- calculation required since `@fa-rotation-increment` is configurable, meaning not every rotation may adhere to 90 degree increments requiring @rotation
**rotated-flipped.less**
- rotations are now calculated by a loop iterating `@fa-rotation-increment`
- the ie fix is now calculated using a loop iterating only the rotation selectors requiring intervention
- this is required now that `@fa-rotation-increment` eists
**sizes.less**
- sizes are now calculated by a loop iterating `@fa-var-scales`
- this new method supports the existing `.fa-lg` selector, as well as introducing: `.fa-xsm` (33%), `.fa-sm` (66%x), `.fa-default` (100%), `.fa-xlg` (166%)
- multipliers are now calculated by a loop iterating `@fa-var-multipliers`
- this new method supports all existing multipliers (`.fa-2x`, `.fa-3x`, `.fa-4x`, `.fa-5x`)
**variables.less**
- added variables:
- deprecated explicit icon variables in favor of an array value (`@fa-var-glyphs`)
- `@fa-rotation-increment`
- `@fa-var-scales`
- `@fa-var-multipliers`
**font-awesome.less**
- added `functions.less`
**misc.**
- minor code cleanup
2015-06-29 09:43:06 +08:00
|
|
|
// ie 8-9 fix
|
2014-05-27 16:20:44 +08:00
|
|
|
// -------------------------
|
Less refactor, changes outlined below:
**functions.less**
- added convenience functions
- `fudge` fudge a number from 0-6 decimal places
- `unitless` simple hack to parse a number from a unit
**icons.less**
- removed explicit definitions in favor of a loop iterating `@fa-var-glyphs`
**mixins.less**
- removed requirement to pass `@rotation` to `@fa-icon-rotate`, it is now calculated
- calculation required since `@fa-rotation-increment` is configurable, meaning not every rotation may adhere to 90 degree increments requiring @rotation
**rotated-flipped.less**
- rotations are now calculated by a loop iterating `@fa-rotation-increment`
- the ie fix is now calculated using a loop iterating only the rotation selectors requiring intervention
- this is required now that `@fa-rotation-increment` eists
**sizes.less**
- sizes are now calculated by a loop iterating `@fa-var-scales`
- this new method supports the existing `.fa-lg` selector, as well as introducing: `.fa-xsm` (33%), `.fa-sm` (66%x), `.fa-default` (100%), `.fa-xlg` (166%)
- multipliers are now calculated by a loop iterating `@fa-var-multipliers`
- this new method supports all existing multipliers (`.fa-2x`, `.fa-3x`, `.fa-4x`, `.fa-5x`)
**variables.less**
- added variables:
- deprecated explicit icon variables in favor of an array value (`@fa-var-glyphs`)
- `@fa-rotation-increment`
- `@fa-var-scales`
- `@fa-var-multipliers`
**font-awesome.less**
- added `functions.less`
**misc.**
- minor code cleanup
2015-06-29 09:43:06 +08:00
|
|
|
// todo: check on assigning an array of selectors to the selector instead of using
|
|
|
|
// this loop
|
2014-05-27 16:20:44 +08:00
|
|
|
|
Less refactor, changes outlined below:
**functions.less**
- added convenience functions
- `fudge` fudge a number from 0-6 decimal places
- `unitless` simple hack to parse a number from a unit
**icons.less**
- removed explicit definitions in favor of a loop iterating `@fa-var-glyphs`
**mixins.less**
- removed requirement to pass `@rotation` to `@fa-icon-rotate`, it is now calculated
- calculation required since `@fa-rotation-increment` is configurable, meaning not every rotation may adhere to 90 degree increments requiring @rotation
**rotated-flipped.less**
- rotations are now calculated by a loop iterating `@fa-rotation-increment`
- the ie fix is now calculated using a loop iterating only the rotation selectors requiring intervention
- this is required now that `@fa-rotation-increment` eists
**sizes.less**
- sizes are now calculated by a loop iterating `@fa-var-scales`
- this new method supports the existing `.fa-lg` selector, as well as introducing: `.fa-xsm` (33%), `.fa-sm` (66%x), `.fa-default` (100%), `.fa-xlg` (166%)
- multipliers are now calculated by a loop iterating `@fa-var-multipliers`
- this new method supports all existing multipliers (`.fa-2x`, `.fa-3x`, `.fa-4x`, `.fa-5x`)
**variables.less**
- added variables:
- deprecated explicit icon variables in favor of an array value (`@fa-var-glyphs`)
- `@fa-rotation-increment`
- `@fa-var-scales`
- `@fa-var-multipliers`
**font-awesome.less**
- added `functions.less`
**misc.**
- minor code cleanup
2015-06-29 09:43:06 +08:00
|
|
|
:root {
|
|
|
|
.calculateIEFixes(@i) when (@i >= 0) {
|
|
|
|
@rotation-selector: ~"@{fa-css-prefix}-rotate-@{i}";
|
|
|
|
.@{rotation-selector} when (mod(@i, 90) = 0) {
|
|
|
|
filter: none;
|
|
|
|
}
|
|
|
|
// iterate
|
|
|
|
.calculateIEFixes((@i - 1));
|
|
|
|
}
|
|
|
|
.calculateIEFixes(359);
|
2014-05-27 16:20:44 +08:00
|
|
|
}
|