BFE.dev solution for CSS coding question
10. golden-ratio rectangle

Solution by @Dharanish-V

  • The aspect-ratio CSS property sets a preferred aspect ratio for the box, which will be used in the calculation of auto sizes and some other layout functions.
  • The Height is calculated automatically depends on width when using aspect-ratio.
  • The golden ratio is 1.618.
  • Set the aspect-ratio property to golden ratio (1.618).
.golden-ratio {
  background-color: #ccc;
  aspect-ratio: 1.618;
}

You might also be able to find a solution fromcommunity posts or fromAI solution.