Replies: 1 comment
-
Hey @3goats we provide a small blurb about this at the bottom of the docs, but wrapping is set by default as it's typically more accessible: Unfortunately one of the limitations of Skeleton v2 is it can be hard to overwrite "base" styles for many of the elements within the components. We only provided a limit set of style props per each component. This is an key issue we're resolving in Skeleton v3. But in the meantime, here's what you can do. First, here's where the wrap style is defined: This is then applied to the So you'll need to make use of the Tailwind arbitrary variant syntax to "reach" this portion of template. This can be done as follows: <CodeBlock ... class="[&>pre]:!whitespace-nowrap" / This does a few things:
Alternatively, I would welcome a PR if you wish to help implement a style prop directly into the component. The Skeleton team has shifted our priority to v3, but we're still welcoming v2 contributions from the community. Just let me know if I can walk you through what's needed for this. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I see for tailwind you can disable text wrapping as per here - https://tailwindcss.com/docs/text-wrap#no-wrap
However, this doesn't seem to work for codeblocks. Is there a way to do this in Skeleton UI ?
Beta Was this translation helpful? Give feedback.
All reactions