Why is the CSS Transition on background-size not working?

Question!

Demo: [http://everythinghomegrown.com/] (look at the Customize Your Own section with the four batman images)

For some reason, the background-size is not transitioning. Instead it jumps from one size to the other without a smooth transition.


div {
  background-size: 100%;
  transition: all 0.2s ease;
}

div:hover, div:focus {
  background-size: 115% 115%;
}

Why is the transition not working? I’m experiencing this in Chrome, Safari, and Firefox.



Answers

Solved.

Originally I had this:

div {
  background-size: 100%;
  transition: all 0.2s ease;
}

div:hover, div:focus {
  background-size: 115% 115%;
}

I fixed the problem by adding a second value to the background-size property.

div {
  background-size: 100% 100%; /* added second 100% to fix the problem */
  transition: all 0.2s ease;
}

div:hover, div:focus {
  background-size: 115% 115%;
}


I thought it might be smarter to have the parent process prepend output from the child process.

I guess it depends on how you judge "smart". It might be simpler to just make the child prepend the desired text to its outputs.

I don't want to redirect the output because seeing the output inline with the parent process is beneficial. What's the best way to do this?

When two processes share an open file, both access it independently, regardless of the nature of the relationship between those processes. Thus, if your child inherits the parent's stdout, the parent has no mechanism even to notice that the child is sending output, much less to modify that output.

If you want the parent to handle this, you would need to pass the child's output through the parent. You could do that by creating a pipe, and associating the child's stdout with the write end of that pipe. The parent would then need to monitor the read end, and forward suitably-modified outputs to its own stdout. The parent would probably want to create a separate thread for that purpose.

Additionally, if the child sometimes produces multi-line outputs that you want prefixed as a group, rather than per-line, then you'd probably need to build and use some kind of protocol for demarcating message boundaries, which would make the whole parent-moderation idea pretty pointless.



Couldn't you define #define printf(a) printf("your text:" a).

Other alternative I can think of is using dup

You open the same log file in your child process and dup your stdout to new file descriptor.



This video can help you solving your question :)
By: admin