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

Added a Coy bug to the known failures page. #2170

Merged
merged 2 commits into from
Feb 18, 2020

Conversation

RunDevelopment
Copy link
Member

@RunDevelopment RunDevelopment commented Jan 9, 2020

As discussed here.

image


I also quickly looked for other open theme issue but couldn't find any. If there are any I missed, please leave a comment.

@garretwilson
Copy link

Actually @RunDevelopment I discovered another Coy shadow bug, this time vertically!. If you have two flexbox items (this is very important to me to include code snippets in flexbox children!), the code snippit will only extend vertically as much as it needs, but the shadow will extend vertically to fill the flexbox!

prism-coy-shadow-flex-bug

The overall problem is that you seem to be using two different approaches to sizing the code section and the shadow. It seems to be that if this keeps appearing, there's a fundamental flaw in the approach.

The shadow should match the code area, both horizontally and vertically.

As I mentioned before I'm going to turn the shadow off across all my pages, but it's a shame and I think you should revisit how you do the shadow.

@RunDevelopment
Copy link
Member Author

RunDevelopment commented Jan 11, 2020

So we can go in both directions... At least it's consistent.

But this seems to be the same bug just caused by flex(ing) this time.

It seems to be that if this keeps appearing, there's a fundamental flaw in the approach.

There is. For Coy, the pre is just a wrapper and all styling is done on the code element. This is basically the opposite of what all other themes are doing and one of the reasons why we have so many Coy-related issues.
It's actually quite simple to rewrite the themes to style the pre making it behave like all others but I can't get the shadows working. More details.

I'm going to turn the shadow off

I am curious about how you do this. Do you just disable the pseudo-elements and make the background transparent or do you actually fix the layout (if so, how)?

@garretwilson
Copy link

garretwilson commented Jan 11, 2020

I'm going to turn the shadow off

I am curious about how you do this. Do you just disable the pseudo-elements and make the background transparent or do you actually fix the layout (if so, how)?

I'm just following the instructions in #894 (which I opened after all the Coy shadow problems in #859).

It had been so long that I had forgotten all the pain the shadows caused, and tried to turn them back on. Now they are on across all my sites and I'll have to go back and turn them off again. It will be wonderful to have the bugs publicly documented so I won't make that mistake again.

@mAAdhaTTah
Copy link
Member

If there's an alternate approach you have in mind, we could possibly put it in prism-themes as like a coy-alt or something. Alternatively, I would accept coy-without-shadows there as well (although preferably only one of those).

@garretwilson
Copy link

Thanks, but frankly this is the least of my worries at the moment. As long as I have a way to turn it off, I can concentrate on other problems. I think coy-without-shadows is a hack, but it does point out that there may be variations needed to some of the themes. So you might want to think about that in a general sense going forward; maybe each of the themes have customizable options on the download page or something.

In any case the most important thing for the short terms is to document the problems in a visible way and explain how to turn the shadows off.

@RunDevelopment
Copy link
Member Author

I'm just following the instructions in #894 (which I opened after all the Coy shadow problems in #859).

And that works? I see that it disables the shadows but it doesn't change the background, so it should still be able to overlap with other elements if I'm not mistaken. I'll look into it.

@garretwilson
Copy link

And that works?

I haven't tried it in a while. When I last tried it I was using an old version of Prism. I just assumed it still worked. If not we have a bigger problem.

If it doesn't work then maybe you should provide a version of Coy after all that uses the same technique as the other themes but without the shadow.

@garretwilson
Copy link

it should still be able to overlap with other elements if I'm not mistaken.

I think the Coy theme always overlapped other elements, correct? That's why usually I would float the Prism block e.g. to the left if I had something I wanted it to wrap around.

This problem with the shadow is not that the code block overlapped with a float (because that always happened, unfortunately), but that the shadow didn't match up with the code block dimensions and therefore didn't look like a shadow.

@RunDevelopment
Copy link
Member Author

Yes, they still overlap.

image

I'll make a PR for a version of Coy without shadows.
Only problem: Right now, the download page doesn't support themes from Prism themes... This will be a little harder to bring to the download page.

@garretwilson
Copy link

Yes, they still overlap.

I can't say 100%, but I'm pretty sure that two or three years ago the overlap would occur but the code would also extend to fill that white space!

So did something change in the past couple of years? If as you say the <pre> is a block element and shouldn't wrap around the floats, then why is the Coy code section cut of or pushed to the left? I would almost swear that it didn't use to work like that.

@garretwilson
Copy link

See, look at #866. I'm pretty sure that the Coy theme would reach right through the float. Why doesn't it work that way anymore? One could argue that this is the correct behavior, even though I don't like it.

@garretwilson
Copy link

In fact #866 wouldn't be so bad if I could change the Z order somehow and have my floats go on top of Prism.

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

Successfully merging this pull request may close these issues.

3 participants