jQuery UI CSS

jQuery UI CSS

DaimianDaimian Posts: 62Questions: 1Answers: 15

Allan, with the jQuery UI CSS file you are overriding any theme settings sometimes - is this intended?

Example:
.DTTT_button {
position: relative;
float: left;
margin-right: 3px;
padding: 3px 10px;
border: 1px solid #d0d0d0;
background-color: #fff;
color: #333 !important;
cursor: pointer;
}

The "color: #333 !important" overrides all theme text coloring (my custom created jQuery UI Theme button text coloring is white)

This question has accepted answers - jump to:

Answers

  • anaganag Posts: 48Questions: 2Answers: 7
    Answer ✓

    Load your custom css file lower than datatables CSS and place !important in your styles. Or remove !important from datatables CSS.

    !important is only used a very small amount of times in dataTables.jqueryui.css so just overwrite with your own CSS or remove it. Those are two simple options.

  • DaimianDaimian Posts: 62Questions: 1Answers: 15

    You are correct, that would solve the issue.

    However I was hoping Allan would either state his reason for using !important or change dataTables.jqueryui.css.

    !important should never be used in production since it can have unexpected results.

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin
    Answer ✓

    Yes that should be removed. I'll look into a fix. Thanks for flagging this up.

    Allan

  • DaimianDaimian Posts: 62Questions: 1Answers: 15

    Thanks Allan!

  • allanallan Posts: 61,697Questions: 1Answers: 10,102 Site admin

    Fixed committed. There are still one or two !important statements, but I think they are okay as they are. The integration is ever evolving though, so do let me know if there are other improvements that can be made!

    Allan

This discussion has been closed.