I set the css for the jquery dialog in its activation only; i think that this is the proper way.
Example from wp-photo-album-plus/js/wppa-tinymce-shortcodes.js:
// Add the wppa button to the mce editor
tinymce.PluginManager.add('wppagallery', function(editor, url) {
function openWppaShortcodeGenerator() {
var opt = {
modal: true,
resizable: true,
width: 720,
show: {
effect: "fadeIn",
duration: 400
},
closeText: "",
close: function(event,ui) {
},
open: function(event,ui) {
wppaGalleryEvaluate();
}
};
jQuery( "#wppagallery-form" ).dialog(opt).dialog( "open" );
jQuery( '.ui-widget-header' ).css( {
background: 'none',
});
jQuery( '.ui-dialog' ).css( {
boxShadow: '0px 0px 5px 5px #aaaaaa',
borderRadius: wppaBoxRadius+'px',
padding: '8px',
backgroundColor: wppaModalBgColor,
boxSizing: 'content-box',
zIndex: 100000,
});
jQuery( '.ui-dialog-titlebar' ).css( {
lineHeight: '0px',
height: '24px',
fontSize: '18px',
fontWeight: 'bold',
});
jQuery( '.ui-dialog-title' ).css( {
position: 'absolute',
top: '15px',
fontSize: '18px',
fontWeight: 'bold',
});
jQuery( '.ui-button' ).css( {
backgroundImage: wppaModalQuitImg,
padding: 0,
position: 'absolute',
right: '8px',
top: '20px',
width: '16px',
height: '16px',
});
jQuery( '.ui-widget-overlay' ).css( {
background: 'none',
});
jQuery( '.ui-button' ).attr( 'title', 'Close' );
jQuery( '.ui-icon-closethick' ).css( {
display: 'none',
});
So this css only works when my dialog is active