TypeFox / monaco-components

Monaco Editor and Language Client Wrapper, plus Monaco Editor React Component
MIT License
42 stars 13 forks source link

Selective applicance of wrappers css #65

Closed cdietrich closed 5 months ago

cdietrich commented 6 months ago

Hi, is there a way to prevent the monaco editor wrapper messing with the css styling up to the body tag? e.g. in dark mode "everything" gets dark

cdietrich commented 6 months ago

problem seems to be https://github.com/TypeFox/monaco-languageclient/blob/3979176106da5ff080381252b6a8873cd6e0c150/packages/client/src/monaco-vscode-api-services.ts#L101 as we dont pass a container there. which leads the body to be the container.

am not sure if this can be altered at a later stage

kaisalmen commented 6 months ago

Hi @cdietrich that is a result of how @codingame/monaco-vscode-api handles this. v2 may change this behavior. https://github.com/TypeFox/monaco-languageclient/pull/600 got delayed, so an already existing fix or new bug fix has to come afterwards. I hope to get PR 600 in finally this week.

cdietrich commented 6 months ago

as a workaround i await the wrapper start and then remove the css class from the body and add it to the container of the wrapper.

kaisalmen commented 5 months ago

@cdietrich This is fixed in the upcoming version. I will close this issue here, then I don't need to move it over to the other repo.