Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\n in grid destroys the grid lines. #1799

Closed
jfudickar opened this issue Jan 3, 2024 · 1 comment
Closed

\n in grid destroys the grid lines. #1799

jfudickar opened this issue Jan 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jfudickar
Copy link

jfudickar commented Jan 3, 2024

When a \n is used in a grid column the horizontal lines are no longer correct:

https://play.d2lang.com/?script=dI7vSsQwEMS_5ymGfhQ8bALi7bMIJW32aiRNj-zmQMR3l4aT-u8ggdmdneH3Kmu2hK7DuwHmEsP97M-Eh69pWlNdshCcAe4Oom-JD-OaAuHkk7AxwNkXzvrD01LZAP3QEzp0BrC7dJvUl1JFh4ufal22Fq9a4liV_y-yhLGWPGhceBCe4CX8-c_5qq4PYXe_H3r8CkpoiJbAeY6ZpWFaQhxPG9zFp3oDzBH6R9vijnBswW335NzROvNhPgMAAP__&layout=elk&

json2: "" {
  grid-gap: 0
  grid-columns: 3
  *.style.bold: false

  parent.style.bold: true
  1_1: " "
  2_1: " "
  3_1: thrust_vacuum

  attribute.style.bold: true
  1_2: burn_time_sec asd asd asd asd asd \nasd asdasdasda dasd asd as asd asd asda sd asd asd asd sd
  2_2: engines
  3_2: ibf

  value.style.bold: true
  1_3: 162
  2_3: 9
  3_3: 1833923
}
@cyborg-ts cyborg-ts added this to D2 Jan 3, 2024
@alixander alixander added the bug Something isn't working label Jan 4, 2024
@GavinNishizawa
Copy link
Contributor

You just need to also specify grid-rows: 4 if you want all the rows to have the same height. Grid columns can contain cells of different sizes. For example

https://play.d2lang.com/?script=dI7vSsQwEMS_5ymGfhQ8bCLi7bMIJW32aiRNj-zmRMR3l5Q7zr-QwGQmM_xeZM2W0HV4N8BcYrid_ZFwd3lNa6pLFoK7OGV9FcK9McDNTvQt8W5cUyAcfBJu9tEXzvot01LZAP3QEzp0BrBX6ZrU51JFh5Ofal3ailctcazKfw9ZwlhLHjQuPAhP8BJ-3ad8VueDcE2_fvT4UZSwIVoC5zlmlg3TEuJ4aHAnn-o_YI7QP9it7gj7rdi8R-f21pkP8xkAAP__&layout=elk&

@github-project-automation github-project-automation bot moved this to Done in D2 Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants