Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Show CSS code hints in SCSS mode. #4551

Open
core-ai-bot opened this issue Aug 29, 2021 · 6 comments
Open

[CLOSED] Show CSS code hints in SCSS mode. #4551

core-ai-bot opened this issue Aug 29, 2021 · 6 comments

Comments

@core-ai-bot
Copy link
Member

Issue by RaymondLim
Sunday Aug 25, 2013 at 00:12 GMT
Originally opened as adobe/brackets#4931


This works for all valid CSS properties except those syntax that are not yet supported in CodeMirror SCSS mode.

eg. border: { style: solid; } You won't see property values for border-style when the cursor is after style: in the example. Instead, you see a list of property names since CodeMirror does not recognize style: as a nested property.


RaymondLim included the following code: https://github.com/adobe/brackets/pull/4931/commits

@core-ai-bot
Copy link
Member Author

Comment by JeffryBooher
Sunday Aug 25, 2013 at 04:01 GMT


@RaymondLim SCSS supports both the single line comment // and multi-line comments /*..*/ which may not work with our internal parsers. I know the code that I wrote for removing comments for named flows doesn't support it so I'm wondering if there are others. This apparently is also an issue with .less files.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Sunday Aug 25, 2013 at 04:14 GMT


@JeffryBooher Thanks for your info on comments in SCSS. I tested both // and multi-line comments, CodeMirror color coding is working correctly with both types of comments. So they don't have any impact on our CSS code hints -- commented property won't get any hints, but those not in any comment will get correct hints.

Update: just realize your concern of collecting named flows from single line comments in SCSS files since you don't have it implemented. AFAIK, this is the only thing that is not relied on CodeMirror mode and you just have to fix it in your regular expression.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Tuesday Sep 03, 2013 at 21:18 GMT


This looks good, except there is 1 EditorOptionHandlers Unit test failing:

should style active line after turning it on

TypeError: Cannot call method 'hasSelection' of null
    at Function.Editor.setShowActiveLine (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/src/editor/Editor.js:1578:20)
    at Command._toggleActiveLine [as _commandFn] (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/src/editor/EditorOptionHandlers.js:52:16)
    at Command.execute (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/src/command/CommandManager.js:90:38)
    at Object.execute (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/src/command/CommandManager.js:245:36)
    at null.<anonymous> (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/test/spec/EditorOptionHandlers-test.js:190:46)
    at jasmine.Block.execute (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:1024:15)
    at jasmine.Queue.next_ (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:1842:31)
    at jasmine.Queue.start (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:1795:8)
    at jasmine.Spec.execute (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:2122:14)
    at jasmine.Queue.next_ (file:///C:/Users/redmunds/github/brackets-shell/Release/dev/test/thirdparty/jasmine-core/jasmine.js:1842:31)

Maybe you just need to merge with master?

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Wednesday Sep 04, 2013 at 05:32 GMT


Thanks@redmunds

Merging with master indeed fixes this unit test failure.

@core-ai-bot
Copy link
Member Author

Comment by RaymondLim
Wednesday Sep 04, 2013 at 16:23 GMT


@redmunds ready for re-review. I'm including unit test failure fix (for #5051) with this pull request since the fix is on the same return statement that this pull request touches.

@core-ai-bot
Copy link
Member Author

Comment by redmunds
Wednesday Sep 04, 2013 at 16:41 GMT


All test now pass (Win7). Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant