dashed-slug.net › Forums › Exchange extension support › Suggestion UI Exchange Tables Fixed Headings
Tagged: css, fixed, table headers
- This topic has 4 replies, 2 voices, and was last updated 5 years, 8 months ago by alexg.
-
AuthorPosts
-
December 24, 2018 at 1:07 pm #5370megeanwassonParticipant
Hey Alex, Great work as always with the updates 🙂
The table thead headings should be fixed in place for better UI experience 🙂
I think everyone will benefit from this small tweak 🙂I currently add it manually but would be usefull to have it coded in your side 🙂
This is the css I add to fix the headings.
In the Exchange CSS Styling can you add
.dashed-slug-wallets-exchange thead th { position: sticky; top: 0;}
after
.dashed-slug-wallets-exchange table tbody{font-family:Consolas,"Liberation Mono",Courier,monospace}
Currently I need to add that each time you send updates.
December 24, 2018 at 5:01 pm #5372alexgKeymasterThank you for contributing this CSS.
You should never be editing the plugin or any theme, for the reason that you describe above. If you need to add any CSS rules simply add it as a child theme to your main theme. This way the changes do not get overwritten each time. There is a reason that CSS is called “Cascading”. You can cascade multiple style sheets 😉
Having said this, I have already considered in the past making the headers fixed, and this caused some problems with some themes. I will review this again and I might add it as an option.
with regards
December 26, 2018 at 8:21 pm #5376megeanwassonParticipantHi Alex,
Thanks, I have tried it in child theme css and also in customise override css, but some days it does not work for some weird reason, so I hard code it in for consistancy.
I will have a look at theme again maybe something in the theme is messing with it 🙂
Have a great rest of your week 🙂December 27, 2018 at 12:03 pm #5380alexgKeymasterHello,
About the child theme, what you are experiencing is a race condition. Sometimes your css is loaded first and sometimes after the plugin’s css. Normally as a programmer when you enqueue stylesheets in WordPress you can specify a graph of dependencies between various assets so that this does not happen. In this case, the solution would be to correct the specificity of the rule so that it always overrides whatever rules already apply.
This is not necessary, After some testing I have determined that your suggestion does not cause problems in most themes and I will include it in the next patch.
Thank you. Hope you have great holidays.
with regards
January 28, 2019 at 3:40 pm #5654alexgKeymasterI have included your CSS suggestion in the latest version
0.6.0-beta
of the Exchange extension. Thank you! -
AuthorPosts
- You must be logged in to reply to this topic.