Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Listing code alphabetically

Contributor ,
Jun 25, 2024 Jun 25, 2024

Hi everyone,

 

Is there a way to list your code alphabetically in Dreamweaver? (see below)

 

Thanks.

 

Mark

 

 

Before

.class {
padding: 2px; 
display: block;
list-style: none;
margin: 10px;

font-size: 1rem;

font-color: #000;
}

 

After

.class {
display: block;

font-color: #000;

font-size: 1rem;

list-style: none;

margin: 10px;

padding: 2px; 

}

TOPICS
How to
698
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Jun 27, 2024 Jun 27, 2024

Given my limited English skills, I might have misinterpreted the question, what I understand is that you want to classify properties within a declaration, and not the declarations themselves as @Nancy OShea implies.

 

If we're indeed talking about CSS property sorting, as @Jon Fritz mentioned, Dreamweaver (DW) does not offer this functionality, at least AFAIK. Fortunately, Node.js provides us with a wonderful tool for this purpose.

 

While alphabetical sorting is one option, there are also appr

...
Translate
Contributor , Jun 28, 2024 Jun 28, 2024

OK, thanks Jon. 

Translate
Community Expert ,
Jun 26, 2024 Jun 26, 2024

There's nothing in DW to rearrange your css properties alphabetically in your actual code.

Older versions would list set properties of selectors alphabetically in the CSS Panel, but since the introduction of the CSS Designer, that's no longer the case.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 28, 2024 Jun 28, 2024

OK, thanks Jon. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 26, 2024 Jun 26, 2024

Sorting CSS code alphabetically could be catastrophic. Styles cascade downward in order of importance; not alphabetically or numerically.

 

My guess is that you're searching for something in Code View.  Use Ctrl + F or Ctrl+Shift + F for advanced search options.

 

Hope that helps.

 

 

 

 

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 28, 2024 Jun 28, 2024

Hi Nancy, I don't think I explained myself properly.

 

I wanted to know if there was a quick and easy way to arrange the properties of any given selector in alphabetical order. Similar to how the Apply Source Formatting function works except it would list the selected properties in alphabetical order. Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 27, 2024 Jun 27, 2024

Given my limited English skills, I might have misinterpreted the question, what I understand is that you want to classify properties within a declaration, and not the declarations themselves as @Nancy OShea implies.

 

If we're indeed talking about CSS property sorting, as @Jon Fritz mentioned, Dreamweaver (DW) does not offer this functionality, at least AFAIK. Fortunately, Node.js provides us with a wonderful tool for this purpose.

 

While alphabetical sorting is one option, there are also approaches like SMACSS and concentric sorting, which are often more suitable for intensive coding needs.

To get started, I recommend checking out the following tool: css-declaration-sorter.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 28, 2024 Jun 28, 2024
LATEST

Hi Lena,

 

Yes, I want to classify properties within a declaration. Thanks for the link. 

 

Mark

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines