{"action":"created","comment":{"url":"https://api.github.com/repos/angular/material2/pulls/comments/57019035","id":57019035,"diff_hunk":"@@ -0,0 +1,186 @@\n+/**\n+ * A collection of mixins and CSS classes that can be used to apply elevation to a material\n+ * element.\n+ * See: https://www.google.com/design/spec/what-is-material/elevation-shadows.html\n+ * Examples:\n+ *\n+ * ```scss\n+ * .md-foo {\n+ *   @include $md-elevation(2);\n+ *\n+ *   &:active {\n+ *     @include $md-elevation(8);\n+ *   }\n+ * }\n+ * ```\n+ *\n+ * ```html\n+ * <div id=\"external-card\" class=\"md-elevation-z2\"><p>Some content</p></div>","path":"src/core/style/_elevation.scss","position":18,"original_position":18,"commit_id":"99ed7ffe5eb8d5a3a4ee9c6e49b6ac9b7f3deae7","original_commit_id":"99ed7ffe5eb8d5a3a4ee9c6e49b6ac9b7f3deae7","user":{"login":"DevVersion","id":4987015,"avatar_url":"https://avatars.githubusercontent.com/u/4987015?v=3","gravatar_id":"","url":"https://api.github.com/users/DevVersion","html_url":"https://github.com/DevVersion","followers_url":"https://api.github.com/users/DevVersion/followers","following_url":"https://api.github.com/users/DevVersion/following{/other_user}","gists_url":"https://api.github.com/users/DevVersion/gists{/gist_id}","starred_url":"https://api.github.com/users/DevVersion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DevVersion/subscriptions","organizations_url":"https://api.github.com/users/DevVersion/orgs","repos_url":"https://api.github.com/users/DevVersion/repos","events_url":"https://api.github.com/users/DevVersion/events{/privacy}","received_events_url":"https://api.github.com/users/DevVersion/received_events","type":"User","site_admin":false},"body":"Yes, I think you understand my question correctly. Let's take the standalone / bootstrap stylesheet for a moment out of the way.\r\n\r\nI don't think Angular 2 scans the whole stylesheet for duplicate identifiers, that won't be even possible, since some selectors are just overriding a previous defined selector.\r\n\r\nThe point is, for example: we have the button component, which has view encapsulation disabled. ([Source](https://github.com/angular/material2/blob/master/src/components/button/button.ts#L30))\r\n\r\nThen the buttons stylesheet will import the `_elevation.scss` file, this causes the `md-elevation-z*` classes to be generated.\r\n\r\nSo now imagine, if you have more than one component, which includes the elevation and has `ViewEncapsulation` disabled. This will cause several generations of the same classes.\r\n\r\nIn my opinion we should separate between a bootstrap / standalone stylesheet and the styles which are dynamically inserted into the DOM.\r\n\r\nRemoving those class generation would be also possible, since the mixins will only generate the specific elevation (thats awesome!)","created_at":"2016-03-22T16:29:01Z","updated_at":"2016-03-22T16:29:01Z","html_url":"https://github.com/angular/material2/pull/222#discussion_r57019035","pull_request_url":"https://api.github.com/repos/angular/material2/pulls/222","_links":{"self":{"href":"https://api.github.com/repos/angular/material2/pulls/comments/57019035"},"html":{"href":"https://github.com/angular/material2/pull/222#discussion_r57019035"},"pull_request":{"href":"https://api.github.com/repos/angular/material2/pulls/222"}}},"pull_request":{"url":"https://api.github.com/repos/angular/material2/pulls/222","id":63746249,"html_url":"https://github.com/angular/material2/pull/222","diff_url":"https://github.com/angular/material2/pull/222.diff","patch_url":"https://github.com/angular/material2/pull/222.patch","issue_url":"https://api.github.com/repos/angular/material2/issues/222","number":222,"state":"open","locked":false,"title":"feat(elevation): Add elevation core styles","user":{"login":"traviskaufman","id":1185269,"avatar_url":"https://avatars.githubusercontent.com/u/1185269?v=3","gravatar_id":"","url":"https://api.github.com/users/traviskaufman","html_url":"https://github.com/traviskaufman","followers_url":"https://api.github.com/users/traviskaufman/followers","following_url":"https://api.github.com/users/traviskaufman/following{/other_user}","gists_url":"https://api.github.com/users/traviskaufman/gists{/gist_id}","starred_url":"https://api.github.com/users/traviskaufman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traviskaufman/subscriptions","organizations_url":"https://api.github.com/users/traviskaufman/orgs","repos_url":"https://api.github.com/users/traviskaufman/repos","events_url":"https://api.github.com/users/traviskaufman/events{/privacy}","received_events_url":"https://api.github.com/users/traviskaufman/received_events","type":"User","site_admin":false},"body":"This commit replaces `_shadows.scss` within `src/core/styles` with\r\n`_elevation.scss`, according to the proposed design outlined\r\n[here](https://goo.gl/Kq0k9Z). All components that were dependent on the\r\nold shadows have been modified to use elevation. Note however that none\r\nof the values in those old components have been changed; it's simply a\r\nto the new API.\r\n\r\nPart of #48.","created_at":"2016-03-22T16:06:31Z","updated_at":"2016-03-22T16:29:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac9642a9f7c6a7767041c59a176b617bdbf5073d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/material2/pulls/222/commits","review_comments_url":"https://api.github.com/repos/angular/material2/pulls/222/comments","review_comment_url":"https://api.github.com/repos/angular/material2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/material2/issues/222/comments","statuses_url":"https://api.github.com/repos/angular/material2/statuses/99ed7ffe5eb8d5a3a4ee9c6e49b6ac9b7f3deae7","head":{"label":"traviskaufman:feat-md-elevation","ref":"feat-md-elevation","sha":"99ed7ffe5eb8d5a3a4ee9c6e49b6ac9b7f3deae7","user":{"login":"traviskaufman","id":1185269,"avatar_url":"https://avatars.githubusercontent.com/u/1185269?v=3","gravatar_id":"","url":"https://api.github.com/users/traviskaufman","html_url":"https://github.com/traviskaufman","followers_url":"https://api.github.com/users/traviskaufman/followers","following_url":"https://api.github.com/users/traviskaufman/following{/other_user}","gists_url":"https://api.github.com/users/traviskaufman/gists{/gist_id}","starred_url":"https://api.github.com/users/traviskaufman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traviskaufman/subscriptions","organizations_url":"https://api.github.com/users/traviskaufman/orgs","repos_url":"https://api.github.com/users/traviskaufman/repos","events_url":"https://api.github.com/users/traviskaufman/events{/privacy}","received_events_url":"https://api.github.com/users/traviskaufman/received_events","type":"User","site_admin":false},"repo":{"id":51453597,"name":"material2","full_name":"traviskaufman/material2","owner":{"login":"traviskaufman","id":1185269,"avatar_url":"https://avatars.githubusercontent.com/u/1185269?v=3","gravatar_id":"","url":"https://api.github.com/users/traviskaufman","html_url":"https://github.com/traviskaufman","followers_url":"https://api.github.com/users/traviskaufman/followers","following_url":"https://api.github.com/users/traviskaufman/following{/other_user}","gists_url":"https://api.github.com/users/traviskaufman/gists{/gist_id}","starred_url":"https://api.github.com/users/traviskaufman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traviskaufman/subscriptions","organizations_url":"https://api.github.com/users/traviskaufman/orgs","repos_url":"https://api.github.com/users/traviskaufman/repos","events_url":"https://api.github.com/users/traviskaufman/events{/privacy}","received_events_url":"https://api.github.com/users/traviskaufman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/traviskaufman/material2","description":"Material Design components for Angular 2","fork":true,"url":"https://api.github.com/repos/traviskaufman/material2","forks_url":"https://api.github.com/repos/traviskaufman/material2/forks","keys_url":"https://api.github.com/repos/traviskaufman/material2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/traviskaufman/material2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/traviskaufman/material2/teams","hooks_url":"https://api.github.com/repos/traviskaufman/material2/hooks","issue_events_url":"https://api.github.com/repos/traviskaufman/material2/issues/events{/number}","events_url":"https://api.github.com/repos/traviskaufman/material2/events","assignees_url":"https://api.github.com/repos/traviskaufman/material2/assignees{/user}","branches_url":"https://api.github.com/repos/traviskaufman/material2/branches{/branch}","tags_url":"https://api.github.com/repos/traviskaufman/material2/tags","blobs_url":"https://api.github.com/repos/traviskaufman/material2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/traviskaufman/material2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/traviskaufman/material2/git/refs{/sha}","trees_url":"https://api.github.com/repos/traviskaufman/material2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/traviskaufman/material2/statuses/{sha}","languages_url":"https://api.github.com/repos/traviskaufman/material2/languages","stargazers_url":"https://api.github.com/repos/traviskaufman/material2/stargazers","contributors_url":"https://api.github.com/repos/traviskaufman/material2/contributors","subscribers_url":"https://api.github.com/repos/traviskaufman/material2/subscribers","subscription_url":"https://api.github.com/repos/traviskaufman/material2/subscription","commits_url":"https://api.github.com/repos/traviskaufman/material2/commits{/sha}","git_commits_url":"https://api.github.com/repos/traviskaufman/material2/git/commits{/sha}","comments_url":"https://api.github.com/repos/traviskaufman/material2/comments{/number}","issue_comment_url":"https://api.github.com/repos/traviskaufman/material2/issues/comments{/number}","contents_url":"https://api.github.com/repos/traviskaufman/material2/contents/{+path}","compare_url":"https://api.github.com/repos/traviskaufman/material2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/traviskaufman/material2/merges","archive_url":"https://api.github.com/repos/traviskaufman/material2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/traviskaufman/material2/downloads","issues_url":"https://api.github.com/repos/traviskaufman/material2/issues{/number}","pulls_url":"https://api.github.com/repos/traviskaufman/material2/pulls{/number}","milestones_url":"https://api.github.com/repos/traviskaufman/material2/milestones{/number}","notifications_url":"https://api.github.com/repos/traviskaufman/material2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/traviskaufman/material2/labels{/name}","releases_url":"https://api.github.com/repos/traviskaufman/material2/releases{/id}","deployments_url":"https://api.github.com/repos/traviskaufman/material2/deployments","created_at":"2016-02-10T16:24:24Z","updated_at":"2016-02-10T16:24:25Z","pushed_at":"2016-03-22T16:04:34Z","git_url":"git://github.com/traviskaufman/material2.git","ssh_url":"git@github.com:traviskaufman/material2.git","clone_url":"https://github.com/traviskaufman/material2.git","svn_url":"https://github.com/traviskaufman/material2","homepage":"","size":375,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"977759eb446f8f3d268fb537238e762f0389c618","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":49016322,"name":"material2","full_name":"angular/material2","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/material2","description":"Material Design components for Angular 2","fork":false,"url":"https://api.github.com/repos/angular/material2","forks_url":"https://api.github.com/repos/angular/material2/forks","keys_url":"https://api.github.com/repos/angular/material2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/material2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/material2/teams","hooks_url":"https://api.github.com/repos/angular/material2/hooks","issue_events_url":"https://api.github.com/repos/angular/material2/issues/events{/number}","events_url":"https://api.github.com/repos/angular/material2/events","assignees_url":"https://api.github.com/repos/angular/material2/assignees{/user}","branches_url":"https://api.github.com/repos/angular/material2/branches{/branch}","tags_url":"https://api.github.com/repos/angular/material2/tags","blobs_url":"https://api.github.com/repos/angular/material2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/material2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/material2/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/material2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/material2/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/material2/languages","stargazers_url":"https://api.github.com/repos/angular/material2/stargazers","contributors_url":"https://api.github.com/repos/angular/material2/contributors","subscribers_url":"https://api.github.com/repos/angular/material2/subscribers","subscription_url":"https://api.github.com/repos/angular/material2/subscription","commits_url":"https://api.github.com/repos/angular/material2/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/material2/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/material2/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/material2/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/material2/contents/{+path}","compare_url":"https://api.github.com/repos/angular/material2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/material2/merges","archive_url":"https://api.github.com/repos/angular/material2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/material2/downloads","issues_url":"https://api.github.com/repos/angular/material2/issues{/number}","pulls_url":"https://api.github.com/repos/angular/material2/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/material2/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/material2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/material2/labels{/name}","releases_url":"https://api.github.com/repos/angular/material2/releases{/id}","deployments_url":"https://api.github.com/repos/angular/material2/deployments","created_at":"2016-01-04T18:50:02Z","updated_at":"2016-03-22T16:07:17Z","pushed_at":"2016-03-22T16:06:31Z","git_url":"git://github.com/angular/material2.git","ssh_url":"git@github.com:angular/material2.git","clone_url":"https://github.com/angular/material2.git","svn_url":"https://github.com/angular/material2","homepage":"","size":494,"stargazers_count":1172,"watchers_count":1172,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":133,"mirror_url":null,"open_issues_count":53,"forks":133,"open_issues":53,"watchers":1172,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/material2/pulls/222"},"html":{"href":"https://github.com/angular/material2/pull/222"},"issue":{"href":"https://api.github.com/repos/angular/material2/issues/222"},"comments":{"href":"https://api.github.com/repos/angular/material2/issues/222/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/material2/pulls/222/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/material2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/material2/pulls/222/commits"},"statuses":{"href":"https://api.github.com/repos/angular/material2/statuses/99ed7ffe5eb8d5a3a4ee9c6e49b6ac9b7f3deae7"}}}}