Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with display:none #91

Open
MarcinAman opened this issue Jul 19, 2020 · 2 comments
Open

Issues with display:none #91

MarcinAman opened this issue Jul 19, 2020 · 2 comments
Assignees

Comments

@MarcinAman
Copy link

Hi,
in some cases i'd like to hide a sample using display: none. My issue is that when i show it, it doesn't look the way it should. Example:
image

The sample is there because when i don't use display: none it renders correctly:
image

Here is a sample project that i created to show the issue. I'm using chrome version 83.0.4103.116 (Official Build) (64-bit) and my operating system is Mac Os Catalina version 10.15.5.
samples.zip

@AlexanderPrendota
Copy link
Collaborator

Hey, did u try to set the display: none for class executable-fragment-wrapper? It works for my side.

@MarcinAman
Copy link
Author

It doesn't work if i do it like:

.sample > *:not([data-active]) .executable-fragment-wrapper {
    display: none;
}

But it does work when i do the same thing that is in kotlin example:

  <button onclick="KotlinPlayground('.runnablesample',{ onChange: (code)=> {console.log(code)}}); this.disabled = true; document.getElementById('wrapper').style.display = 'block';">Change display of wrapper</button>
#wrapper {
    display: none;
}

So basically the only difference that i can see is initialisation time.
Then i've tried yet another test: i went back to my original sample and remove the styles. Then opened the page and added the same styles manually. As it turns out, it work.
Imho the issue is related to the initial styles that the playground is initialised with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants