Set gridlines, striped, smaller paddings per Default for Datatable

Post Reply
User avatar
T.dot
Expert Member
Posts: 620
Joined: 01 Feb 2012, 15:39
Location: Vienna/Austria

26 Nov 2021, 14:22

I though I could use the "Omega" layout as a drop-in replacement for the "Omega" theme in PF 10. Turns out that the just share the name and that won't work as the used theme is "saga" (as far as I understand that).

For example the databale looks completely different. I need a table with smaller paddings, striped rows and gridlines. So I found that I could use "gridlines (.ui-datatable-gridlines), striped rows (.ui-datatable-striped) and smaller paddings (ui-datatable-sm)".

Is there any possibility to use this as default for all my datatables without changing every page?
I know that I could copy the CSS from the theme (body .ui-datatable.ui-datatable-striped .ui-datatable-data > tr.ui-datatable-odd ...... ) to my own CSS file and remove the ".ui-datatable-striped". But that would destroy the idea of having a global theme for that?

Thanks!

mert.sincan
Posts: 4860
Joined: 29 Jun 2013, 12:38

24 Dec 2021, 15:20

Hi,

You can change sass variables related to datatable. Then, please provide new theme files.
Exp;

Code: Select all

$datatableBodyCellBorderWidth: 1px;  /* For gridlines -> default: 0 0 1px 0 !default , Line 451*/
Best Regards,

Post Reply

Return to “Omega - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest