0 votes
by (440 points)
Hey guys,

 

One question, can i make 2 or more different styles for Dialog box in the same story?

I try make this things (below) child of other things but i not work.

#ui-dialog-titlebar

 #ui-dialog-close

#ui-dialog-close:hover

#ui-dialog-body

#ui-dialog-body > *:first-child

 #ui-dialog-body hr

 

Thanks for Help...

1 Answer

0 votes
by (159k points)

There are a number of different techniques you could use to achieve the result you require but the all basically involve dynamically adding a know HTML attribute (like a CSS class) to either the dialog related HTML element or one of it's parents, and then using that information to create a custom CSS selector to style it.

eg. Assuming you want the background colour of the standard Save dialog to be green whenever it is opened while viewing a Passage that has been assigned a forest tag, then placing the following CSS within your Story Stylesheet will achieve that result.

body[data-tags="forest"] #ui-dialog-body {
	background-color: green;
}

note: Which method you use to add the HTML attribute (Passage tags, <<addclass>> macro, etc) and which part of the ui-dialog related HTML elements you want to change can effect the syntax and structure of the CSS selector needed.

We would need more detail about when you want the dialog styling to occur to give a more targeted answer.

...