Skip to main content
Inspiring
August 12, 2024
Question

Dreamweaver theme for coldfusion tags

  • August 12, 2024
  • 1 reply
  • 683 views

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?

This topic has been closed for replies.

1 reply

Nancy OShea
Community Expert
Community Expert
August 12, 2024

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:@1268221-yellow;
}

 

Save main.less file (Ctrl+S).

 

Viola! Dark text on yellow background.

 

 

Hope that helps.

 

Nancy O'Shea— Product User & Community Expert
cintharaAuthor
Inspiring
August 12, 2024

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>

 

 

Nancy OShea
Community Expert
Community Expert
August 12, 2024

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.

 

 

Nancy O'Shea— Product User & Community Expert