Hi,
thanks for your post, and sorry for the trouble.
Yes, this is kind of expected. But ways are legal in CSS, see e.g. https://www.w3schools.com/cssref/pr_import_rule.asp, so that the shorter one is chosen to reduce the size.
Regards,
Tobias
Hi:
Thanks. From what I can tell, the import statements are then being stripped out of the stylesheet completely. It looks like the custom styles are being combined into the core tablepress style sheet and minimized. But the import statements are not being included at all. I think they should end up at the top of the combined stylesheet but they’re not there, nor anywhere else in the combined / minimized stylesheet.
Is it possible that is happening?
Hi,
Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!
Regards,
Tobias
Hi again,
I just tested this on a test site of mine, and can confirm the problem.
The @import
directive is saved, but it’s not added to the combined/minified version of the “Custom CSS”.
However, I have no idea why this is the case. My guess is that the external PHP library that TablePress uses for this either has a bug here or is removing it on purpose. I’ll have to investigate this more deeply, and therefore can not promise a quick solution. I’m really sorry.
Therefore, my suggestion would be to paste in the CSS that you wanted to import. This should also be better for performance, as it saves another HTTP request.
Regards,
Tobias
Hi:
Thanks for checking into this so quickly. We were pasting all the styles into the box but the amount of styles was getting quite large and unweildly for that tiny box (we’re applying styles for hundreds of different tables). So we thought it would be easier to manage them in external style sheets and take the extra loading time hit.
Now that we know its a bug and not something silly that we’re doing we can find a work-around and load them in a different way.
Thanks again!
Hi,
no problem! Another option could of course be to load them via WordPress functions (wp_enqueue_style()
) in your theme’s “functions.php”.
Regards,
Tobias