Skip to content

How to style specific nested tokens? #204

Closed
@adamwathan

Description

@adamwathan

Is your feature request related to a problem? Please describe.

The built-in styles include nested token styles like this:

https://github.com/conorhastings/react-syntax-highlighter/blob/master/src/styles/prism/ghcolors.js#L163

However as far as I can tell they don't actually seem to work.

Describe the solution you'd like

It would be great if there was some way to target nested tokens like you can when writing a CSS theme for Prism/Highlight.

Describe alternatives you've considered

Tried a bunch of syntaxes to see if anything worked:

<SyntaxHighlighter
  style={{
    '.token.atrule .token.rule': { background: 'pink' }
    'atrule rule': { background: 'pink' }
    'atrule.rule': { background: 'pink' }
  }}
  {/* ... */}
/>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions