4
$\begingroup$

I can style every part of an UI separately. But it is not handy and it would be nice to have list of Heads which are not inheriting at all or even partly.

Are there any rules about inheritance?

Column[{
  "text",
  Panel["panel"],
  Framed["framed"],
  Dynamic["dynamic"],
  Button["button"],
  PopupMenu["", {}, "popupMenu_Default_Label"],
  PopupMenu[1, {1 -> "popupMenu_Value"}],
  Pane["Pane"],
  Graphics[Text@"graphics", Frame -> True]
  },
 BaseStyle -> {FontSize -> 60, FontColor -> Red, FontWeight -> Bold}, 
 Spacings -> 0
 ]

enter image description here

As we can see, sometimes everything is inherited, sometimes some things, like color but not font size and sometimes nothing.

Nice example is PopupMenu which does what it wants, and the best is Framed whose frame is colored according to FontColor :D

$\endgroup$
  • $\begingroup$ Apart from the frame being red - which appears to be a bug --I don't see too many surprises. $\endgroup$ – Mike Honeychurch Feb 1 '15 at 21:45
  • $\begingroup$ @MikeHoneychurch Who said anything about bugs? :) And yes Im not surprised either but it would be nice to have some clean description what is asked. For me it was confusing that everything behaves differently. $\endgroup$ – Kuba Feb 1 '15 at 21:51
  • 1
    $\begingroup$ Off the top of my head base style is appended to other specific styles so that will never work. It would need to be prepended. $\endgroup$ – Mike Honeychurch Feb 1 '15 at 21:58
  • $\begingroup$ @MikeHoneychurch What do you mean by "specific styles"? p.s. I'm not looking for some kind of setup for MMA as HTML+CSS is. I just want to create simple cheatsheet what user should expect. $\endgroup$ – Kuba Feb 2 '15 at 10:14
  • $\begingroup$ away and on phone but by specific styles i mean the styles for popup, pane, panel and so on. I think you can put all this together from the docs but not all in one place as you want $\endgroup$ – Mike Honeychurch Feb 2 '15 at 22:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.