Min heights/widths now zero? (Grid...

User 2706435 Photo


Ambassador
444 posts

Are container and column heights and widths now default zero? Even though I a using auto width columns, they seems to collapse to zero when there is no content, even though I have applied a background color. I remember in RSD, this would not be the case, even when using Foundation.

I used to be able to set background colors to elements to check layouts and then tweak it, especially when using auto widths. Did something change? Did the frameworks change, or did CC become more strict with the frameworks? Now, It seems i need min and max heights and I can't count of auto widths/heights when just wireframing a layout. Is there a way around this? Redoing some old sites, I have not noticed it. Now when I am testing new layouts, I am getting perplexed a little at the change. I thought auto, was auto, was auto, not collapse to zero, even for a column layout with Foundation.


My original question is below but I think I realized the answer, but just in case I don't understand it all

I am creating a grid, and before I go bonkers placing content, I want to just "wire-frame" it and test the layout.
In the SD editor, I can give cells a background color. It will display the color. I can give a column/track a minimum width, and it will still display the color. But NOT in the preview of the browser test. I understand that if a column or cell has no content, it collapses to zero. So - is that what I am seeing, even though I I gave the cell a background color, and a min width, it has no min heights, and so it collapse up to zero?
User 2706435 Photo


Ambassador
444 posts

I can't edit my original posy any longer. But, I believe I found a bug, perhaps it is a known one.
I put an element on the content pane, a container. Its given a min width/height of 10/50 px. UNTIL you preview it. It then snaps to 10/0. But appears to keep 10/50 in the content pane.

If I give it a min width of 20px, it still collapses to 0 px height. If I delete the style for the min height, the style pane reverts from 20/0 min width/height to 10/50 in the style pane, but its not applied in the code. The blue lines do appear to work right.

However, if the container has a min height, and no width, it will display, is that normal?
User 122279 Photo


Senior Advisor
14,447 posts
Online Now

I have experimented with your findings, and I'm getting the same results as to the disappearing 50px and nothing showing in preview. I have reported it to the developers.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2699991 Photo


Registered User
4,782 posts
Online Now

Inger wrote:
I have experimented with your findings, and I'm getting the same results as to the disappearing 50px and nothing showing in preview. I have reported it to the developers.

Been like that since the beginning of time never mentioned it before as didn't bother me
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact Me For One To One Assistance
https://alphathemes.coffeecup.com/forms … an%281%29/
User 122279 Photo


Senior Advisor
14,447 posts
Online Now

I know it is not new, and it has been discussed some years ago, but that might have been outside the user forums.
But it really doesn't make sense that 50x height gets changed to nothing just by previewing a page
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2699991 Photo


Registered User
4,782 posts
Online Now

Inger wrote:
I know it is not new, and it has been discussed some years ago, but that might have been outside the user forums.
But it really doesn't make sense that 50x height gets changed to nothing just by previewing a page

Many things in this world don't make sense ???? I just add a height if I need a spacer container with nothing in
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact Me For One To One Assistance
https://alphathemes.coffeecup.com/forms … an%281%29/
User 379556 Photo


Registered User
1,533 posts

I may be wrong, but I suspect that the program is correct on this, as I don't think that a background colour would count as 'content' or 'tentative used height', and min-height is apparently relative to content/tentative used height rather than being absolute. The following references suggest this. Where SD4 finds that there is no content to a div, it converts accordingly.

https://www.w3.org/TR/2011/REC-CSS2-201 … ax-heights

The following algorithm describes how the two properties influence the used value of the 'height' property:
The tentative used height is calculated (without 'min-height' and 'max-height') following the rules under "Calculating heights and margins" above.
If this tentative height is greater than 'max-height', the rules above are applied again, but this time using the value of 'max-height' as the computed value for 'height'.
If the resulting height is smaller than 'min-height', the rules above are applied again, but this time using the value of 'min-height' as the computed value for 'height'.

https://www.w3schools.com/CSSref/pr_dim_min-height.asp

If the content is smaller than the minimum height, the minimum height will be applied.
If the content is larger than the minimum height, the min-height property has no effect.

The canvas in SD4 needs to show a min-height initially as otherwise we would not be able to see it at all.

Frank
User 2699991 Photo


Registered User
4,782 posts
Online Now

Frank Cook wrote:
I may be wrong, but I suspect that the program is correct on this, as I don't think that a background colour would count as 'content' or 'tentative used height', and min-height is apparently relative to content/tentative used height rather than being absolute. The following references suggest this. Where SD4 finds that there is no content to a div, it converts accordingly.
Exactly
https://www.w3.org/TR/2011/REC-CSS2-201 … ax-heights

The following algorithm describes how the two properties influence the used value of the 'height' property:
The tentative used height is calculated (without 'min-height' and 'max-height') following the rules under "Calculating heights and margins" above.
If this tentative height is greater than 'max-height', the rules above are applied again, but this time using the value of 'max-height' as the computed value for 'height'.
If the resulting height is smaller than 'min-height', the rules above are applied again, but this time using the value of 'min-height' as the computed value for 'height'.

https://www.w3schools.com/CSSref/pr_dim_min-height.asp

If the content is smaller than the minimum height, the minimum height will be applied.
If the content is larger than the minimum height, the min-height property has no effect.

The canvas in SD4 needs to show a min-height initially as otherwise we would not be able to see it at all.

Frank
Mastering The Understanding With Hands-On Learning
NEW TO "COFFEECUP SITE DESIGNER" FOUNDATION 6 FRAMEWORK?
STUCK ON SOMETHING?

LEARNING & UNDERSTANDING "THE HOW TO"? THE WHY'S & THE WHEREFORE'S?
WITH WAYAN'S STEP BY STEP TUTORIALS
Contact Me For One To One Assistance
https://alphathemes.coffeecup.com/forms … an%281%29/
User 2706435 Photo


Ambassador
444 posts

Frank, I get tripped up when I apply a style, and when I scan other properties, the other properties seem to convey what in the content pane. In the old RSD, I believe minimums were a part of the css that CC would create when a row was created for example. In this case, I apply a container, and I see - it has a dimension and height - just no blue line confirming it. In RSD, there were forum discussions about using a custom default CSS code - for example, apply a type style so whenever a row was created, it was be 70px high instead of of being 20px high (or whatever the default was).
User 379556 Photo


Registered User
1,533 posts

I, like you, was surprised by the seemingly curious behaviour with min-height and divs. Although they replace the old rows, the differences of treatment seem significant.

Frank

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.