Skip to main content
Commonmark migration
Source Link
  • Button(Box)'s Appearance is inserted explicitly during typesetting

    Button(Box)'s Appearance is inserted explicitly during typesetting

    which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

  • cell's top CellMargin behavior in presence of PageBreakAbove -> True in that cell.

    cell's top CellMargin behavior in presence of PageBreakAbove -> True in that cell.

    See: 154542. Quick fix is to add CellElementSpacings -> {"ClosedGroupTopMargin" -> 100} option.

See: 154542. Quick fix is to add CellElementSpacings -> {"ClosedGroupTopMargin" -> 100} option.

  • Button(Box)'s Appearance is inserted explicitly during typesetting

which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

  • cell's top CellMargin behavior in presence of PageBreakAbove -> True in that cell.

See: 154542. Quick fix is to add CellElementSpacings -> {"ClosedGroupTopMargin" -> 100} option.

  • Button(Box)'s Appearance is inserted explicitly during typesetting

    which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

  • cell's top CellMargin behavior in presence of PageBreakAbove -> True in that cell.

    See: 154542. Quick fix is to add CellElementSpacings -> {"ClosedGroupTopMargin" -> 100} option.

added 593 characters in body
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
  • "DockedCell" style is inserted in every DockedCell before any explicit style.

    So either you overwrite "DockedCells" in your stylesheet or use explicit options in Cell, see "DockedCell" example.

  •  
  • "InlineCell" same story but less problematic as "InlineCell" styles are less invasive. So keep that in mind when defining custom DefaultInlineCellStyle.

    "InlineCell" same story but less problematic as "InlineCell" styles are less invasive. So keep that in mind when defining custom DefaultInlineCellStyle.
  •  
  • "InlineCellEditing" as above if you want to adjust/switch of orange-ish background that appears during edition you need to modify this style even even for custom DefaultInlineCellStyle

    "InlineCellEditing" as above if you want to adjust/switch of orange-ish background that appears during edition you need to modify this style even even for custom DefaultInlineCellStyle
  •  
  • All style + FormatType issue, see topic linked below for full explanation. TL;DR;? better do not use All.

    All style + FormatType issue, see topic linked below for full explanation. TL;DR;? better do not use All.

which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

  • cell's top CellMargin behavior in presence of PageBreakAbove -> True in that cell.

See: 154542. Quick fix is to add CellElementSpacings -> {"ClosedGroupTopMargin" -> 100} option.

  • : notebook's WindowSize->All ignores the very bottom CellMargins

    see more in 112593

  • DockedCell on Windows can't be White 160356
  • "DockedCell" style is inserted in every DockedCell before any explicit style.

    So either you overwrite "DockedCells" in your stylesheet or use explicit options in Cell, see "DockedCell" example.

  • "InlineCell" same story but less problematic as "InlineCell" styles are less invasive. So keep that in mind when defining custom DefaultInlineCellStyle.

  • "InlineCellEditing" as above if you want to adjust/switch of orange-ish background that appears during edition you need to modify this style even even for custom DefaultInlineCellStyle

  • All style + FormatType issue, see topic linked below for full explanation. TL;DR;? better do not use All.

which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

  • "DockedCell" style is inserted in every DockedCell before any explicit style.

    So either you overwrite "DockedCells" in your stylesheet or use explicit options in Cell, see "DockedCell" example.

  •  
  • "InlineCell" same story but less problematic as "InlineCell" styles are less invasive. So keep that in mind when defining custom DefaultInlineCellStyle.
  •  
  • "InlineCellEditing" as above if you want to adjust/switch of orange-ish background that appears during edition you need to modify this style even even for custom DefaultInlineCellStyle
  •  
  • All style + FormatType issue, see topic linked below for full explanation. TL;DR;? better do not use All.

which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

  • cell's top CellMargin behavior in presence of PageBreakAbove -> True in that cell.

See: 154542. Quick fix is to add CellElementSpacings -> {"ClosedGroupTopMargin" -> 100} option.

  • : notebook's WindowSize->All ignores the very bottom CellMargins

    see more in 112593

  • DockedCell on Windows can't be White 160356
added 1540 characters in body
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

Exceptions in the standard stylesheet/style inheritance stack

Quick list of deviations

Feel free to add anything, try to make it short and if needed add examples or more explanation at the end of the answer.

  • "DockedCell" style is inserted in every DockedCell before any explicit style.

    So either you overwrite "DockedCells" in your stylesheet or use explicit options in Cell, see "DockedCell" example.

  • "InlineCell" same story but less problematic as "InlineCell" styles are less invasive. So keep that in mind when defining custom DefaultInlineCellStyle.

  • "InlineCellEditing" as above if you want to adjust/switch of orange-ish background that appears during edition you need to modify this style even even for custom DefaultInlineCellStyle

  • All style + FormatType issue, see topic linked below for full explanation. TL;DR;? better do not use All.

Points from above, with a little background, are mentioned in Order/Dependency of Styles in a Stylesheet.

  • "DockedCell"Button(Box)'s style is inserted in every DockedCellAppearance before any explicit style.is inserted explicitly during typesetting

So either you overwrite "DockedCells" in yourwhich makes it impossible to set Button's appearance via a stylesheet or use explicit options instyle with outer CellButtonBoxOptions, see. You need to set Appearance -> Inherited to do so. See Button Appearance example 1.

Motivation

The idea and scheme is quite simple see: tutorial / WorkingWithStylesheets / Inheritance

But there is no way to check where current setting for e.g. FontSize comes from. Which makes 'debugging' styles extremely painful. Any exception from the simple scheme makes it even worse, that is why one needs to know what to expect.

Examples

1. Docked Cells- "DockedCell"

CreateDocument[{},
 DockedCells -> Cell["test", "myDockedCell"],
 StyleDefinitions -> Notebook[{
    Cell[StyleData[StyleDefinitions -> "Default.nb"]],
    Cell[StyleData["myDockedCell"], Background -> Red, FontSize -> 30]
    }]
 ]

The docked cell is gray despite stylesheet Background spec for myDockedCell, FontSize works well. That is because "DockedCell" style has Background option.

So every Cell[content, style, opts] inside DockedCells effectively becomes Cell[content, "DockedCell, style, opts]...

- Button Appearance

Style[
 Button["LabeL", Print[1]],
 ButtonBoxOptions -> {ImageSize -> {200, 200}, Appearance -> "FramedPalette"}
]

ImageSize is respected but Appearance not, you need Button["LabeL", Print[1], Appearance -> Inherited] to make it work but then you ask yourself, why bother with nice setup and not create myButton function and put all stuff there?

Official classification of the issue: 116030#comment315233_116030

Exceptions in the standard stylesheet/style inheritance stack

Quick list of deviations

Feel free to add anything, try to make it short and if needed add examples or more explanation at the end of the answer.

  • "DockedCell" style is inserted in every DockedCell before any explicit style.

So either you overwrite "DockedCells" in your stylesheet or use explicit options in Cell, see example 1

Motivation

The idea and scheme is quite simple see: tutorial / WorkingWithStylesheets / Inheritance

But there is no way to check where current setting for e.g. FontSize comes from. Which makes 'debugging' styles extremely painful. Any exception from the simple scheme makes it even worse, that is why one needs to know what to expect.

Examples

1. Docked Cells

CreateDocument[{},
 DockedCells -> Cell["test", "myDockedCell"],
 StyleDefinitions -> Notebook[{
    Cell[StyleData[StyleDefinitions -> "Default.nb"]],
    Cell[StyleData["myDockedCell"], Background -> Red, FontSize -> 30]
    }]
 ]

The docked cell is gray despite stylesheet Background spec for myDockedCell, FontSize works well. That is because "DockedCell" style has Background option.

So every Cell[content, style, opts] inside DockedCells effectively becomes Cell[content, "DockedCell, style, opts]...

Exceptions in the standard stylesheet/style inheritance stack

Quick list of deviations

Feel free to add anything, try to make it short and if needed add examples or more explanation at the end of the answer.

  • "DockedCell" style is inserted in every DockedCell before any explicit style.

    So either you overwrite "DockedCells" in your stylesheet or use explicit options in Cell, see "DockedCell" example.

  • "InlineCell" same story but less problematic as "InlineCell" styles are less invasive. So keep that in mind when defining custom DefaultInlineCellStyle.

  • "InlineCellEditing" as above if you want to adjust/switch of orange-ish background that appears during edition you need to modify this style even even for custom DefaultInlineCellStyle

  • All style + FormatType issue, see topic linked below for full explanation. TL;DR;? better do not use All.

Points from above, with a little background, are mentioned in Order/Dependency of Styles in a Stylesheet.

  • Button(Box)'s Appearance is inserted explicitly during typesetting

which makes it impossible to set Button's appearance via a stylesheet or style with outer ButtonBoxOptions. You need to set Appearance -> Inherited to do so. See Button Appearance example.

Motivation

The idea and scheme is quite simple see: tutorial / WorkingWithStylesheets / Inheritance

But there is no way to check where current setting for e.g. FontSize comes from. Which makes 'debugging' styles extremely painful. Any exception from the simple scheme makes it even worse, that is why one needs to know what to expect.

Examples

- "DockedCell"

CreateDocument[{},
 DockedCells -> Cell["test", "myDockedCell"],
 StyleDefinitions -> Notebook[{
    Cell[StyleData[StyleDefinitions -> "Default.nb"]],
    Cell[StyleData["myDockedCell"], Background -> Red, FontSize -> 30]
    }]
 ]

The docked cell is gray despite stylesheet Background spec for myDockedCell, FontSize works well. That is because "DockedCell" style has Background option.

So every Cell[content, style, opts] inside DockedCells effectively becomes Cell[content, "DockedCell, style, opts]...

- Button Appearance

Style[
 Button["LabeL", Print[1]],
 ButtonBoxOptions -> {ImageSize -> {200, 200}, Appearance -> "FramedPalette"}
]

ImageSize is respected but Appearance not, you need Button["LabeL", Print[1], Appearance -> Inherited] to make it work but then you ask yourself, why bother with nice setup and not create myButton function and put all stuff there?

Official classification of the issue: 116030#comment315233_116030

Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751
Loading
Post Made Community Wiki by Kuba