Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save havramar/9ba703dae8c7540b349e to your computer and use it in GitHub Desktop.
Save havramar/9ba703dae8c7540b349e to your computer and use it in GitHub Desktop.
Jenkins theme - table rows background highlight on hover
  1. Install Simple Theme Plugin.
  2. Put rows.css to .jenkins/userContent/rows.css.
  3. Go to http://localhost:8080/configure.
  4. URL of theme CSS set to http://localhost:8080/userContent/rows.css.
  5. Save and Reload page.
.bigtable tr:hover td {
background-color: aliceblue;
}
tr.build-row:hover td {
background-color: aliceblue;
}
table.global-matrix-authorization-strategy-table tr:hover td {
background-color: aliceblue;
}
tr.row-set-start:hover td {
background-color: aliceblue;
}
@thomas-riccardi
Copy link

I suggest the following changes:

  • don't specify td: it overrides the "Build history" progress bar which is implemented as a table
  • no need to specify tr.build-row:hover: it's already handled by the default theme (at least since current jenkins version 1.634)
  • use a more visible background color
    • either re-use the grey background color from official tr.build-row:hover: background: #e8e8e8 !important;
    • or re-use the blue background color from official .tabBar .tab a.addTab:hover: background: #d8efff

Final result:

.bigtable tr:hover {
  background: #e8e8e8 !important;
}

table.global-matrix-authorization-strategy-table tr:hover {
  background: #e8e8e8 !important;
}

tr.row-set-start:hover {
  background: #e8e8e8 !important;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment