NO BUG: Container grid display styling written to css when have switched to flex

Browser: Any
OS: macOS

  1. Put a section into a page
  2. Set the container display to be grid and enter a rule for grid-template-columns
  3. Save
  4. Switch the display of the container to flex
  5. Save
  6. Inspect the front-end and you will see that grid-template-columns is written into the css even though the display is flex. Probably any other grid css styling would also be written out to the css.

If the display is flex, no grid styling should be written out and vice versa.

Hi Simon,
Thanks so much for your report!

Correct, the values you set are written to the stylesheet. In this case, however, they have no influence on the flex container. On the other hand, you can use the flex settings in a grid, so that the logic for the “automatic removal of settings you have set yourself” can get super complex and would probably lead to more problems than is the case now.

Apart from one more line of CSS, there is no problem, and you are responsible for the extra line. If you don’t want them, clear the grid-template-columns setting and everything is fine.

Best regards,
timmse

1 Like