Hi,
thanks for your post, and sorry for the trouble, especially as you experienced data loss, at it looks like 🙁 This is obviously never what I want.
Unfortunately, I have no real idea why this happened, and don’t know a way to get the CSS code back — unless you have a local backup, e.g. to a downloaded file, or unless your site is still available in e.g. the Google cache or the Internet Archive’s Wayback Machine. In that case, they might have a copy of the CSS file that maybe could be retrieved.
Now, commenting out CSS code in the TablePress “Custom CSS” is no problem, normally. I’m doing it regularly on my sites as well. It’s just important to not break the structure of the CSS (e.g. by then accidentally nesting the { and }). However, that shouldn’t really happen if you use the proper comment syntax, like
/* This code makes the text red. Also a command for bold font-weight is commented out. */
.tablepress tbody td {
color: #ff0000;
/* font-weight: bold; */
}
This example has two common comment scenarios, an explaining comment at the top, and commenting out a single CSS property, which is then not used.
Note how the comments also have an ending */. You don’t mention using that in your post, but only the /* at the beginning. Did you maybe not include the */ to end the comment?
Regards,
Tobias
You’re exactly right – I didn’t include the */ (didn’t think it was necessary as I was commenting out the entire thing). My mistake!
It’s not tooo much code, so it won’t take terribly long to rewrite it. Thanks for your helpful feedback. Sounds like it was an error on my part and not on yours. I’ll go ahead and rate TablePress!
Hi,
no problem, you are very welcome! 🙂 Good to hear that this helped!
Best wishes,
Tobias