Skip to content

Conversation

sandros94
Copy link
Contributor

Pointed out in #1173 (comment)

Considering that mdc, content and ui modules all default to prose true by default the same should apply to docus IMO.

the ui issue described at nuxt/content#3419 is more on a improper use of mdc syntax, as the following should be applied/suggested for docus as well:

  :::u-button
  ---
  color: neutral
  size: xl
  to: en/getting-started/installation
  trailing-icon: i-lucide-arrow-right
+ label: Get started
  ---
- Get started
  :::

since we cannot forcefully use MDCSlots everywhere with related unwrapping, since developers and users might want their own logic

cc: @benjamincanac for helping me out

Copy link

vercel bot commented Sep 5, 2025

@sandros94 is attempting to deploy a commit to the NuxtLabs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

codesandbox bot commented Sep 5, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@sandros94
Copy link
Contributor Author

CI failing for what it seems an unrelated issue 🤔

Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
docus Ready Ready Preview Sep 8, 2025 10:17am

@larbish
Copy link
Collaborator

larbish commented Sep 8, 2025

Hey @sandros94, thanks for your pull request. However I'm not 100% happy with your proposition as it is introducing a breaking change and do not handle certain case:

For instance adding p typography I don't want on description's card:
Screenshot 2025-09-08 at 12 33 23

Even if moving to props, like you did in some cases, could handle it and do not add the typo, this is not what we want since we want people to be able to use slots (define some css inside it for instance).

I've tried something on another PR: https://github.com/nuxtlabs/docus/pull/1176/files. With the autoUnwrap option of the mdc module it seems to behave well. This option is only adding typo for classical markdown. So it's not adding typo and extra margin inside components with only one child.

Could you have a try and tell me if it's acting well in your case?

@sandros94
Copy link
Contributor Author

Hey @sandros94, thanks for your pull request. However I'm not 100% happy with your proposition as it is introducing a breaking change and do not handle certain case:

For instance adding p typography I don't want on description's card:
Screenshot 2025-09-08 at 12 33 23

Even if moving to props, like you did in some cases, could handle it and do not add the typo, this is not what we want since we want people to be able to use slots (define some css inside it for instance).

I've tried something on another PR: https://github.com/nuxtlabs/docus/pull/1176/files. With the autoUnwrap option of the mdc module it seems to behave well. This option is only adding typo for classical markdown. So it's not adding typo and extra margin inside components with only one child.

Could you have a try and tell me if it's acting well in your case?

Yes, auto-unwrap could be a solution and I do understand the original issue. Will test it as I get back to my pc

@sandros94
Copy link
Contributor Author

Closing as #1176 does provide a working solution and has a more markdown-first approach.

@sandros94 sandros94 closed this Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants