{"action":"created","issue":{"url":"https://api.github.com/repos/SC5/sc5-styleguide/issues/561","labels_url":"https://api.github.com/repos/SC5/sc5-styleguide/issues/561/labels{/name}","comments_url":"https://api.github.com/repos/SC5/sc5-styleguide/issues/561/comments","events_url":"https://api.github.com/repos/SC5/sc5-styleguide/issues/561/events","html_url":"https://github.com/SC5/sc5-styleguide/issues/561","id":67182689,"number":561,"title":"Gonzales LESS parser failing on basic CSS (0.3.9)","user":{"login":"cognivator","id":4024050,"avatar_url":"https://avatars.githubusercontent.com/u/4024050?v=3","gravatar_id":"","url":"https://api.github.com/users/cognivator","html_url":"https://github.com/cognivator","followers_url":"https://api.github.com/users/cognivator/followers","following_url":"https://api.github.com/users/cognivator/following{/other_user}","gists_url":"https://api.github.com/users/cognivator/gists{/gist_id}","starred_url":"https://api.github.com/users/cognivator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cognivator/subscriptions","organizations_url":"https://api.github.com/users/cognivator/orgs","repos_url":"https://api.github.com/users/cognivator/repos","events_url":"https://api.github.com/users/cognivator/events{/privacy}","received_events_url":"https://api.github.com/users/cognivator/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-08T17:49:03Z","updated_at":"2015-04-09T07:12:15Z","closed_at":null,"body":"The following source causes a Gonzales PE error,\r\n\r\n_NOTE: Greatly simplified source trying to isolate the cause of the parse error_\r\n```\r\n// Colors\r\n// \r\n// Our colors\r\n//\r\n// Styleguide 1.0\r\n.color {\r\n    color: #ffffff;\r\n}\r\n.background {\r\n    background: #000000;\r\n}\r\n```\r\n\r\n_... and the resulting Gonzales error,_\r\n```\r\nCould not parse used variables from section 1:\r\nParsing error: Please check the validity of the block starting from line #1\r\n\r\n1*| }\r\n\r\nGonzales PE version: 3.0.0-16\r\nSyntax: less\r\nExpress server listening on port 3001\r\nSocket connection established (id: 78X9f3bf3uxJI7eaAAAA)\r\n```\r\n\r\nModifying the source slightly by separating the two CSS selector blocks with a newline results in the following error,\r\n```\r\nCould not parse used variables from section 1:\r\nParsing error: Please check the validity of the block starting from line #3\r\n\r\n1 |     background: #000000;\r\n2 | }\r\n\r\nGonzales PE version: 3.0.0-16\r\nSyntax: less\r\nExpress server listening on port 3001\r\nSocket connection established (id: qLN5hPhdTX_ulJT8AAAA)\r\n```\r\n\r\nFWIW, the command line,\r\n```\r\nstyleguide --kss-source \"src/common/themes/theme-colors-base.less --style-source \"src/common/themes/theme-colors-base.css --output \"styleguide\" --title \"Styleguide Test\" --server --port 3001\r\n```\r\n(_where style-source is the css generated from kss-source_)\r\n\r\nNeither error is evident in v0.3.8.\r\nIt seems we have some continuing issues with Gonzales-PE...?"},"comment":{"url":"https://api.github.com/repos/SC5/sc5-styleguide/issues/comments/91133010","html_url":"https://github.com/SC5/sc5-styleguide/issues/561#issuecomment-91133010","issue_url":"https://api.github.com/repos/SC5/sc5-styleguide/issues/561","id":91133010,"user":{"login":"hannu","id":19070,"avatar_url":"https://avatars.githubusercontent.com/u/19070?v=3","gravatar_id":"","url":"https://api.github.com/users/hannu","html_url":"https://github.com/hannu","followers_url":"https://api.github.com/users/hannu/followers","following_url":"https://api.github.com/users/hannu/following{/other_user}","gists_url":"https://api.github.com/users/hannu/gists{/gist_id}","starred_url":"https://api.github.com/users/hannu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannu/subscriptions","organizations_url":"https://api.github.com/users/hannu/orgs","repos_url":"https://api.github.com/users/hannu/repos","events_url":"https://api.github.com/users/hannu/events{/privacy}","received_events_url":"https://api.github.com/users/hannu/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T07:12:15Z","updated_at":"2015-04-09T07:12:15Z","body":"When style guide parses used variables from the KSS blocks it splits individual blocks. In some cases this could lead to incorrect CSS. This happens usually when CSS block is opened and closed in the different KSS blocks. For example:\r\n\r\n```\r\n.some-style {\r\n\r\n// Header\r\n//\r\n// Our colors\r\n//\r\n// Styleguide 1.0\r\n\r\n  color: red\r\n}\r\n\r\n// Header\r\n//\r\n// Something else\r\n//\r\n// Styleguide 1.1\r\n```\r\n\r\nAfter KSS blocks are splitted we try to parse used variables from the following CSS that is not valid anymore:\r\n```\r\n  color: red\r\n} \r\n```\r\n\r\nWhen this kind of error is detected style guide is unable to show related variables for that block but style guide should be generated properly otherwise and the section should be visible."}}