CSS and Style.


SimonF

Recommended Posts

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 by SimonF
Link to comment

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

 

 

Link to comment
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.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.