Thursday, October 15, 2015

datatables duplicate bootstrap sort icons


  conflict between DataTables CSS and sb-admin2.css CSS file both using sorting_descand/or sorting_asc classes. 
Inspect the CSS rules using your browser's developer tools and find the offending CSS file.





conflict. both define datatables sorting rules



solution:

sb-admin-2.css, 

remove line 232-257
/*
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
    background: 0 0;
}

table.dataTable thead .sorting_asc:after {
    content: "\f0de";
    float: right;
    font-family: fontawesome;
}

table.dataTable thead .sorting_desc:after {
    content: "\f0dd";
    float: right;
    font-family: fontawesome;
}

table.dataTable thead .sorting:after {
    content: "\f0dc";
    float: right;
    font-family: fontawesome;
    color: rgba(50,50,50,.5);
}

    */

No comments: