{"action":"created","comment":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/comments/37610691","id":37610691,"diff_hunk":"@@ -0,0 +1,146 @@\n+#####################\n+Comprehensive Theming\n+#####################\n+\n+\n+Comprehensive Theming lets you customize the appearance of your Open edX\n+installation.  You can override Sass and CSS settings, images, or entire HTML\n+templates.\n+\n+Eventually, Comprehensive Theming will obsolete existing theming mechanisms,\n+but for now they co-exist peacefully. This document describes how to use \n+Comprehensive Theming, and also the changes you'll need to make to keep other\n+theming mechanisms working.\n+\n+\n+Creating a theme\n+================\n+\n+A theme is a directory of assets.  You can create this directory wherever you\n+like, it does not have to be inside the edx-platform directory.  The structure\n+within this directory mirrors the assets in the edx-platform repo itself.\n+Files you provide in your theme are used in place of the same-named files in\n+edx-platform.  Here's a sample::\n+\n+    my-theme\n+    └── lms\n+        ├── static\n+        │   ├── images\n+        │   │   └── logo.png\n+        │   └── sass\n+        │       ├── _overrides.scss\n+        │       ├── lms-main-rtl.scss\n+        │       └── lms-main.scss\n+        └── templates\n+            ├── footer.html\n+            └── header.html\n+\n+The top directory is named whatever you like.  This example uses \"my-theme\".\n+The files provided here override the files in edx-platform.  In this case, the\n+``my-theme/lms/static/sass/lms-main.scss`` file is used in place of the\n+``edx-platform/lms/static/lms-main.scss`` file.\n+\n+\n+Images\n+------\n+\n+Images can be substituted simply by placing the new image at the right place\n+in the theme directory.  In our example above, the lms/static/images/logo.png\n+image is overridden.\n+\n+\n+Sass/CSS\n+--------\n+\n+Most CSS styling in Open edX is done with Sass files compiled to CSS.  You can\n+override individual settings by creating a new Sass file that uses the existing\n+file, and overrides the few settings you want.\n+\n+For example, to change the fonts used throughout the site, you can create an\n+``lms/static/sass/_overrides.scss`` file with the change you want::\n+\n+    $sans-serif: 'Helvetica';\n+\n+The variables that can currently be overridden are defined in\n+``lms/static/sass/base/_variables.scss``.\n+\n+**Note:** We are currently in the middle of a re-engineering of the Sass\n+variables.  They will change in the future.  If you are interested, you can see\n+the new development in the `edX Pattern Library`__.\n+\n+.. __: http://ux.edx.org/\n+\n+Then create ``lms/static/sass/lms-main.scss`` to use those overrides, and also\n+the rest of the definitions from the original file::\n+\n+    // Our overrides for settings we want to change.\n+    @import 'overrides';\n+\n+    // Import the original styles from edx-platform.\n+    @import 'lms/static/sass/lms-main';\n+\n+Do this for each .scss file your site needs.","path":"themes/README.rst","position":82,"original_position":82,"commit_id":"690556e684e81d56361011aba980c79dd0328ab0","original_commit_id":"690556e684e81d56361011aba980c79dd0328ab0","user":{"login":"mtyaka","id":32585,"avatar_url":"https://avatars.githubusercontent.com/u/32585?v=3","gravatar_id":"","url":"https://api.github.com/users/mtyaka","html_url":"https://github.com/mtyaka","followers_url":"https://api.github.com/users/mtyaka/followers","following_url":"https://api.github.com/users/mtyaka/following{/other_user}","gists_url":"https://api.github.com/users/mtyaka/gists{/gist_id}","starred_url":"https://api.github.com/users/mtyaka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtyaka/subscriptions","organizations_url":"https://api.github.com/users/mtyaka/orgs","repos_url":"https://api.github.com/users/mtyaka/repos","events_url":"https://api.github.com/users/mtyaka/events{/privacy}","received_events_url":"https://api.github.com/users/mtyaka/received_events","type":"User","site_admin":false},"body":"When I only want to override some variables from `variables.scss`, it would be great if I didn't have to add this boilerplate for each scss file. Currently the theme sass folder is added to the end of the sass load-path. Would it be possible to add it to the beginning of the load path instead? That would make it possible to override any scss file or partial by placing a file with the same name in the theme directory. That would make it similar to how template overrides work.\r\n\r\nThere could be a blank `lms/static/sass/_overrides.scss ` file that `_variables.scss` would `@import`. With the theme sass dir at the beginning of the load path, I could simply place an `_overrides.scss` file in my theme sass dir and the overrides would be automatically picked up by all templates that import `_variables.scss`. ","created_at":"2015-08-21T07:03:26Z","updated_at":"2015-08-21T07:03:26Z","html_url":"https://github.com/edx/edx-platform/pull/8271#discussion_r37610691","pull_request_url":"https://api.github.com/repos/edx/edx-platform/pulls/8271","_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments/37610691"},"html":{"href":"https://github.com/edx/edx-platform/pull/8271#discussion_r37610691"},"pull_request":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8271"}}},"pull_request":{"url":"https://api.github.com/repos/edx/edx-platform/pulls/8271","id":36515114,"html_url":"https://github.com/edx/edx-platform/pull/8271","diff_url":"https://github.com/edx/edx-platform/pull/8271.diff","patch_url":"https://github.com/edx/edx-platform/pull/8271.patch","issue_url":"https://api.github.com/repos/edx/edx-platform/issues/8271","number":8271,"state":"open","locked":false,"title":"Comprehensive Theming","user":{"login":"nedbat","id":23789,"avatar_url":"https://avatars.githubusercontent.com/u/23789?v=3","gravatar_id":"","url":"https://api.github.com/users/nedbat","html_url":"https://github.com/nedbat","followers_url":"https://api.github.com/users/nedbat/followers","following_url":"https://api.github.com/users/nedbat/following{/other_user}","gists_url":"https://api.github.com/users/nedbat/gists{/gist_id}","starred_url":"https://api.github.com/users/nedbat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nedbat/subscriptions","organizations_url":"https://api.github.com/users/nedbat/orgs","repos_url":"https://api.github.com/users/nedbat/repos","events_url":"https://api.github.com/users/nedbat/events{/privacy}","received_events_url":"https://api.github.com/users/nedbat/received_events","type":"User","site_admin":false},"body":"Acceptance criteria:\r\n- [ ] choose what sass variables will get !default\r\n- [x] all existing tests must pass\r\n- [x] docs: describe how to change your old-style theme to still work. [NB]\r\n- [x] docs: describe how to make a new-style theme. [DB]\r\n- [x] name this theming system (maybe). \"Comprehensive theming\", with \"comp_theme\" for settings.\r\n- [x] decide on the settings naming (see https://github.com/edx/configuration/pull/2075).\r\n- [x] decide whether to ship a non-edX theme. (We are shipping at least one theme to support testing)\r\n- [x] decide whether COMP_THEME_DIR needs to be set. (COMP_THEME_DIR must be set, but can be None, as common sets it.)\r\n- [x] testing: overriding templates works.\r\n- [x] test a complex microsite.\r\n- [x] test a stanford theme.\r\n- [x] fix it so microsites still work without renaming footer.html to default-footer.html [DB]\r\n- [x] i18n collection working\r\n- [x] choose reviewers (cdodge, ux, tusbar, stanford person?)","created_at":"2015-05-29T15:14:02Z","updated_at":"2015-08-21T07:03:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2e11b0b9fecae49962e510df5b574de21bbc8aca","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/edx/edx-platform/pulls/8271/commits","review_comments_url":"https://api.github.com/repos/edx/edx-platform/pulls/8271/comments","review_comment_url":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/edx/edx-platform/issues/8271/comments","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/690556e684e81d56361011aba980c79dd0328ab0","head":{"label":"edx:sass-theming","ref":"sass-theming","sha":"690556e684e81d56361011aba980c79dd0328ab0","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-08-20T21:51:37Z","pushed_at":"2015-08-21T06:56:24Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":2093043,"stargazers_count":2086,"watchers_count":2086,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1228,"mirror_url":null,"open_issues_count":141,"forks":1228,"open_issues":141,"watchers":2086,"default_branch":"master"}},"base":{"label":"edx:master","ref":"master","sha":"716c1f74cf91c54425f76d6190c980d1a3261fce","user":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"repo":{"id":10391073,"name":"edx-platform","full_name":"edx/edx-platform","owner":{"login":"edx","id":3179841,"avatar_url":"https://avatars.githubusercontent.com/u/3179841?v=3","gravatar_id":"","url":"https://api.github.com/users/edx","html_url":"https://github.com/edx","followers_url":"https://api.github.com/users/edx/followers","following_url":"https://api.github.com/users/edx/following{/other_user}","gists_url":"https://api.github.com/users/edx/gists{/gist_id}","starred_url":"https://api.github.com/users/edx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edx/subscriptions","organizations_url":"https://api.github.com/users/edx/orgs","repos_url":"https://api.github.com/users/edx/repos","events_url":"https://api.github.com/users/edx/events{/privacy}","received_events_url":"https://api.github.com/users/edx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/edx/edx-platform","description":"The Open edX platform, the software that powers edX!","fork":false,"url":"https://api.github.com/repos/edx/edx-platform","forks_url":"https://api.github.com/repos/edx/edx-platform/forks","keys_url":"https://api.github.com/repos/edx/edx-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/edx/edx-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/edx/edx-platform/teams","hooks_url":"https://api.github.com/repos/edx/edx-platform/hooks","issue_events_url":"https://api.github.com/repos/edx/edx-platform/issues/events{/number}","events_url":"https://api.github.com/repos/edx/edx-platform/events","assignees_url":"https://api.github.com/repos/edx/edx-platform/assignees{/user}","branches_url":"https://api.github.com/repos/edx/edx-platform/branches{/branch}","tags_url":"https://api.github.com/repos/edx/edx-platform/tags","blobs_url":"https://api.github.com/repos/edx/edx-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/edx/edx-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/edx/edx-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/edx/edx-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/edx/edx-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/edx/edx-platform/languages","stargazers_url":"https://api.github.com/repos/edx/edx-platform/stargazers","contributors_url":"https://api.github.com/repos/edx/edx-platform/contributors","subscribers_url":"https://api.github.com/repos/edx/edx-platform/subscribers","subscription_url":"https://api.github.com/repos/edx/edx-platform/subscription","commits_url":"https://api.github.com/repos/edx/edx-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/edx/edx-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/edx/edx-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/edx/edx-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/edx/edx-platform/contents/{+path}","compare_url":"https://api.github.com/repos/edx/edx-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/edx/edx-platform/merges","archive_url":"https://api.github.com/repos/edx/edx-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/edx/edx-platform/downloads","issues_url":"https://api.github.com/repos/edx/edx-platform/issues{/number}","pulls_url":"https://api.github.com/repos/edx/edx-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/edx/edx-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/edx/edx-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/edx/edx-platform/labels{/name}","releases_url":"https://api.github.com/repos/edx/edx-platform/releases{/id}","created_at":"2013-05-30T20:20:38Z","updated_at":"2015-08-20T21:51:37Z","pushed_at":"2015-08-21T06:56:24Z","git_url":"git://github.com/edx/edx-platform.git","ssh_url":"git@github.com:edx/edx-platform.git","clone_url":"https://github.com/edx/edx-platform.git","svn_url":"https://github.com/edx/edx-platform","homepage":"http://open.edx.org/","size":2093043,"stargazers_count":2086,"watchers_count":2086,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1228,"mirror_url":null,"open_issues_count":141,"forks":1228,"open_issues":141,"watchers":2086,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8271"},"html":{"href":"https://github.com/edx/edx-platform/pull/8271"},"issue":{"href":"https://api.github.com/repos/edx/edx-platform/issues/8271"},"comments":{"href":"https://api.github.com/repos/edx/edx-platform/issues/8271/comments"},"review_comments":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8271/comments"},"review_comment":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/edx/edx-platform/pulls/8271/commits"},"statuses":{"href":"https://api.github.com/repos/edx/edx-platform/statuses/690556e684e81d56361011aba980c79dd0328ab0"}}}}