Mattiafarinaro / zen-coding

Automatically exported from code.google.com/p/zen-coding
0 stars 0 forks source link

Dreamweaver: Adding new CSS document types (file extensions) expand as HTML not CSS #297

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add .less as a supported CSS file type using the following steps
http://kb2.adobe.com/cps/164/tn_16410.html
2. Restart Dreamweaver
3. Create and open a .less file
4. Enter the following:
fl:l|fc
5. CTRL+,

What is the expected output? What do you see instead?
According to http://code.google.com/p/zen-coding/wiki/Filters the entered code 
should expand to:
float: left;
But I see this instead:
<fl:l></fl:l>

What version of the product are you using? On what operating system?
Dreamweaver 0.7.5 MXP in Dreamweaver CS5.5 on Windows 7 x64

Please provide any additional information below.
I've tracked the issue down a bit, and it appears that the logic to determine 
if the user is within a CSS file uses dom.getParseMode() which returns "css" 
only for .css files, not other file extensions (such as .less) that are added 
as CSS file types according to the Adobe technote above. Instead, the file type 
should trigger off of dom.documentType which correctly returns "CSS" for .css 
files and .less files when added acording to the technote.

Original issue reported on code.google.com by dan...@shimmerphase.com on 25 Oct 2011 at 4:27

GoogleCodeExporter commented 8 years ago
I don't think I can help you somehow. I cannot influence on how DW 
dom.getParseMode() method works. Probably some additional steps must be taken 
to make it work. Or you have missed some point (such as editing menus.xml from 
Dreamweaver itself—editor overwrites file on closing).

Original comment by GreLIm...@gmail.com on 25 Jun 2012 at 7:42

GoogleCodeExporter commented 8 years ago
Perhaps you misread my message. I provided an alternate way to determine if you 
are editing a CSS file that is a .less file extension. Within the Dreamweaver 
extension for Zen Coding, if you use dom.documentType, which will return "CSS" 
rather than using dom.getParseMode() to check for CSS file type, then the code 
will work in .less files.

Original comment by dan...@shimmerphase.com on 25 Jun 2012 at 8:52