Title: API: New shorthand mixins · Issue #46 · codeworksdev/animate.less · GitHub
Open Graph Title: API: New shorthand mixins · Issue #46 · codeworksdev/animate.less
X Title: API: New shorthand mixins · Issue #46 · codeworksdev/animate.less
Description: The new shorthand mixins listed below provide an easy way to generate cross-browser CSS properties commonly used in animations and transitions. SHORTHAND MIXINS Note: These mixins use #a.vendor to ensure cross-browser CSS properties are ...
Open Graph Description: The new shorthand mixins listed below provide an easy way to generate cross-browser CSS properties commonly used in animations and transitions. SHORTHAND MIXINS Note: These mixins use #a.vendor to ...
X Description: The new shorthand mixins listed below provide an easy way to generate cross-browser CSS properties commonly used in animations and transitions. SHORTHAND MIXINS Note: These mixins use #a.vendor to ...
Opengraph URL: https://github.com/codeworksdev/animate.less/issues/46
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"API: New shorthand mixins","articleBody":"The new **[shorthand mixins](https://github.com/codeworksdev/animate.less/blob/master/README.md#shorthand-mixins)** listed below provide an easy way to generate cross-browser CSS properties commonly used in animations and transitions.\r\n\r\n## SHORTHAND MIXINS\r\n_**Note:** These mixins use [**`#a.vendor`**](https://github.com/codeworksdev/animate.less/issues/47) to ensure cross-browser CSS properties are generated._\r\n```less\r\n#a.animation\r\n#a.animations\r\n#a.backface-visibility\r\n#a.delay\r\n#a.delay\r\n#a.direction\r\n#a.duration\r\n#a.duration\r\n#a.fill\r\n#a.iterate\r\n#a.timing\r\n#a.timing\r\n#a.transform\r\n#a.transform-origin\r\n#a.transition\r\n#a.transitions\r\n```\r\n\r\n\u003e **FOR EXAMPLE**\r\n\u003e You can create your own mixin to define one or more CSS properties with minimal effort:\r\n\u003e ```less\r\n\u003e .my_prefixed_mixin(@animation_name: none; @delay : 0s) {\r\n\u003e #a.animation(@animation_name);\r\n\u003e #a.delay(a, @delay);\r\n\u003e }\r\n\u003e```\r\n\u003eAssuming **[`@o_animateless_prefixed`](https://github.com/codeworksdev/animate.less/issues/33)** is `true`, **`.my_prefixed_mixin(bounceIn)`** would generate:\r\n\u003e```css\r\n\u003e-webkit-animation-name: bounceIn;\r\n\u003e -moz-animation-name: bounceIn;\r\n\u003e -ms-animation-name: bounceIn;\r\n\u003e -o-animation-name: bounceIn;\r\n\u003e animation-name: bounceIn;\r\n\u003e-webkit-animation-delay: 0s;\r\n\u003e -moz-animation-delay: 0s;\r\n\u003e -ms-animation-delay: 0s;\r\n\u003e -o-animation-delay: 0s;\r\n\u003e animation-delay: 0s;\r\n\u003e```\r\n\r\n___\r\n\u003ca id=\"underscored-shorthand-mixins\"\u003e\u003c/a\u003e\r\n## UNDERSCORED SHORTHAND MIXINS\r\nAlternatively, you can use the **[underscored](https://github.com/codeworksdev/animate.less/blob/master/README.md#underscored-shorthand-mixins)** variants of the mixins listed above if you need to generate CSS properties for a specific vendor prefix only (defined by the `@vendor` variable).\r\n\r\n```less\r\n#a._animation\r\n#a._animations\r\n#a._backface-visibility\r\n#a._delay\r\n#a._delay\r\n#a._direction\r\n#a._duration\r\n#a._duration\r\n#a._fill\r\n#a._iterate\r\n#a._timing\r\n#a._timing\r\n#a._transform\r\n#a._transform-origin\r\n#a._transition\r\n#a._transitions\r\n```\r\n\r\n\u003e **FOR EXAMPLE**\r\n\u003e You can create your own mixin and define `@vendor` before generating one or more CSS properties.\r\n\u003e ```less\r\n\u003e .my_webkit_mixin(@animation_name: none; @delay : 0s) {\r\n\u003e @vendor: -webkit-;\r\n\u003e #a._animation(@animation_name);\r\n\u003e #a._delay(a, @delay);\r\n\u003e }\r\n\u003e```\r\n\u003eAssuming **`.my_webkit_mixin(bounceIn)`**, the above example would generate:\r\n\u003e```css\r\n\u003e-webkit-animation-name: bounceIn;\r\n\u003e-webkit-animation-delay: 0s;\r\n\u003e```","author":{"url":"https://github.com/codeworksdev","@type":"Person","name":"codeworksdev"},"datePublished":"2018-05-14T14:47:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/46/animate.less/issues/46"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:39847252-52f0-a30d-8ce0-71afbb3924eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D92:33661E:EE458:143123:6A5A6737 |
| html-safe-nonce | 65b6d0b38bb80c264f39c6f302d990330577f371a2621a33108de9bf75836bae |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDkyOjMzNjYxRTpFRTQ1ODoxNDMxMjM6NkE1QTY3MzciLCJ2aXNpdG9yX2lkIjoiMzE5MzM5OTAzNzgwMzUyMTg0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f7ac02487e38c96870376d1722c978fd7f1e30a91d50527b97c1d5a84d8dbcea |
| hovercard-subject-tag | issue:322849674 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/codeworksdev/animate.less/46/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a0963fe1d4dd7f0f21d94e5dceb58bb5fe86b67aa1513c99797cc8720f070a8c/codeworksdev/animate.less/issues/46 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a0963fe1d4dd7f0f21d94e5dceb58bb5fe86b67aa1513c99797cc8720f070a8c/codeworksdev/animate.less/issues/46 |
| og:image:alt | The new shorthand mixins listed below provide an easy way to generate cross-browser CSS properties commonly used in animations and transitions. SHORTHAND MIXINS Note: These mixins use #a.vendor to ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | codeworksdev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 922bdba685ea48400234d557977f0e32d9adbae6f5125725b4f48cacc6801106 |
| turbo-cache-control | no-preview |
| go-import | github.com/codeworksdev/animate.less git https://github.com/codeworksdev/animate.less.git |
| octolytics-dimension-user_id | 1557842 |
| octolytics-dimension-user_login | codeworksdev |
| octolytics-dimension-repository_id | 27091072 |
| octolytics-dimension-repository_nwo | codeworksdev/animate.less |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27091072 |
| octolytics-dimension-repository_network_root_nwo | codeworksdev/animate.less |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 03575fc589c0e2692de839d7ca2b3aa5b5179f52 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width