Copy link to clipboard
Copied
I love the Coldfusion tags colors used in the old Dreamweaver (for example, CS6) and I hear the same thing from other CF programmers.
In Dreamweaver 2021, I have starting creating my "Classic Dreamweaver" theme using the main.less file but am having problems making the html comments ("<!--") tags grey and the coldfusion comments ("<!---") tags yellow background with black font.
https://helpx.adobe.com/dreamweaver/using/customize-code-coloring.html#mixed-code
.cm-comment { color: #7a7a7a; /* same css class for both coldfusion and html comments */ }
I tried this and it doesn't work, all comments are grey:
.CFM{ .cm-comment { background-color: #FFFF99; color: #000000; } }
Have anyone tried doing it with any success?
Copy link to clipboard
Copied
I use a Brackets code theme from GitHub called RubyBlue. There are dozens of other themes there as well.
https://brackets-themes.github.io/
My Theme contains @ variables near the top of the main.less file. These @ variables are used throughout the Theme's style.
/**
* Theme RubyBlue Copyright (c) 2014 Eric Johnson
* Licensed under MIT
*/
/* Overall Colors */
@background: #112435;
@brightgreen: #7BD827;
@comment: #999;
@rb-blue: #3e7087;
@rb-darkblue: #16314a; /* Currently Unused */
@rb-lightblue: #82C6E0;
@rb-magenta: #f0f;
@rb-orange: #F08047;
@rb-pink: #d85896; /* Currently Unused */
@rb-red: #af2018;
@rb-violet: #6c71c4; /* Currently Unused */
@rb-yellow: #F4C20B;
@rb-white: #fff;
.CodeMirror {
.CodeMirror-scroll {
background-color: @background;
color: @rb-white;
}
.CodeMirror-selected {
background: lighten(@background, 20%);
}
.CodeMirror-gutters {
background: lighten(@background, 13%);
border-right: 7px solid @rb-blue;
}
.CodeMirror-linenumber {
color: @rb-white;
}
.CodeMirror-cursor {
border-left: 1px solid @rb-white !important;
}
.CodeMirror-matchingbracket {
color: @rb-magenta !important;
background-color: transparent;
}
.CodeMirror-activeline-background {
background: lighten(@background, 5%);
}
.CodeMirror-searching {
background-color: fade(@rb-orange, 90%);
border: 1px dashed white;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
color: @rb-white !important;
}
}
.CodeMirror-searching.searching-current-match {
background-color: @rb-red;
}
.cm-comment {
color: @comment;
}
See screenshot.
Change comment style to these variables.
.cm-comment {
color: @comment;
background-color:@rb-yellow;
}
Save main.less file (Ctrl+S).
Viola! Dark text on yellow background.
Hope that helps.
Copy link to clipboard
Copied
Hi Nancy,
Thank you for your reply. Is it possible to keep the HTML comments grey and the Coldfusion comments yellow? Right now it is not gradular enough. It does ALL comments with the same css style in my .cfm pages.
You can test like this:
test.cfm
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<!-- This is a HTML comment and should have grey font color.-->
<!--- This is a Coldfusion comment and should have background of yellow and black font color.--->
</body>
</html>
Copy link to clipboard
Copied
Code-Mirror Comments are universal in JS, CSS, HTML, PHP, etc...
AFAIK, there are no special selectors for CF code-only. Probably because DW ended support for CF about a decade ago.
Sorry.
You might try using Visual Studio Code with the optional ColdFusion Builder extension.
Copy link to clipboard
Copied
Strange that they would end support for their own Coldfusion product. It's like they don't want anyone to adopt Coldfusion, just php. Dreamweaver use to be an excellent product for CF development but that ended after CS6.
Anyway, I tried VS code already with CF Builder extension. It has the exact same issue in that it can't tell the difference between a CF comment and a HTML comment. Thank you for your help, I'll have to explore other options.
Copy link to clipboard
Copied
Comment colors are universal in most code editors, mainly for consistency.
Copy link to clipboard
Copied
Anyways, the comments have different functions in html and coldfusion... and they need to be different colors. It is a difference when people seeing the comment in page source view! It can really screws me up if the comments are not correctly colored when programmng. When creating themes, it there any way to isolate certain "<!---" to be one color and "<!--" to be another color?
When I look at this https://github.com/Siddley/Enhanced.HTML.CFML they are able to do it. I don't mind creating my own theme in DW but it seems like DW doesn't recognize uniquely CF tags and why can't it handle nested comments? It gets all broken.
Copy link to clipboard
Copied
Last updated 10-12 years ago! Dreamweaver was rebuilt in 2017 with a different code engine that doesn't support CF Comments. Sorry.