{"action":"created","issue":{"url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1145","repository_url":"https://api.github.com/repos/surveyjs/surveyjs","labels_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1145/labels{/name}","comments_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1145/comments","events_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1145/events","html_url":"https://github.com/surveyjs/surveyjs/issues/1145","id":329354113,"node_id":"MDU6SXNzdWUzMjkzNTQxMTM=","number":1145,"title":"Bug custom classes for rating","user":{"login":"vnanhtuan","id":10513517,"node_id":"MDQ6VXNlcjEwNTEzNTE3","avatar_url":"https://avatars1.githubusercontent.com/u/10513517?v=4","gravatar_id":"","url":"https://api.github.com/users/vnanhtuan","html_url":"https://github.com/vnanhtuan","followers_url":"https://api.github.com/users/vnanhtuan/followers","following_url":"https://api.github.com/users/vnanhtuan/following{/other_user}","gists_url":"https://api.github.com/users/vnanhtuan/gists{/gist_id}","starred_url":"https://api.github.com/users/vnanhtuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vnanhtuan/subscriptions","organizations_url":"https://api.github.com/users/vnanhtuan/orgs","repos_url":"https://api.github.com/users/vnanhtuan/repos","events_url":"https://api.github.com/users/vnanhtuan/events{/privacy}","received_events_url":"https://api.github.com/users/vnanhtuan/received_events","type":"User","site_admin":false},"labels":[{"id":247746348,"node_id":"MDU6TGFiZWwyNDc3NDYzNDg=","url":"https://api.github.com/repos/surveyjs/surveyjs/labels/question","name":"question","color":"19aa73","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-05T08:36:18Z","updated_at":"2018-06-05T14:54:58Z","closed_at":null,"author_association":"NONE","body":"### Are you requesting a feature, reporting a bug or ask a question?\r\n\r\nReporting a bug\r\n\r\n### What is the current behavior?\r\n\r\nWhen I use survey custom CSS function in rating, I want to add my cssclass in to HTML.\r\nI followed this link: [https://surveyjs.io/Examples/Library/?id=survey-cssclasses&platform=Angular2&theme=default].\r\nBut I can add cssclass to label. Please see file attached below\r\n\r\n### What is the expected behavior?\r\nI want my cssclass to HTML\r\n\r\n\r\n### How would you reproduce the current behavior (if this is a bug)?\r\n\r\n\r\n\r\n#### Provide the test code and the tested page URL (if applicable)\r\n\r\nTested page URL:\r\n\r\nTest code\r\n\r\n```\r\nyour_code_here\r\nsurvey.onUpdateQuestionCssClasses.add(function (survey, options) {\r\n            const classes = options.cssClasses;\r\n            const question = options.question;\r\n            console.log('options', options);\r\n            console.log('classes', classes);\r\n\r\n            classes.root = 'sv_q_rating test-root';\r\n            classes.item = 'sv_q_rating_item test-item';\r\n            classes.itemText = 'sv_q_rating_item_text test-itemtext';\r\n            classes.label = 'sv_q_rating_item test-label';\r\n        });\r\n![capture](https://user-images.githubusercontent.com/10513517/40964766-22a79d7e-68d6-11e8-8176-de821ee1f277.PNG)\r\n\r\n```\r\n\r\n### Specify your\r\n\r\n* browser:\r\n* browser version:\r\n* surveyjs platform (angular or react or jquery or knockout or vue):\r\n* surveyjs version:\r\n"},"comment":{"url":"https://api.github.com/repos/surveyjs/surveyjs/issues/comments/394740652","html_url":"https://github.com/surveyjs/surveyjs/issues/1145#issuecomment-394740652","issue_url":"https://api.github.com/repos/surveyjs/surveyjs/issues/1145","id":394740652,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDc0MDY1Mg==","user":{"login":"tsv2013","id":3013415,"node_id":"MDQ6VXNlcjMwMTM0MTU=","avatar_url":"https://avatars0.githubusercontent.com/u/3013415?v=4","gravatar_id":"","url":"https://api.github.com/users/tsv2013","html_url":"https://github.com/tsv2013","followers_url":"https://api.github.com/users/tsv2013/followers","following_url":"https://api.github.com/users/tsv2013/following{/other_user}","gists_url":"https://api.github.com/users/tsv2013/gists{/gist_id}","starred_url":"https://api.github.com/users/tsv2013/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsv2013/subscriptions","organizations_url":"https://api.github.com/users/tsv2013/orgs","repos_url":"https://api.github.com/users/tsv2013/repos","events_url":"https://api.github.com/users/tsv2013/events{/privacy}","received_events_url":"https://api.github.com/users/tsv2013/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T14:54:58Z","updated_at":"2018-06-05T14:54:58Z","author_association":"MEMBER","body":"I've prepared a sample for you - https://plnkr.co/edit/rQsGxa2yt0zEHZE2EE0f?p=preview\r\nThe sample customizes rating item CSS class and declares CSS rule to change rating item text color to magenta.\r\n\r\nI should note, that in case of you customize classes you overrides all default classes. I recommend you to check what default classes are being used in SurveyJS library (via browser debug console or checking these files - https://github.com/surveyjs/surveyjs/blob/master/src/defaultCss/cssstandard.ts or https://github.com/surveyjs/surveyjs/blob/master/src/defaultCss/cssbootstrap.ts)\r\n\r\nYou can also check default styles in order not to breal default rating question appearance."}}
{"actor":{"display_login":"tsv2013"}}