css.adoc 814 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. [#dashboard-css]
  2. = Change component style
  3. You can change the style of any dashboard component by adding a `cssClass` property to the component. This is useful for styling actions, displays, fieldsets and folders. Here is an example of how to add a class to an action;
  4. [source,yaml]
  5. ----
  6. themeName: my-theme
  7. actions:
  8. - title: My Action
  9. shell: echo "Hello"
  10. dashboards:
  11. - title: My Dashboard
  12. contents:
  13. - title: My Fieldset
  14. type: fieldset
  15. contents:
  16. - title: My Action
  17. cssClass: big-button
  18. ----
  19. You can then create a theme, and add the following CSS to style the action;
  20. [source,css]
  21. .`custom-webui/themes/my-theme/theme.css`
  22. ----
  23. .big-button {
  24. background-color: red;
  25. color: white;
  26. font-size: 20px;
  27. grid-column: span 2;
  28. grid-row: span 2;
  29. }
  30. ----