Title: CSS transform: translateX/translateY only takes a number, should take a percentage · Issue #3707 · NativeScript/NativeScript · GitHub
Open Graph Title: CSS transform: translateX/translateY only takes a number, should take a percentage · Issue #3707 · NativeScript/NativeScript
X Title: CSS transform: translateX/translateY only takes a number, should take a percentage · Issue #3707 · NativeScript/NativeScript
Description: Tell us about the problem I'm trying to make an element of variable height slide up into view in our nativescript-angular project. I'm animating with transform: translateY(100%) to translateY(0), e.g. sliding up form the bottom and on cl...
Open Graph Description: Tell us about the problem I'm trying to make an element of variable height slide up into view in our nativescript-angular project. I'm animating with transform: translateY(100%) to translateY(0), e...
X Description: Tell us about the problem I'm trying to make an element of variable height slide up into view in our nativescript-angular project. I'm animating with transform: translateY(100%) to translat...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/3707
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"CSS transform: translateX/translateY only takes a number, should take a percentage","articleBody":"### Tell us about the problem\r\nI'm trying to make an element of variable height slide up into view in our `nativescript-angular` project.\r\nI'm animating with transform: translateY(100%) to translateY(0), e.g. sliding up form the bottom and on close back again.\r\n\r\nThe element doesn't start from the bottom, it looks like it only operates on numbers and not on percentage.\r\nI can see in master the value of run through `parseFloat` here: https://github.com/NativeScript/NativeScript/blob/17610daa9a182fd999efb7c5b69a983015801b17/tns-core-modules/ui/styling/css-animation-parser.ts#L149\r\nBut we're running v2.5 and I couldn't figure out what happens to the value in this version.\r\n\r\nBelow you can see a the problem:\r\n\r\n\r\nBoth the blue and the red box have a fixed height of 200.\r\nThe blue box starts at `translateY(100%)`.\r\nThe red box starts at `translateY(200)`.\r\nBoth animates to `translateY(0)`\r\n\r\n1. The blue box starts half way up and but the red box cannot be seen before the animation starts.\r\n2. They both animate to the top.\r\n3. Animating out again, the blue box stops halfway and the red box disappears out of the view.\r\n\r\nAccording to http://docs.webplatform.org/css/functions/translateY/ it should take a percentage value.\r\n\r\n### Which platform(s) does your issue occur on?\r\nBoth\r\n\r\n### Please provide the following version numbers that your issue occurs with:\r\n- CLI: 2.5.1\r\n- Cross-platform modules: 2.5.1\r\n- Runtime(s): 2.5.0\r\n\r\n### Please tell us how to recreate the issue in as much detail as possible.\r\nSet the css-property `transform` to `translateY(100%)` and see elements taller than 100dp are still visible on the screen.\r\n\r\n### Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.\r\nCode here: https://github.com/m-abs/tns-webpack-ng2.3/tree/css-translate-percentage\r\n\r\n\r\n\r\n\r\n\u003cbountysource-plugin>\r\n\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/42452684-css-transform-translatex-translatey-only-takes-a-number-should-take-a-percentage?utm_campaign=plugin&utm_content=tracker%2F12908224&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F12908224&utm_medium=issues&utm_source=github).\r\n\u003c/bountysource-plugin>","author":{"url":"https://github.com/m-abs","@type":"Person","name":"m-abs"},"datePublished":"2017-02-24T15:31:33Z","url":"https://github.com/NativeScript/NativeScript/issues/3707"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:93010804-317a-716b-0b5b-dc9d1173f3b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 87A2:EA06E:19F3ED3:211D832:6B01331B |
| html-safe-nonce | 0c4e2b276e339b3fbd78b985f6c93bc7e3c5d2a20589bf6554a0fc37d24095f7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4N0EyOkVBMDZFOjE5RjNFRDM6MjExRDgzMjo2QjAxMzMxQiIsInZpc2l0b3JfaWQiOiI2ODc4NjU2MDE0ODc5NjM0MjAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0b8fa0fa409118707972112631e2bb75c7d82924891a02508a6ba14132ac9a30 |
| hovercard-subject-tag | issue:210078079 |
| 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/NativeScript/NativeScript/3707/issue_layout |
| twitter:image | https://opengraph.githubassets.com/59aaeb8ae9f2811d2d84ed4d3de9be703276234f9347d3ea64ada24904449adc/NativeScript/NativeScript/issues/3707 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/59aaeb8ae9f2811d2d84ed4d3de9be703276234f9347d3ea64ada24904449adc/NativeScript/NativeScript/issues/3707 |
| og:image:alt | Tell us about the problem I'm trying to make an element of variable height slide up into view in our nativescript-angular project. I'm animating with transform: translateY(100%) to translateY(0), e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | m-abs |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width