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

Editor crashed when css gets a bit complex

Explorer ,
Jan 15, 2024 Jan 15, 2024

Lates version of DW on updated Windows 11.

 

vincnet_0-1705340300013.pngexpand image

 

See the cursor, when it is positioned there the editor crashes. Every time.

TOPICS
Error
589
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 1 Correct answer

Community Expert , Jan 23, 2024 Jan 23, 2024
quote

I found out it has to do with the linebreak.

By vincnet

 

Thank you for your feedback, it's true that porting between Linux and Windows sometimes causes problems when using DW, for that purpose, here at the studio we're used to always having an instance of NotePad++ open, to transfer our pasted copies between OS (and even between applications) this tool has the particularity of respecting encoding (and its permutation) which is quite remarkable.

Translate
Community Expert ,
Jan 17, 2024 Jan 17, 2024

What kind of file is this?

I can't tell much from your screenshot. 

 

If this is a CSS file, validate and fix reported errors:

https://jigsaw.w3.org/css-validator/

 

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
Explorer ,
Jan 18, 2024 Jan 18, 2024

Thank you for your reaction.

 

It is a CSS file (SCSS) and the code is validated. It is an example from https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_images/Using_CSS_gradients (see code below) and validated on https://jigsaw.w3.org/css-validator/validator (see image below).

 

But even if it's not valid CSS, the editor should not crash.

 

vincnet_0-1705566924584.pngexpand image

 

 

 

.multi-repeating-linear {
  background: repeating-linear-gradient(
      190deg,
      rgb(255 0 0 / 50%) 40px,
      rgb(255 153 0 / 50%) 80px,
      rgb(255 255 0 / 50%) 120px,
      rgb(0 255 0 / 50%) 160px,
      rgb(0 0 255 / 50%) 200px,
      rgb(75 0 130 / 50%) 240px,
      rgb(238 130 238 / 50%) 280px,
      rgb(255 0 0 / 50%) 300px
    ), repeating-linear-gradient(
      -190deg,
      rgb(255 0 0 / 50%) 30px,
      rgb(255 153 0 / 50%) 60px,
      rgb(255 255 0 / 50%) 90px,
      rgb(0 255 0 / 50%) 120px,
      rgb(0 0 255 / 50%) 150px,
      rgb(75 0 130 / 50%) 180px,
      rgb(238 130 238 / 50%) 210px,
      rgb(255 0 0 / 50%) 230px
    ), repeating-linear-gradient(23deg, red 50px, orange 100px, yellow 150px, green
        200px, blue 250px, indigo 300px, violet 350px, red 370px);
}

 

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 ,
Jan 18, 2024 Jan 18, 2024

We can see on your screen grab that the declaration containing repeating-linear-gradient seems to be missing a closing curly brace, just after the declaration of padding.

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
Explorer ,
Jan 18, 2024 Jan 18, 2024

It's part of SCSS so that's allowed.

And in anyways, it should not crash the editor.

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 ,
Jan 18, 2024 Jan 18, 2024

SCSS is preprocessed code for advanced developers. It's used in SASS or LESS files to create global site mixins, variables & functions

Have you designated a preprocessor to compile SCSS into standard CSS code?

Dreamweaver supports the following:

  • Sass: 3.4.25
  • LESS: 2.7.2
  • Compass: 1.0.3
  • Bourbon: 4.2.6
  • Bourbon Neat: 1.7.3
  • Bourbon Bitters: 1.2.0

 

See below for more details.

https://helpx.adobe.com/dreamweaver/using/css-preprocessors.html

 

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
Explorer ,
Jan 18, 2024 Jan 18, 2024

Dear Nancy,

 

Are you wrinting this reply to me or for the whole community? Thank you for your suggestions, but it is not an answer to my bug report.

 

I know what SCSS is. I use it for almost a decade. And in my case it is compiled to CSS on the server.

 

I use DW as editor for years now to edit the SCSS files, without issues.

 

What happens is simple: I copied the lines of code into my SCSS file and when I clicked into the lines of code, the editor freezes. Every time. I suggest you do the same to reproduce the issue. No compiling, just copy paste it and see what happens if you try to chenge the word "red" for instance.

 

I hope your response will be more to the point now.

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 ,
Jan 18, 2024 Jan 18, 2024

I am unable to reproduce the lock-up problem on my end.  But I see a code error reported on line 5.

 

OUTPUT PANEL: 

ERROR: Wrong number of arguments (1 for 3) for 'rgb'

 

image.pngexpand image

 

To resolve the error, I inserted commas between values like this.

rgb(255, 0, 0) 50% 40px

 

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
Community Expert ,
Jan 19, 2024 Jan 19, 2024

Have you tried any of the more general troubleshooting steps, like Restoring Preferences yet?

That can clear up all kinds of program oddities.

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 ,
Jan 19, 2024 Jan 19, 2024
quote

To resolve the error, I inserted commas between values like this.

rgb(255, 0, 0) 50% 40px

By Nancy OShea

 

In fact, it's DW that's in trouble: the fact that it hasn't been updated means that its code corrector doesn't integrate the higher levels of CSS.

The way @vincnet is coded is correct, there's no need to resort exclusively to comma-based syntax to describe a color in rgb or rgba, https://docs.w3cub.com/css/color_value/rgba.html

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 ,
Jan 19, 2024 Jan 19, 2024
quote

It's part of SCSS so that's allowed.

And in anyways, it should not crash the editor.

By vincnet

 

Sorry, I didn't realize you were using SCSS, but in any case, I prefer to use blocks that are closed.

 

Indeed, the error, if there is one, shouldn't bring down the editor. Perhaps the debugging context should be extended to include other parameters linked to the context of use.

 

Could you please make your files available, so that we can try to reproduce this crash?

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
Explorer ,
Jan 20, 2024 Jan 20, 2024

I found out it has to do with the linebreak.

 

vincnet_0-1705746291812.pngexpand image

 

  • In my Preferences, long time ago, I remember I have set that to LF (Unix) because of issues on a Linux server with the other settings.
  • It appears I have to set it to CR LF (Windows) for having a copied piece of code that contains a linebreak not freezing the editor.
  • But I'm afraid then I re-introduce the problems on the Linux server.

 

Now if my first step is going to position 0 on the line after the break and I do Backspace, so the linebreak is removed, it goes well.

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 ,
Jan 21, 2024 Jan 21, 2024

1. There should be no line breaks inside a continuous code string. 

2. Use the correct line break for your server.

3. When copying & pasting,  use Edit > Paste Special > Text Only to remove unwanted formatting from code.

 

image.pngexpand image

 

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
Explorer ,
Jan 23, 2024 Jan 23, 2024

Hi Nancy, thak you for all your efforts and responses, but your answers are not in respect to my remark that there is a bug in the system. You started evaluating the (S)CSS and how I must work to avoid the given crash or freeze. That's not at debate here.

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 ,
Jan 23, 2024 Jan 23, 2024
LATEST

Given DW's minimal maintenance status, I'm showing you that PASTE SPECIAL will help you avoid such problems in the future.

 

You're welcome. 😄

 

 

 

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
Community Expert ,
Jan 23, 2024 Jan 23, 2024
quote

I found out it has to do with the linebreak.

By vincnet

 

Thank you for your feedback, it's true that porting between Linux and Windows sometimes causes problems when using DW, for that purpose, here at the studio we're used to always having an instance of NotePad++ open, to transfer our pasted copies between OS (and even between applications) this tool has the particularity of respecting encoding (and its permutation) which is quite remarkable.

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