Skip to main content
このトピックへの返信は締め切られました。
WebProm
WebProm解決!
Inspiring
6月 18, 2019 9:32 午前 UTC

Today's DW update fixes the problem, thanks to all!

返信数 17

WebProm
WebProm作成者解決!
Inspiring
6月 18, 2019 9:32 午前 UTC

Today's DW update fixes the problem, thanks to all!

翻訳
Jon Fritz
Community Expert
Community Expert
6月 18, 2019 12:48 午後 UTC

Wow, there's a happy coincidence.

翻訳
WebProm
WebProm作成者
Inspiring
6月 18, 2019 1:27 午後 UTC

maybe your bug report helped good

翻訳
pziecina
Legend
6月 17, 2019 1:45 午後 UTC

Just out of interest, what happens if you include division, multiplication or nested calculations, (calculations in brackets). I ask because I use CS6 which whilst flaging as syntax error it leaves the code as written.

I'd hate to see what happens to the other css maths functions, (min(), max() and clamp() ).

翻訳
Jon Fritz
Community Expert
Community Expert
6月 17, 2019 1:52 午後 UTC

As far as I can see, it's just the + symbol that loses its leading space, and only in external css files.

I created a bug report on the uservoice forum here, if anyone wants to jump on it...

Apply Source Formatting Breaks calc() in CSS Files

翻訳
WebProm
WebProm作成者
Inspiring
6月 17, 2019 1:30 午後 UTC

Here for example it happens with the + too. Adding () not helping. Minus is left intact.

.QID771 {

    margin-top: -moz-calc(50vh - 50%+ 92px);

    margin-top: -ms-calc(50vh - 50%+ 92px);

    margin-top: -webkit-calc(50vh - 50%+ 92px);

    margin-top: calc(50vh - 50%+ 92px);

}

翻訳
Jon Fritz
Community Expert
Community Expert
6月 17, 2019 1:39 午後 UTC

Looks like when the css is written into in external stylesheet, it removes the space before the + symbol only. When I rewrite your code with a few extra + in it...

.QID771 {

    margin-top: -moz-calc(50vh - 50% + 92px);

    margin-top: -ms-calc(50vh + 50% + 92px);

    margin-top: -webkit-calc(50vh - 50% + 92px);

    margin-top: calc(50vh + 50% + 92px);

}

...and apply source formatting to the .css file, it removes only the spaces before the + in the code. The spaces before the - symbols are untouched.

Make sure to start a new post, or add to an existing bug report, over at the uservoice link given above. 

翻訳
Jon Fritz
Community Expert
Community Expert
6月 17, 2019 1:14 午後 UTC

I can confirm the bug in the version 19.1 Build 11240 of DW.

If the css is written into the <head> of an html page, Apply Source Formatting does't affect how the calc() function is written.

However, if the css is placed in an external stylesheet, Apply Source Formatting removes the spaces before the +.

翻訳
Nancy OShea
Community Expert
Community Expert
6月 16, 2019 6:41 午後 UTC

Show us an example please.

I have no trouble with calc functions.  Are you certain the rest of your code is free of errors?

翻訳
Nancy O'Shea— Product User & Community Expert
WebProm
WebProm作成者
Inspiring
6月 16, 2019 6:51 午後 UTC

Yes, I'm certain.

This simple expression loses space inside calc before +

I had problems with + and - in some previous files too.

@media(min-width:1200px) {

    .wrap {

        max-width: 76em;

        max-width: -webkit-calc(68.26em + 8vw);

        max-width: calc(68.26em + 8vw);

        padding-right: 4vw;

        padding-left: 4vw;

    }

}

Formatting issue. It never happened before last updates.

翻訳
Nancy OShea
Community Expert
Community Expert
6月 16, 2019 7:03 午後 UTC

I have the latest Dreamweaver and cannot reproduce the formatting problem at my end. 

Try Restore Preferences.

Unusual behavior in Dreamweaver? Try restoring preferences.

翻訳
Nancy O'Shea— Product User & Community Expert