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.

How do I use CSS prism themes?

See original GitHub issue

Current behaviour

When I use vsc-dark-plus, I can make sure that all torkens have the proper color except for the background.

Expected behaviour

May this line be removed?

https://github.com/satya164/react-simple-code-editor/blob/73b57bf4d548257890f9ed0ee83ee37ec099b256/src/index.js#L625

Code sample

require('./prism-vsc-dark-plus.css')
export default function Editor(){
  return <SimpleEditor
				value={'<Button />'}
				highlight={highlight(isVueSFC ? 'html' : 'jsx')}
				// Padding should be passed via a prop (not CSS) for a proper
				// cursor position calculation
				padding={space[2]}
				// to make sure the css styles for prism are taken into account
				preClassName={'language-jsx'}
			/>
}

Screenshots (if applicable)

Capture d’écran 2020-02-16 à 6 40 23 PM

Sandbox

https://codesandbox.io/s/suspicious-flower-5rl8e

Your Environment

software version
react-simple-code-editor 0.11.0
react 16
npm or yarn yarn
node 11
browser Firefox & Chrome

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
satya164commented, Feb 17, 2020

The background is set to none because without it the cursor in the textarea below will be covered by the background and won’t be visible. You need to set the background color on the container instead of the pre.

0reactions
SeongwoonHongcommented, Jul 15, 2021

@elevatebart would you be able to share how you are able to solve it in more details please 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

A wider selection of Prism themes - GitHub
This repository lists a selection of additional themes for the Prism syntax highlighting library. How to use a theme. To use one of...
Read more >
Prism
Extensible Define new languages or extend existing ones. Add new features thanks to Prism's plugin architecture. Easy styling All styling is done through...
Read more >
prism-themes - npm
Additional themes for the Prism syntax highlighting library. ... Start using prism-themes in your project by running `npm i prism-themes`.
Read more >
colorschemes for Prism syntax highlighter - Atelierbram
Prism is a lightweight, robust, elegant syntax highlighting library. It is written in javascript, and the colorschemes are CSS stylesheets; so highly ...
Read more >
Highlight your code syntax with PrismJS - Publii
To implement this feature in some of our themes we decided to make use of Prism.js, which is written in JavaScript and CSS...
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