July 29, 20214 yr Are there any guides for plugins? <style> table.snapshot{margin-top:0;} table.snapshot thead tr>td{text-align:left;width:8%;} table.snapshot tr>td+td{text-align:center;} table.snapshot tr>td+td+td{text-align:center;} table.snapshot tr>td+td+td+td{text-align:center;} table.snapshot tr>td+td+td+td+td+td+td{text-align:center;} table.snapshot tr>td+td+td+td+td+td+td+td{text-align:center;} table.snapshot tr>td+td+td+td+td+td+td+td+td{text-align:left;} table.snapshot tr>td+td+td+td+td+td+td+td+td+td+td+td{text-align:center;} </style> how do I add zebre strip i.e. ntg-child for this table. Looks like this works. //table.snapshot tr td:empty { width: 50px; } table.snapshot tr:nth-child(odd) { background-color: #FFF; } //table.snapshot tr td { padding-top: 10px; padding-bottom: 10px; } table.snapshot thead tr>td{text-align:left;width:8%;} table.snapshot tr>td+td{text-align:center;} table.snapshot tr>td+td+td{text-align:center;} table.snapshot tr>td+td+td+td{text-align:center;} table.snapshot tr>td+td+td+td+td+td+td{text-align:center;} table.snapshot tr>td+td+td+td+td+td+td+td{text-align:center;} table.snapshot tr>td+td+td+td+td+td+td+td+td{text-align:left;} table.snapshot tr>td+td+td+td+td+td+td+td+td+td+td+td{text-align:center;} Edited July 29, 20214 yr by SimonF
July 30, 20214 yr Author 18 hours ago, SimonF said: table.snapshot tr:nth-child(odd) { background-color: #FFF; } Can anyone advise where I should get the colour from based on Theme selected?
July 30, 20214 yr You're free to style a plugin any way you want so long as it doesn't interfere with the OS. (ie: don't override any css for classes that might exist on the banner / menu bar etc) You can get the current theme via <?$display['theme']?>, so if you're using custom colours outside of what the dynamix defaults are then you'd have to use custom CSS and conditionally select which colour to use. As a (very extreme) example, you can look at CA's CSS (/usr/local/emhttp/plugins/community.applications/skins/Narrow/css.php) Dynamix already includes the styling for its tables eg: https://github.com/limetech/webgui/blob/20f5374f72db2504a7273d4c3bb92ed304bc9469/plugins/dynamix/styles/default-white.css#L128
July 30, 20214 yr Author 2 hours ago, Squid said: You're free to style a plugin any way you want so long as it doesn't interfere with the OS. (ie: don't override any css for classes that might exist on the banner / menu bar etc) You can get the current theme via <?$display['theme']?>, so if you're using custom colours outside of what the dynamix defaults are then you'd have to use custom CSS and conditionally select which colour to use. As a (very extreme) example, you can look at CA's CSS (/usr/local/emhttp/plugins/community.applications/skins/Narrow/css.php) Dynamix already includes the styling for its tables eg: https://github.com/limetech/webgui/blob/20f5374f72db2504a7273d4c3bb92ed304bc9469/plugins/dynamix/styles/default-white.css#L128 Thanks for the pointers.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.