godismyjudge95 / shorthand

A Brackets extension for expanding shorthand css properties in the inline editor.
MIT License
4 stars 5 forks source link

Code Hint support #9

Open redmunds opened 10 years ago

redmunds commented 10 years ago

It would be very helpful to have code hints in shorthand editor.

godismyjudge95 commented 10 years ago

@redmunds Is this a problem with this extension or with Brackets itself?

redmunds commented 10 years ago

This problem is with the extension.

First, we're using an in-memory file, which doesn't exist on disk, so it doesn't have a file extension, so Brackets doesn't know it's a CSS file. This could probably be easily fixed.

Second, after that's fixed, it is not a well-formed css rule, just a declaration list, so the token parser doesn't know where to show hints for "properties" or "values". Not yet sure how to fix that.

TomMalbran commented 9 years ago

To fix the second issue, maybe you could just write in the document

body {
margin-top: ?;
...
}

And then just hide the first and last line as it is done with the other inline editors.