-11

I submitted a CSS help post last night, but it got closed. I mentioned it was for an Electron app and provided the name for it. The app has Chrome developer tools available for inspecting elements. I didn't include HTML, just CSS and before and after screenshots and what I wanted help with. I got this removal message:

Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.

I decided not to include HTML in the post because neither the HTML nor CSS is in a vacuum. There's other CSS in the app that could be getting in the way of what I was trying to do. I thought it was possible that if someone provided a CSS solution with HTML I would've included, that there would be a chance of it not working due to interference from other CSS in the app.

10
  • 4
    The point is that Electron apps come with about 4.2 MB of CSS on average and that nobody can say anything useful about said layout without all relevant HTML and CSS.
    – CodeCaster
    Apr 19 at 22:08
  • 8
    I mean... Can your problem be presented using just html and css, ignoring that electron is even relevant to your usecase? What significance does electron have to your css problem?
    – Kevin B
    Apr 19 at 22:18
  • @CodeCaster It's that I want people to look at the HTML and CSS in the app if they have a possible solution, so that they can try it and see if it works. CSS to solve my problem could work in a vacuum but not in the app if they don't test it there.
    – Oneechan69
    Apr 19 at 22:22
  • @KevinB It's that I want people to look at the HTML and CSS in the app if they have a possible solution, so that they can try it and see if it works. CSS to solve my problem could work in a vacuum but not in the app if they don't test it there.
    – Oneechan69
    Apr 19 at 22:22
  • 8
    that indicates that you haven't created a minimally reproducible scenario. it's very important for this reason for such work to be done on your end first before asking, we can't possibly be expected to understand every aspect of your page/css layout to fix this one specific issue.
    – Kevin B
    Apr 19 at 22:25
  • @KevinB So I should include the HTML too even if it could be affected by the CSS in the app that I couldn't find or narrow down? If so, should I copy all of the rules for all the elements that appear in dev tools?
    – Oneechan69
    Apr 19 at 22:27
  • Ideally, you should use a process of elimination to determine what does and doesn't have an impact on the problem you are seeing, cutting the problem down to a relatively small number of elements
    – Kevin B
    Apr 20 at 5:24
  • 3
    No, you shouldn't include the HTML, or the CSS, or the Javascript. Instead, create a brand new program with just a little bit of code that exactly demonstrates the issue you are having, then post all the code of that.
    – mousetail
    Apr 20 at 6:01
  • @mousetail create a new program? It's not my Electron app, and its closed source.
    – Oneechan69
    Apr 20 at 13:38
  • 2
    @Oneechan69 Your example should be self-sufficient. Since you can't include the entirety of your existing program, you need to make a new one. Especially if it's closed source
    – mousetail
    Apr 20 at 13:42

1 Answer 1

7

First, a quick side note: it's hard for me to understand the problem from your example screenshots and textual description. You say "It should be blurring the text but it doesn't."; but what I see is that text that was black has now become grey with a lighter grey cloud surrounding it. The CSS you show says blur(10px) in it, and the cloud seems to be plausibly that thickness around the letters. So I can't really envision exactly what you want it to look like instead.

As for the cited reason for closure: there's a theme here. We do not offer "help"; we answer a question. Every question needs to be self-contained. If it is a question about existing code, then the relevant code needed to demonstrate the problem (as described in How to create a Minimal, Reproducible Example) needs to be in the question itself.

I mentioned it was for an Electron app and provided the name for it.

The question here isn't about you and isn't about your app. If you're trying to figure out an issue with CSS, the question is about that CSS.

Questions about CSS should generally include some HTML in the example, because to the extent that using CSS is "programming" (it's not conventionally what programmers think of as such, but...), the HTML is the "input" for that program.

I decided not to include HTML in the post because neither the HTML nor CSS is in a vacuum. There's other CSS in the app that could be getting in the way of what I was trying to do.

Before posting, it is your responsibility to test that hypothesis. Open an editor and create an example with just the CSS that seems to be causing the problem and some corresponding HTML. Send it to a web browser.

Does the problem appear? Nice, you've already made great progress towards an MRE. Figure out whether you still have a question; then start narrowing down what part of the CSS is causing the problem, and what minimal HTML example is needed to demonstrate the problem.

It doesn't? Then go back to the app, open the debugging tools and see what the computed properties are for the things that have the wrong layout. Can you directly write CSS that specifies the final result? Can you reproduce the problem that way? Do you understand why there is a problem with those computed properties? Then, figure out:

  • Do I have a question about why these final properties behave this way? If so, narrow down which properties are relevant, and proceed as in the first step.

  • Do I have a question about why the properties get computed like this? Then figure out what CSS sources are interacting to get combined in this way, and make the example based around that.

  • Etc.

According to the specific thing that confuses you about the result, narrow it down further. As much as possible.

I thought it was possible that if someone provided a CSS solution with HTML I would've included, that there would be a chance of it not working due to interference from other CSS in the app.

There's a tag, and you already explained that much about the context. Developers familiar with common Electron gotchas (assuming there are any) would naturally take that sort of thing into account when answering.

But again: our goal is not to make the CSS in your Electron app work. Our goal is to provide an answer to a question about:

  • How do I do X with CSS?

  • Why does Y CSS (including the relevant portion contributed by Electron) unexpectedly cause Z result (or an error)?

You can ask multiple such questions, one at a time, as long as they meet the site standards. But it is your responsibility to a) check for already-existing Q&A for those questions; b) translate the problem you are encountering into such questions, and the answers back into a working Electron app.

1
  • I really appreciate this answer, I learned a lot from it. With all of this in mind, I reposted the question. I provided CSS I applied to the app, and compared it to the CSS and HTML copied from the app into a snippet on Google Chrome. Maybe I missed point(s) of your question but I tried. stackoverflow.com/questions/76078427/…
    – Oneechan69
    Apr 22 at 7:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .