- This topic has 23 replies, 3 voices, and was last updated 3 years, 4 months ago by Tom.
-
AuthorPosts
-
December 5, 2020 at 11:52 am #1568728TomLead DeveloperLead Developer
I’ll see if this is something we can improve in the theme itself (styling for the Classic editor isn’t easy, and isn’t something we’ve done much of, ever). However, we’re not looking at another big theme update for a few months.
For now, your only option would be to use a child theme with a custom editor style – that way you could style the table exactly as needed in the editor.
December 5, 2020 at 2:02 pm #1568806GeoffTom
You shouldn’t be working on a Saturday, have some time off! For completeness, I would add that tables display correctly in the block editor. It’s just the Classic editor that is the problem.December 6, 2020 at 12:22 pm #1569617TomLead DeveloperLead DeveloperIt’s possible that the table CSS we have here is out of date: https://github.com/tomusborne/generatepress/blob/3.0.2/assets/css/admin/editor-style.css#L30-L50
You can try removing it on your server to see if that’s the case. If it is, we can remove it in the next GP update ๐
December 6, 2020 at 3:35 pm #1569696GeoffTom
Thanks. I have looked at your link I think the problem might be that you have ‘table-layout: fixed;’. I have tried to change it to ‘table-layout: auto;’ but I cannot quite work out the additional CSS required to do this.December 7, 2020 at 1:12 pm #1570830TomLead DeveloperLead DeveloperCan you try replacing the table CSS in there with what the theme does on the frontend?: https://github.com/tomusborne/generatepress/blob/3.0.2/assets/css/main.css#L190-L215
Wonder if it would offer more consistent results.
Let me know ๐
December 9, 2020 at 8:50 am #1573147GeoffTom
Thanks for the suggestion. As indicated previously, I don’t have a child theme at the moment so cannot determine if it is effective or not. However, a member of my blogging team, with far more experience of programming than I have, is considering developing one but it is unlikely to be available until sometime in the New Year (if at all).
I assume in view of your previous comment that it is not feasible to change the ‘table-layout: fixed;’ to ‘table-layout: auto;’ by using additional CSS/PHP (the latter via the Code Snippets plugin).December 9, 2020 at 12:01 pm #1573385TomLead DeveloperLead DeveloperUnfortunately, due to the way the Classic Editor works, it’s only possible to add CSS to it via the editor style function in a child theme.
There’s no way that I’m aware of to add CSS to it using another method.
December 9, 2020 at 1:34 pm #1573544GeoffTom
Many thanks for your time spent, and input, on this issue. I will wait to see what a child theme may bring, should there be one. In the meantime, I will mark this post as resolved and will create a new one if there is any relevant feedback.December 10, 2020 at 10:16 am #1574671TomLead DeveloperLead DeveloperSounds good – thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.