title: Styling default JavaFX Dialogs
body: <p>I'm looking for a way to style the default JavaFX Dialog (<code>javafx.scene.control.Dialog</code>). </p>
  
  <p>I tried to get the DialogPane and add a stylesheet, but it covers only a small piece of the dialog. I would prefer to style only with an external css file and without to add styleClasses over the code. This would look messy (header, content, own content on the content and more..)</p>
  
  <p>I googled already alot and only found examples for ControlsFX, but since jdk8_40 JavaFX has it's own Dialogs i use them now. </p>
  
  <p>Any suggestions?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Since José Pereda posted the solution i created my own dialog.css.
  I'll post it here because it covers the whole dialog and maybe someone want's to copy&amp;paste it. Note .dialog-pane is already a given styleClass name so you don't need to apply your own. Of course, Josés is more fine detailed.</p>
  
  <pre><code>.dialog-pane {
      -fx-background-color: black;
  }
  
  .dialog-pane .label {
      -fx-text-fill: white;
  }
  
  .dialog-pane:header .header-panel {
      -fx-background-color: black;
  }
  
  .dialog-pane:header .header-panel .label {
      -fx-font-style: italic;
      -fx-font-size: 2em;
  }
  </code></pre>