{"action":"created","comment":{"url":"https://api.github.com/repos/Polymer/docs/pulls/comments/53403979","id":53403979,"diff_hunk":"@@ -8,11 +8,27 @@ subtitle: Developer guide\n \n {% include toc.html %}\n \n-\n Polymer uses [Shadow DOM styling\n rules](http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/) for\n-providing scoped styling of the element's local DOM.  Scoped styles should be\n-provided via `<style>` tags placed inside the element's local DOM `<template>`.\n+providing scoped styling of the element's local DOM. This allows elements to\n+create style rules that will only apply to the element's light DOM or local\n+DOM, as well as advanced theming with CSS custom properties and CSS mixins.\n+\n+Scoped styles should be provided via `<style>` tags placed inside the element's\n+local DOM `<template>`.\n+\n+To place styles outside of the element, or share styles between elements, you\n+can create a [style module](#style-modules).\n+\n+**NOTE: I think a nice introduction, without code, works a lot better. I also added a brief explanation.**\n+\n+# Styling the local DOM","path":"1.0/docs/devguide/styling.md","position":21,"original_position":21,"commit_id":"12e30d00d4ed2edba39ac7d1b5c046b21828d5e4","original_commit_id":"12e30d00d4ed2edba39ac7d1b5c046b21828d5e4","user":{"login":"arthurevans","id":1149422,"avatar_url":"https://avatars.githubusercontent.com/u/1149422?v=3","gravatar_id":"","url":"https://api.github.com/users/arthurevans","html_url":"https://github.com/arthurevans","followers_url":"https://api.github.com/users/arthurevans/followers","following_url":"https://api.github.com/users/arthurevans/following{/other_user}","gists_url":"https://api.github.com/users/arthurevans/gists{/gist_id}","starred_url":"https://api.github.com/users/arthurevans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arthurevans/subscriptions","organizations_url":"https://api.github.com/users/arthurevans/orgs","repos_url":"https://api.github.com/users/arthurevans/repos","events_url":"https://api.github.com/users/arthurevans/events{/privacy}","received_events_url":"https://api.github.com/users/arthurevans/received_events","type":"User","site_admin":false},"body":"This should be an H2 (`##`).","created_at":"2016-02-19T00:03:58Z","updated_at":"2016-02-19T00:03:58Z","html_url":"https://github.com/Polymer/docs/pull/1537#discussion_r53403979","pull_request_url":"https://api.github.com/repos/Polymer/docs/pulls/1537","_links":{"self":{"href":"https://api.github.com/repos/Polymer/docs/pulls/comments/53403979"},"html":{"href":"https://github.com/Polymer/docs/pull/1537#discussion_r53403979"},"pull_request":{"href":"https://api.github.com/repos/Polymer/docs/pulls/1537"}}},"pull_request":{"url":"https://api.github.com/repos/Polymer/docs/pulls/1537","id":59319060,"html_url":"https://github.com/Polymer/docs/pull/1537","diff_url":"https://github.com/Polymer/docs/pull/1537.diff","patch_url":"https://github.com/Polymer/docs/pull/1537.patch","issue_url":"https://api.github.com/repos/Polymer/docs/issues/1537","number":1537,"state":"open","locked":false,"title":"Styling guide worked on extensively -- first draft","user":{"login":"mercmobily","id":2128734,"avatar_url":"https://avatars.githubusercontent.com/u/2128734?v=3","gravatar_id":"","url":"https://api.github.com/users/mercmobily","html_url":"https://github.com/mercmobily","followers_url":"https://api.github.com/users/mercmobily/followers","following_url":"https://api.github.com/users/mercmobily/following{/other_user}","gists_url":"https://api.github.com/users/mercmobily/gists{/gist_id}","starred_url":"https://api.github.com/users/mercmobily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mercmobily/subscriptions","organizations_url":"https://api.github.com/users/mercmobily/orgs","repos_url":"https://api.github.com/users/mercmobily/repos","events_url":"https://api.github.com/users/mercmobily/events{/privacy}","received_events_url":"https://api.github.com/users/mercmobily/received_events","type":"User","site_admin":false},"body":"Following up from #1533 , I decided that asking questions and asking you guys to \"rewrite a section\" was less than ideal .So,I sat down over the week end (well, actually, into Monday morning) and worked on an extensive rewrite.\r\n\r\nAfter wasting some of your time, hopefully you will find here something valuable to use or take apart.\r\n\r\nIn general:\r\n\r\n * I made the examples more uniform and more comprehensive, always using `<my-element>` and `<my-toolbar>`\r\n\r\n* I restructured it a little, so that there is always a \"normal\" explanation and then a section on the shim's limitations.\r\n\r\n* Whenever possible, I tried my best to explain things (like the dynamism and inheritance limitations) using code that matched what the reader had read previously in the chapter\r\n\r\n* I explained inheritance limitations providing -- again -- an example similar to the previous ones, but adding a <span> to the mix AND (not sure here if it made sense) trying to explain, \"give or take\", what happens behind the scenes and emphasising that Polymer elements are treated differently.\r\n\r\nAs usual: no hard feelings if you scrap it all. It was a good exercise for me anyway.","created_at":"2016-02-15T04:02:32Z","updated_at":"2016-02-19T00:03:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfd5d36fe736532b3145c29b65d2a646b2c67344","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Polymer/docs/pulls/1537/commits","review_comments_url":"https://api.github.com/repos/Polymer/docs/pulls/1537/comments","review_comment_url":"https://api.github.com/repos/Polymer/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Polymer/docs/issues/1537/comments","statuses_url":"https://api.github.com/repos/Polymer/docs/statuses/12e30d00d4ed2edba39ac7d1b5c046b21828d5e4","head":{"label":"mercmobily:betterstyling","ref":"betterstyling","sha":"12e30d00d4ed2edba39ac7d1b5c046b21828d5e4","user":{"login":"mercmobily","id":2128734,"avatar_url":"https://avatars.githubusercontent.com/u/2128734?v=3","gravatar_id":"","url":"https://api.github.com/users/mercmobily","html_url":"https://github.com/mercmobily","followers_url":"https://api.github.com/users/mercmobily/followers","following_url":"https://api.github.com/users/mercmobily/following{/other_user}","gists_url":"https://api.github.com/users/mercmobily/gists{/gist_id}","starred_url":"https://api.github.com/users/mercmobily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mercmobily/subscriptions","organizations_url":"https://api.github.com/users/mercmobily/orgs","repos_url":"https://api.github.com/users/mercmobily/repos","events_url":"https://api.github.com/users/mercmobily/events{/privacy}","received_events_url":"https://api.github.com/users/mercmobily/received_events","type":"User","site_admin":false},"repo":{"id":46647884,"name":"docs","full_name":"mercmobily/docs","owner":{"login":"mercmobily","id":2128734,"avatar_url":"https://avatars.githubusercontent.com/u/2128734?v=3","gravatar_id":"","url":"https://api.github.com/users/mercmobily","html_url":"https://github.com/mercmobily","followers_url":"https://api.github.com/users/mercmobily/followers","following_url":"https://api.github.com/users/mercmobily/following{/other_user}","gists_url":"https://api.github.com/users/mercmobily/gists{/gist_id}","starred_url":"https://api.github.com/users/mercmobily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mercmobily/subscriptions","organizations_url":"https://api.github.com/users/mercmobily/orgs","repos_url":"https://api.github.com/users/mercmobily/repos","events_url":"https://api.github.com/users/mercmobily/events{/privacy}","received_events_url":"https://api.github.com/users/mercmobily/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mercmobily/docs","description":"Documentation for Polymer","fork":true,"url":"https://api.github.com/repos/mercmobily/docs","forks_url":"https://api.github.com/repos/mercmobily/docs/forks","keys_url":"https://api.github.com/repos/mercmobily/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mercmobily/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mercmobily/docs/teams","hooks_url":"https://api.github.com/repos/mercmobily/docs/hooks","issue_events_url":"https://api.github.com/repos/mercmobily/docs/issues/events{/number}","events_url":"https://api.github.com/repos/mercmobily/docs/events","assignees_url":"https://api.github.com/repos/mercmobily/docs/assignees{/user}","branches_url":"https://api.github.com/repos/mercmobily/docs/branches{/branch}","tags_url":"https://api.github.com/repos/mercmobily/docs/tags","blobs_url":"https://api.github.com/repos/mercmobily/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mercmobily/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mercmobily/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/mercmobily/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mercmobily/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/mercmobily/docs/languages","stargazers_url":"https://api.github.com/repos/mercmobily/docs/stargazers","contributors_url":"https://api.github.com/repos/mercmobily/docs/contributors","subscribers_url":"https://api.github.com/repos/mercmobily/docs/subscribers","subscription_url":"https://api.github.com/repos/mercmobily/docs/subscription","commits_url":"https://api.github.com/repos/mercmobily/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/mercmobily/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/mercmobily/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/mercmobily/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/mercmobily/docs/contents/{+path}","compare_url":"https://api.github.com/repos/mercmobily/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mercmobily/docs/merges","archive_url":"https://api.github.com/repos/mercmobily/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mercmobily/docs/downloads","issues_url":"https://api.github.com/repos/mercmobily/docs/issues{/number}","pulls_url":"https://api.github.com/repos/mercmobily/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/mercmobily/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/mercmobily/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mercmobily/docs/labels{/name}","releases_url":"https://api.github.com/repos/mercmobily/docs/releases{/id}","deployments_url":"https://api.github.com/repos/mercmobily/docs/deployments","created_at":"2015-11-22T05:31:10Z","updated_at":"2016-02-15T03:50:57Z","pushed_at":"2016-02-15T03:53:36Z","git_url":"git://github.com/mercmobily/docs.git","ssh_url":"git@github.com:mercmobily/docs.git","clone_url":"https://github.com/mercmobily/docs.git","svn_url":"https://github.com/mercmobily/docs","homepage":"https://www.polymer-project.org","size":81960,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"Polymer:master","ref":"master","sha":"7405bfe3c15f6e11d2674ad897e5c49ed663c8fa","user":{"login":"Polymer","id":2159051,"avatar_url":"https://avatars.githubusercontent.com/u/2159051?v=3","gravatar_id":"","url":"https://api.github.com/users/Polymer","html_url":"https://github.com/Polymer","followers_url":"https://api.github.com/users/Polymer/followers","following_url":"https://api.github.com/users/Polymer/following{/other_user}","gists_url":"https://api.github.com/users/Polymer/gists{/gist_id}","starred_url":"https://api.github.com/users/Polymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Polymer/subscriptions","organizations_url":"https://api.github.com/users/Polymer/orgs","repos_url":"https://api.github.com/users/Polymer/repos","events_url":"https://api.github.com/users/Polymer/events{/privacy}","received_events_url":"https://api.github.com/users/Polymer/received_events","type":"Organization","site_admin":false},"repo":{"id":7804910,"name":"docs","full_name":"Polymer/docs","owner":{"login":"Polymer","id":2159051,"avatar_url":"https://avatars.githubusercontent.com/u/2159051?v=3","gravatar_id":"","url":"https://api.github.com/users/Polymer","html_url":"https://github.com/Polymer","followers_url":"https://api.github.com/users/Polymer/followers","following_url":"https://api.github.com/users/Polymer/following{/other_user}","gists_url":"https://api.github.com/users/Polymer/gists{/gist_id}","starred_url":"https://api.github.com/users/Polymer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Polymer/subscriptions","organizations_url":"https://api.github.com/users/Polymer/orgs","repos_url":"https://api.github.com/users/Polymer/repos","events_url":"https://api.github.com/users/Polymer/events{/privacy}","received_events_url":"https://api.github.com/users/Polymer/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Polymer/docs","description":"Documentation for Polymer","fork":false,"url":"https://api.github.com/repos/Polymer/docs","forks_url":"https://api.github.com/repos/Polymer/docs/forks","keys_url":"https://api.github.com/repos/Polymer/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Polymer/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Polymer/docs/teams","hooks_url":"https://api.github.com/repos/Polymer/docs/hooks","issue_events_url":"https://api.github.com/repos/Polymer/docs/issues/events{/number}","events_url":"https://api.github.com/repos/Polymer/docs/events","assignees_url":"https://api.github.com/repos/Polymer/docs/assignees{/user}","branches_url":"https://api.github.com/repos/Polymer/docs/branches{/branch}","tags_url":"https://api.github.com/repos/Polymer/docs/tags","blobs_url":"https://api.github.com/repos/Polymer/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Polymer/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Polymer/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/Polymer/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Polymer/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/Polymer/docs/languages","stargazers_url":"https://api.github.com/repos/Polymer/docs/stargazers","contributors_url":"https://api.github.com/repos/Polymer/docs/contributors","subscribers_url":"https://api.github.com/repos/Polymer/docs/subscribers","subscription_url":"https://api.github.com/repos/Polymer/docs/subscription","commits_url":"https://api.github.com/repos/Polymer/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/Polymer/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/Polymer/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/Polymer/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/Polymer/docs/contents/{+path}","compare_url":"https://api.github.com/repos/Polymer/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Polymer/docs/merges","archive_url":"https://api.github.com/repos/Polymer/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Polymer/docs/downloads","issues_url":"https://api.github.com/repos/Polymer/docs/issues{/number}","pulls_url":"https://api.github.com/repos/Polymer/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/Polymer/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/Polymer/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Polymer/docs/labels{/name}","releases_url":"https://api.github.com/repos/Polymer/docs/releases{/id}","deployments_url":"https://api.github.com/repos/Polymer/docs/deployments","created_at":"2013-01-24T19:11:00Z","updated_at":"2016-02-16T18:19:16Z","pushed_at":"2016-02-18T23:43:53Z","git_url":"git://github.com/Polymer/docs.git","ssh_url":"git@github.com:Polymer/docs.git","clone_url":"https://github.com/Polymer/docs.git","svn_url":"https://github.com/Polymer/docs","homepage":"https://www.polymer-project.org","size":85860,"stargazers_count":916,"watchers_count":916,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2454,"mirror_url":null,"open_issues_count":137,"forks":2454,"open_issues":137,"watchers":916,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Polymer/docs/pulls/1537"},"html":{"href":"https://github.com/Polymer/docs/pull/1537"},"issue":{"href":"https://api.github.com/repos/Polymer/docs/issues/1537"},"comments":{"href":"https://api.github.com/repos/Polymer/docs/issues/1537/comments"},"review_comments":{"href":"https://api.github.com/repos/Polymer/docs/pulls/1537/comments"},"review_comment":{"href":"https://api.github.com/repos/Polymer/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Polymer/docs/pulls/1537/commits"},"statuses":{"href":"https://api.github.com/repos/Polymer/docs/statuses/12e30d00d4ed2edba39ac7d1b5c046b21828d5e4"}}}}