question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CSS breaks syntax highlighting in Storybook docs

See original GitHub issue

Describe the bug The CSS from the Gentellela (a bootstrap admin template) overides the .tags and pre/code css selectors which breaks the syntax highlighting in storybook docs.

gentellela include in preview-head.html

<link href="https://cdnjs.cloudflare.com/ajax/libs/gentelella/1.4.0/css/custom.min.css" rel="stylesheet">

Screenshots If applicable, add screenshots to help explain your problem. image image

Potential Solution use hash classes instead of ‘tag’ ‘text’ etc… image

System: Please paste the results of npx -p @storybook/cli@next sb info here.

Environment Info:

  System:
    OS: Linux 5.0 Debian GNU/Linux 9 (stretch) 9 (stretch)
    CPU: (4) x64 Intel(R) Core(TM) i5-7400 CPU @ 3.00GHz
  Binaries:
    Node: 11.15.0 - /usr/bin/node
    npm: 6.7.0 - /usr/bin/npm
  npmPackages:
    @storybook/addon-a11y: ^5.2.8 => 5.2.8
    @storybook/addon-docs: ^5.3.0-rc.1 => 5.3.0-rc.1
    @storybook/addon-storyshots: ^5.2.8 => 5.2.0

Thank you for storybook ❤️ , 😄 🐱

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
buonzzcommented, Apr 14, 2022

i’ve got the same problem … Screen Shot 2022-04-14 at 8 46 12 AM

1reaction
LeBenLeBencommented, Feb 11, 2020

Coming to this for the same bug but different cause, our very own CSS is conflicting in the same way. It would be great if these items classes gets generated with a random name so it would never conflicts with other styles just like other Storybook elements.

Looks similar to #8758

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source - Storybook - JS.ORG
Storybook's Source Doc Block displays the story's source code. It supports syntax highlighting for most languages (e.g., javascript , jsx , json ,...
Read more >
MDX - Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
ArgsTable - Storybook - JS.ORG
Storybook Docs automatically generates component args tables for components in supported frameworks. These tables list the arguments (args for short) of the ...
Read more >
DocsPage - Storybook - JS.ORG
When you install Storybook Docs, DocsPage is the zero-config default documentation ... args tables, and code examples into a single page for each...
Read more >
Frequently Asked Questions - Storybook - JS.ORG
Why aren't my code blocks highlighted with Storybook MDX; Why aren't my MDX 2 stories working in ... Integration/Styling and CSS, See current...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found