payload: {"action":"created","comment":{"url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/comments/313347568","pull_request_review_id":274219981,"id":313347568,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMxMzM0NzU2OA==","diff_hunk":"@@ -56,6 +58,83 @@ export function _getStyleProperties(): CssProperty<any, any>[] {\n     return getPropertiesFromMap(cssSymbolPropertyMap) as CssProperty<any, any>[];\n }\n \n+const cssCalcRegexp = /\\bcalc\\(/;\n+const cssVariableNameRegexp = /^--[^,\\s]+?$/;\n+const cssVarValueRegexp = /\\bvar\\(\\s*(--[^,\\s]+?)(?:\\s*,\\s*(.+))?\\s*\\)/;\n+\n+export function isCssVariableName(property: string) {\n+    return cssVariableNameRegexp.test(property);\n+}\n+\n+export function isCssCalcValue(value: string) {\n+    return cssCalcRegexp.test(value);\n+}\n+\n+export function isCssValueUsingCssVariable(value: string) {\n+    return cssVarValueRegexp.test(value);\n+}\n+\n+export function _evaluateCssVariable<T>(view: ViewBase, cssName: string, value: string | T): string | T {\n+    if (typeof value !== \"string\" || !value) {","path":"tns-core-modules/ui/core/properties/properties.ts","position":null,"original_position":27,"commit_id":"428814f36e76f2820012ea25112c12ff7b5fd4ae","original_commit_id":"a2a3661a88023769c109c956e720e8ecfb3ba611","user":{"login":"m-abs","id":1348705,"node_id":"MDQ6VXNlcjEzNDg3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1348705?v=4","gravatar_id":"","url":"https://api.github.com/users/m-abs","html_url":"https://github.com/m-abs","followers_url":"https://api.github.com/users/m-abs/followers","following_url":"https://api.github.com/users/m-abs/following{/other_user}","gists_url":"https://api.github.com/users/m-abs/gists{/gist_id}","starred_url":"https://api.github.com/users/m-abs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-abs/subscriptions","organizations_url":"https://api.github.com/users/m-abs/orgs","repos_url":"https://api.github.com/users/m-abs/repos","events_url":"https://api.github.com/users/m-abs/events{/privacy}","received_events_url":"https://api.github.com/users/m-abs/received_events","type":"User","site_admin":false},"body":"That was meant to check for empty string.","created_at":"2019-08-13T11:31:29Z","updated_at":"2019-08-13T11:31:30Z","html_url":"https://github.com/NativeScript/NativeScript/pull/7553#discussion_r313347568","pull_request_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/comments/313347568"},"html":{"href":"https://github.com/NativeScript/NativeScript/pull/7553#discussion_r313347568"},"pull_request":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553"}},"in_reply_to_id":313277127},"pull_request":{"url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553","id":299380655,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk5MzgwNjU1","html_url":"https://github.com/NativeScript/NativeScript/pull/7553","diff_url":"https://github.com/NativeScript/NativeScript/pull/7553.diff","patch_url":"https://github.com/NativeScript/NativeScript/pull/7553.patch","issue_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/7553","number":7553,"state":"open","locked":false,"title":"feat: implement css-variables and css-calc","user":{"login":"m-abs","id":1348705,"node_id":"MDQ6VXNlcjEzNDg3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1348705?v=4","gravatar_id":"","url":"https://api.github.com/users/m-abs","html_url":"https://github.com/m-abs","followers_url":"https://api.github.com/users/m-abs/followers","following_url":"https://api.github.com/users/m-abs/following{/other_user}","gists_url":"https://api.github.com/users/m-abs/gists{/gist_id}","starred_url":"https://api.github.com/users/m-abs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-abs/subscriptions","organizations_url":"https://api.github.com/users/m-abs/orgs","repos_url":"https://api.github.com/users/m-abs/repos","events_url":"https://api.github.com/users/m-abs/events{/privacy}","received_events_url":"https://api.github.com/users/m-abs/received_events","type":"User","site_admin":false},"body":"<!--\r\nWe, the rest of the NativeScript community, thank you for your\r\ncontribution! \r\nTo help the rest of the community review your change, please follow the instructions in the template.\r\n-->\r\n\r\n<!-- PULL REQUEST TEMPLATE -->\r\n<!-- (Update \"[ ]\" to \"[x]\" to check a box) -->\r\n\r\n## PR Checklist\r\n\r\n- [x] The PR title follows our guidelines: https://github.com/NativeScript/NativeScript/blob/master/CONTRIBUTING.md#commit-messages.\r\n- [x] There is an issue for the bug/feature this PR is for. To avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it.\r\n- [x] You have signed the [CLA](http://www.nativescript.org/cla).\r\n- [x] All existing tests are passing: https://github.com/NativeScript/NativeScript/blob/master/DevelopmentWorkflow.md#running-unit-tests.\r\n- [x] Tests for the changes are included - https://github.com/NativeScript/NativeScript/blob/master/WritingUnitTests.md.\r\n\r\n## What is the current behavior?\r\n<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->\r\nNo support for css-variables\r\n\r\n## What is the new behavior?\r\n<!-- Describe the changes. -->\r\nAdds basic support for css-variables\r\n\r\n```css\r\n.button {\r\n   --custom-color: black; /** text-color: black **/\r\n   color: var(--custom-color);\r\n}\r\n\r\n.button.got-the-blues {\r\n   --custom-color: blue; /** text-color: blue **/\r\n}\r\n\r\n.button.red {\r\n   --custom-color: red;  /** text-color: red **/\r\n}\r\n```\r\n\r\nAdds support for `calc(...)` in CSS, via [reduce-css-calc](https://github.com/MoOx/reduce-css-calc).\r\n\r\n```css\r\nStackLayout {\r\n    --my-factor: 1;  /** width: 100% **/\r\n   width: calc(100% * var(--my-factor));\r\n}\r\n\r\nStackLayout.slim {\r\n    --my-factor: 0.1;  /** width: 10% **/\r\n}\r\n\r\nStackLayout.wide {\r\n    --my-factor: 1.25; /** width: 125% **/\r\n}\r\n```\r\n\r\n### What is still missing:\r\n- ~Updating the variables via `view.style` is broken, if already defined in CSS.~\r\n- ~For CSS-variables to be really useful, support for `calc(var(--my-variable) * 2)` is needed. I intend to add this to the PR.~\r\n- clean up\r\n\r\nImplements #4864 \r\n\r\n<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->\r\n\r\n<!-- \r\nBREAKING CHANGES:\r\n\r\n\r\n[Describe the impact of the changes here.]\r\n\r\nMigration steps:\r\n[Provide a migration path for existing applications.]\r\n-->\r\n\r\n","created_at":"2019-07-19T15:25:27Z","updated_at":"2019-08-13T11:31:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"83105b26f6029f2b3a402923298f6bce3ec79595","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":203722174,"node_id":"MDU6TGFiZWwyMDM3MjIxNzQ=","url":"https://api.github.com/repos/NativeScript/NativeScript/labels/cla:%20yes","name":"cla: yes","color":"007241","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553/commits","review_comments_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553/comments","review_comment_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/7553/comments","statuses_url":"https://api.github.com/repos/NativeScript/NativeScript/statuses/428814f36e76f2820012ea25112c12ff7b5fd4ae","head":{"label":"m-abs:feat/css-variables","ref":"feat/css-variables","sha":"428814f36e76f2820012ea25112c12ff7b5fd4ae","user":{"login":"m-abs","id":1348705,"node_id":"MDQ6VXNlcjEzNDg3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1348705?v=4","gravatar_id":"","url":"https://api.github.com/users/m-abs","html_url":"https://github.com/m-abs","followers_url":"https://api.github.com/users/m-abs/followers","following_url":"https://api.github.com/users/m-abs/following{/other_user}","gists_url":"https://api.github.com/users/m-abs/gists{/gist_id}","starred_url":"https://api.github.com/users/m-abs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-abs/subscriptions","organizations_url":"https://api.github.com/users/m-abs/orgs","repos_url":"https://api.github.com/users/m-abs/repos","events_url":"https://api.github.com/users/m-abs/events{/privacy}","received_events_url":"https://api.github.com/users/m-abs/received_events","type":"User","site_admin":false},"repo":{"id":52889892,"node_id":"MDEwOlJlcG9zaXRvcnk1Mjg4OTg5Mg==","name":"NativeScript","full_name":"m-abs/NativeScript","private":false,"owner":{"login":"m-abs","id":1348705,"node_id":"MDQ6VXNlcjEzNDg3MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/1348705?v=4","gravatar_id":"","url":"https://api.github.com/users/m-abs","html_url":"https://github.com/m-abs","followers_url":"https://api.github.com/users/m-abs/followers","following_url":"https://api.github.com/users/m-abs/following{/other_user}","gists_url":"https://api.github.com/users/m-abs/gists{/gist_id}","starred_url":"https://api.github.com/users/m-abs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-abs/subscriptions","organizations_url":"https://api.github.com/users/m-abs/orgs","repos_url":"https://api.github.com/users/m-abs/repos","events_url":"https://api.github.com/users/m-abs/events{/privacy}","received_events_url":"https://api.github.com/users/m-abs/received_events","type":"User","site_admin":false},"html_url":"https://github.com/m-abs/NativeScript","description":"Build truly native cross-platform iOS and Android apps with JavaScript","fork":true,"url":"https://api.github.com/repos/m-abs/NativeScript","forks_url":"https://api.github.com/repos/m-abs/NativeScript/forks","keys_url":"https://api.github.com/repos/m-abs/NativeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m-abs/NativeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m-abs/NativeScript/teams","hooks_url":"https://api.github.com/repos/m-abs/NativeScript/hooks","issue_events_url":"https://api.github.com/repos/m-abs/NativeScript/issues/events{/number}","events_url":"https://api.github.com/repos/m-abs/NativeScript/events","assignees_url":"https://api.github.com/repos/m-abs/NativeScript/assignees{/user}","branches_url":"https://api.github.com/repos/m-abs/NativeScript/branches{/branch}","tags_url":"https://api.github.com/repos/m-abs/NativeScript/tags","blobs_url":"https://api.github.com/repos/m-abs/NativeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m-abs/NativeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m-abs/NativeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/m-abs/NativeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m-abs/NativeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/m-abs/NativeScript/languages","stargazers_url":"https://api.github.com/repos/m-abs/NativeScript/stargazers","contributors_url":"https://api.github.com/repos/m-abs/NativeScript/contributors","subscribers_url":"https://api.github.com/repos/m-abs/NativeScript/subscribers","subscription_url":"https://api.github.com/repos/m-abs/NativeScript/subscription","commits_url":"https://api.github.com/repos/m-abs/NativeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/m-abs/NativeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/m-abs/NativeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/m-abs/NativeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/m-abs/NativeScript/contents/{+path}","compare_url":"https://api.github.com/repos/m-abs/NativeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m-abs/NativeScript/merges","archive_url":"https://api.github.com/repos/m-abs/NativeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m-abs/NativeScript/downloads","issues_url":"https://api.github.com/repos/m-abs/NativeScript/issues{/number}","pulls_url":"https://api.github.com/repos/m-abs/NativeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/m-abs/NativeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/m-abs/NativeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m-abs/NativeScript/labels{/name}","releases_url":"https://api.github.com/repos/m-abs/NativeScript/releases{/id}","deployments_url":"https://api.github.com/repos/m-abs/NativeScript/deployments","created_at":"2016-03-01T15:59:58Z","updated_at":"2019-03-22T21:34:54Z","pushed_at":"2019-08-13T11:31:01Z","git_url":"git://github.com/m-abs/NativeScript.git","ssh_url":"git@github.com:m-abs/NativeScript.git","clone_url":"https://github.com/m-abs/NativeScript.git","svn_url":"https://github.com/m-abs/NativeScript","homepage":"http://www.nativescript.org","size":33521,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"NativeScript:master","ref":"master","sha":"1f8dca9077095b7125a092d1806ec47c56335e28","user":{"login":"NativeScript","id":7392261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTIyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/7392261?v=4","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"repo":{"id":31492490,"node_id":"MDEwOlJlcG9zaXRvcnkzMTQ5MjQ5MA==","name":"NativeScript","full_name":"NativeScript/NativeScript","private":false,"owner":{"login":"NativeScript","id":7392261,"node_id":"MDEyOk9yZ2FuaXphdGlvbjczOTIyNjE=","avatar_url":"https://avatars1.githubusercontent.com/u/7392261?v=4","gravatar_id":"","url":"https://api.github.com/users/NativeScript","html_url":"https://github.com/NativeScript","followers_url":"https://api.github.com/users/NativeScript/followers","following_url":"https://api.github.com/users/NativeScript/following{/other_user}","gists_url":"https://api.github.com/users/NativeScript/gists{/gist_id}","starred_url":"https://api.github.com/users/NativeScript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NativeScript/subscriptions","organizations_url":"https://api.github.com/users/NativeScript/orgs","repos_url":"https://api.github.com/users/NativeScript/repos","events_url":"https://api.github.com/users/NativeScript/events{/privacy}","received_events_url":"https://api.github.com/users/NativeScript/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/NativeScript/NativeScript","description":"NativeScript is an open source framework for building truly native mobile apps with JavaScript. Use web skills, like Angular and Vue.js, FlexBox and CSS, and get native UI and performance on iOS and Android.","fork":false,"url":"https://api.github.com/repos/NativeScript/NativeScript","forks_url":"https://api.github.com/repos/NativeScript/NativeScript/forks","keys_url":"https://api.github.com/repos/NativeScript/NativeScript/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NativeScript/NativeScript/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NativeScript/NativeScript/teams","hooks_url":"https://api.github.com/repos/NativeScript/NativeScript/hooks","issue_events_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/events{/number}","events_url":"https://api.github.com/repos/NativeScript/NativeScript/events","assignees_url":"https://api.github.com/repos/NativeScript/NativeScript/assignees{/user}","branches_url":"https://api.github.com/repos/NativeScript/NativeScript/branches{/branch}","tags_url":"https://api.github.com/repos/NativeScript/NativeScript/tags","blobs_url":"https://api.github.com/repos/NativeScript/NativeScript/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NativeScript/NativeScript/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NativeScript/NativeScript/git/refs{/sha}","trees_url":"https://api.github.com/repos/NativeScript/NativeScript/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NativeScript/NativeScript/statuses/{sha}","languages_url":"https://api.github.com/repos/NativeScript/NativeScript/languages","stargazers_url":"https://api.github.com/repos/NativeScript/NativeScript/stargazers","contributors_url":"https://api.github.com/repos/NativeScript/NativeScript/contributors","subscribers_url":"https://api.github.com/repos/NativeScript/NativeScript/subscribers","subscription_url":"https://api.github.com/repos/NativeScript/NativeScript/subscription","commits_url":"https://api.github.com/repos/NativeScript/NativeScript/commits{/sha}","git_commits_url":"https://api.github.com/repos/NativeScript/NativeScript/git/commits{/sha}","comments_url":"https://api.github.com/repos/NativeScript/NativeScript/comments{/number}","issue_comment_url":"https://api.github.com/repos/NativeScript/NativeScript/issues/comments{/number}","contents_url":"https://api.github.com/repos/NativeScript/NativeScript/contents/{+path}","compare_url":"https://api.github.com/repos/NativeScript/NativeScript/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NativeScript/NativeScript/merges","archive_url":"https://api.github.com/repos/NativeScript/NativeScript/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NativeScript/NativeScript/downloads","issues_url":"https://api.github.com/repos/NativeScript/NativeScript/issues{/number}","pulls_url":"https://api.github.com/repos/NativeScript/NativeScript/pulls{/number}","milestones_url":"https://api.github.com/repos/NativeScript/NativeScript/milestones{/number}","notifications_url":"https://api.github.com/repos/NativeScript/NativeScript/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NativeScript/NativeScript/labels{/name}","releases_url":"https://api.github.com/repos/NativeScript/NativeScript/releases{/id}","deployments_url":"https://api.github.com/repos/NativeScript/NativeScript/deployments","created_at":"2015-03-01T09:47:08Z","updated_at":"2019-08-13T10:41:28Z","pushed_at":"2019-08-13T11:31:05Z","git_url":"git://github.com/NativeScript/NativeScript.git","ssh_url":"git@github.com:NativeScript/NativeScript.git","clone_url":"https://github.com/NativeScript/NativeScript.git","svn_url":"https://github.com/NativeScript/NativeScript","homepage":"https://www.nativescript.org","size":35074,"stargazers_count":17424,"watchers_count":17424,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1289,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":509,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1289,"open_issues":509,"watchers":17424,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553"},"html":{"href":"https://github.com/NativeScript/NativeScript/pull/7553"},"issue":{"href":"https://api.github.com/repos/NativeScript/NativeScript/issues/7553"},"comments":{"href":"https://api.github.com/repos/NativeScript/NativeScript/issues/7553/comments"},"review_comments":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553/comments"},"review_comment":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NativeScript/NativeScript/pulls/7553/commits"},"statuses":{"href":"https://api.github.com/repos/NativeScript/NativeScript/statuses/428814f36e76f2820012ea25112c12ff7b5fd4ae"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"m-abs"}}