Skip to main content
Known Participant
June 26, 2018
Answered

CSS Formatting

  • June 26, 2018
  • 2 replies
  • 1956 views

Older versions of Dreamweaver had an option to define how we wanted CSS to be formatted.

I don't see such an option, anymore.

Can we still customize that?

JJ

This topic has been closed for replies.
Correct answer Jeremy Pinson

The thing is most of us minify CSS now, so formatting is kind of a moot point.


This does not answer the OP's question, which is not what is 'best' but whether custom CSS formatting is still available. This featured was deprecated from the Dreamweaver CC2017 UI after Brackets was incorporated. See thread;

css Apply Source Formatting DW 2017

Personally, I see this as a poor decision. I find it faster to work on CSS with each element on a single line, as opposed to my colleague who prefers each style on a separate line; we're different. It's not so much about the final file we'll be hosting but what we're working on.

In any case, customising CSS formatting is still possible but you must make modifications outside the app. As per the above thread (you may need to adjust the path based on your current version)...

C:\Users\<username>\AppData\Roaming\Adobe\Dreamweaver CC 2018\cloudpref\Adobe Dreamweaver CC 2018

Look for '<section name="Source Format">' and in this element you may customise various CSS formatting options. For instance, changing 'CSS Props On New Line' from TRUE to FALSE prevents every new style from appearing on a new line;

<pref name="CSS Props On New Line" type="string" val="TRUE"/>

However, you will also need to update the corresponding entry in the Registry (again, your registry path may differ slightly);

HKEY_USERS\S-1-5-21-116350639-1196654513-2025997110-70382\Software\Adobe\Dreamweaver CC 2018\Source Format

Good luck!

2 replies

Community Manager
May 21, 2019

Hi Fa310tx,

Thanks for reporting.

We are happy to inform you that we have done some improvements in CSS code formatting in our latest Prerelease drop Dreamweaver CC Next 15104.Please give it a try and share your feedback.

Prerelease Invite link:
Adobe Prerelease

Thanks

Dreamweaver Team

Participating Frequently
July 23, 2019

Kratika Agarwal​ - I have just installed CC Next 15104 and don't see anything new in regards to CSS code formatting; can you please indicate what has changed and where any new settings are?

Nancy OShea
Community Expert
Community Expert
July 23, 2019

That should all be described in the pre-release forum notes.  We cannot discuss pre-release products in the public forum.

Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
June 26, 2018

Go to Edit > Preferences > CSS Styles.  Those are the only options.  CSS formatting is mostly automatic now.

Nancy O'Shea— Product User & Community Expert
Fa310txAuthor
Known Participant
June 26, 2018

But that has no facility to defining the formatting.

Should it put all the selectors on one line or multiple lines?

Should it put all the properties on one line or multiple lines?

Should the curly braces be on the same lines or new lines?

Those are what I'm talking about.

JJ

Nancy OShea
Community Expert
Community Expert
June 26, 2018

The thing is most of us minify CSS now, so formatting is kind of a moot point.

Nancy O'Shea— Product User & Community Expert