Table of Contents

Class TwSpreadsheetTheme

Namespace
TwBlazor.Configuration.Components
Assembly
TwBlazor.dll

Theme configuration for the spreadsheet (TwSpreadsheet). Override any property to customize spreadsheet styles globally.

[ExcludeFromCodeCoverage]
public class TwSpreadsheetTheme
Inheritance
TwSpreadsheetTheme
Inherited Members

Remarks

The toolbar is made of other components with their own themes: TwToggleTheme for the toggles, toggle groups and toolbar buttons, TwInputTheme for the number format list and TwSeparatorTheme for the lines between groups. This theme holds the layout of the spreadsheet and the look of its grid.

Constructors

TwSpreadsheetTheme()

public TwSpreadsheetTheme()

Properties

AddSheetButton

Gets or sets the classes for the button after the sheet tabs that adds a sheet.

public required string AddSheetButton { get; set; }

Property Value

string

AlignCenter

Gets or sets the classes that line a cell's content up in its middle.

public required string AlignCenter { get; set; }

Property Value

string

AlignEnd

Gets or sets the classes that line a cell's content up at its end.

public required string AlignEnd { get; set; }

Property Value

string

AlignStart

Gets or sets the classes that line a cell's content up at its start.

public required string AlignStart { get; set; }

Property Value

string

Bold

Gets or sets the classes for bold cell text.

public string Bold { get; set; }

Property Value

string

Cell

Gets or sets the classes for every cell.

public required string Cell { get; set; }

Property Value

string

CellActive

Gets or sets the classes added to the active cell, the one typing goes into. It should not rely on colour alone, such as a thick outline. The grid has the group/sheet class, so the outline can change while the grid has focus with group-focus-within/sheet:, which is how keyboard users see where focus is.

public required string CellActive { get; set; }

Property Value

string

Remarks

The outline needs the 3:1 contrast ratio against the cell, since it is the grid's focus indicator.

CellEditor

Gets or sets the classes for the field that opens in a cell while it is edited.

public required string CellEditor { get; set; }

Property Value

string

CellError

Gets or sets the classes added to a cell that holds an error, such as #DIV/0!.

public string CellError { get; set; }

Property Value

string

Remarks

The text needs the 4.5:1 contrast ratio against the cell. The error code itself says what went wrong, so the colour is not the only sign.

CellFrozen

Gets or sets the classes added to cells in frozen rows and columns, which stay in view while the rest scrolls under them, so they need a solid background.

public required string CellFrozen { get; set; }

Property Value

string

CellNumber

Gets or sets the classes added to a cell that holds a number, such as tabular figures.

public string CellNumber { get; set; }

Property Value

string

CellSelected

Gets or sets the classes added to the cells in the selected range.

public required string CellSelected { get; set; }

Property Value

string

ColorItem

Gets or sets the classes for a colour in the text color and fill color menus, which line its swatch up with its name.

public required string ColorItem { get; set; }

Property Value

string

ColorSwatch

Gets or sets the classes for the colour swatch shown beside each colour in the text color and fill color menus.

public required string ColorSwatch { get; set; }

Property Value

string

ColumnHeader

Gets or sets the classes for a column heading, such as A.

public required string ColumnHeader { get; set; }

Property Value

string

Corner

Gets or sets the classes for the empty heading at the top left corner, which selects every cell.

public required string Corner { get; set; }

Property Value

string

Dialog

Gets or sets the classes for the dialog panel.

public required string Dialog { get; set; }

Property Value

string

DialogActions

Gets or sets the classes for the row of buttons at the bottom of a dialog. On small screens the buttons stack, full width.

public required string DialogActions { get; set; }

Property Value

string

DialogBackdrop

Gets or sets the classes for the layer behind a dialog, such as the confirmation before a sheet is deleted. On small screens it holds the dialog at the bottom, as a sheet.

public required string DialogBackdrop { get; set; }

Property Value

string

DialogBody

Gets or sets the classes for the area holding the fields of a dialog.

public required string DialogBody { get; set; }

Property Value

string

DialogButton

Gets or sets the classes for each dialog button, such as a taller height on small screens so it is easy to tap.

public required string DialogButton { get; set; }

Property Value

string

DialogClose

Gets or sets the classes for the close button at the top of a dialog. It needs a target of at least 24 pixels and a visible focus ring.

public required string DialogClose { get; set; }

Property Value

string

DialogHeader

Gets or sets the classes for the top of a dialog: its title and its close button.

public required string DialogHeader { get; set; }

Property Value

string

DialogText

Gets or sets the classes for the dialog message.

public required string DialogText { get; set; }

Property Value

string

Remarks

It needs the 4.5:1 contrast ratio against the panel.

DialogTitle

Gets or sets the classes for the dialog title.

public required string DialogTitle { get; set; }

Property Value

string

FieldError

Gets or sets the classes for the message under a field in a dialog that is not valid.

public required string FieldError { get; set; }

Property Value

string

Remarks

It needs the 4.5:1 contrast ratio against the panel.

FieldInput

Gets or sets the classes for a text field in a dialog. Text at least 16 pixels high keeps mobile browsers from zooming in.

public required string FieldInput { get; set; }

Property Value

string

FieldLabel

Gets or sets the classes for the label of a field in a dialog.

public required string FieldLabel { get; set; }

Property Value

string

FilterButton

Gets or sets the classes for the filter button in each table heading. Drawing it in the heading's own text colour (text-inherit, bg-current/15) keeps it readable when the heading is given a fill, since a filled cell gets black or white text, whichever reads better.

public required string FilterButton { get; set; }

Property Value

string

Remarks

It needs the 3:1 contrast ratio against the heading.

FilterButtonActive

Gets or sets the classes for the filter button of a column that is filtered. Its icon changes too, so the state does not rely on colour alone.

public required string FilterButtonActive { get; set; }

Property Value

string

FilterClear

Gets or sets the classes for the Clear filter button, on top of DialogButton, such as pushing it to the start of the row.

public required string FilterClear { get; set; }

Property Value

string

FilterConditions

Gets or sets the classes for the conditions editor in a column filter, such as putting each comparison and its value side by side on wider screens.

public required string FilterConditions { get; set; }

Property Value

string

FilterDialog

Gets or sets the classes for the filter dialog panel, on top of Dialog, such as a wider maximum width.

public required string FilterDialog { get; set; }

Property Value

string

FilterFooter

Gets or sets the classes for the buttons at the bottom of a column filter.

public required string FilterFooter { get; set; }

Property Value

string

FilterItem

Gets or sets the classes for each value in the list of a column filter, added to the root of its checkbox.

public required string FilterItem { get; set; }

Property Value

string

FilterList

Gets or sets the classes for the scrolling list of values in a column filter.

public required string FilterList { get; set; }

Property Value

string

FilterSearch

Gets or sets the classes for the field that narrows the list of values in a column filter.

public required string FilterSearch { get; set; }

Property Value

string

FilterSection

Gets or sets the classes for each section of a column filter: sort, conditions and values.

public required string FilterSection { get; set; }

Property Value

string

FilterSectionTitle

Gets or sets the classes for the small heading of each section of a column filter. It needs the 4.5:1 contrast ratio against the panel.

public required string FilterSectionTitle { get; set; }

Property Value

string

FilterSort

Gets or sets the classes for the row of sort buttons at the top of a column filter.

public required string FilterSort { get; set; }

Property Value

string

FontSelect

Gets or sets the classes added to the root of the font list in the toolbar, such as its width.

public string FontSelect { get; set; }

Property Value

string

FontSizeSelect

Gets or sets the classes added to the root of the font size list in the toolbar, such as its width.

public string FontSizeSelect { get; set; }

Property Value

string

Gets or sets the classes for the bar at the bottom that holds the sheet tabs, the selection summary and the zoom controls.

public required string Footer { get; set; }

Property Value

string

FormatSelect

Gets or sets the classes added to the root of the number format list in the toolbar, such as its width.

public string FormatSelect { get; set; }

Property Value

string

FormulaBar

Gets or sets the classes for the bar under the toolbar that holds the cell reference and the cell's contents.

public required string FormulaBar { get; set; }

Property Value

string

FormulaInput

Gets or sets the classes for the field that shows and edits the active cell's contents.

public required string FormulaInput { get; set; }

Property Value

string

FormulaMark

Gets or sets the classes for the fx mark between the cell reference and the cell's contents.

public string FormulaMark { get; set; }

Property Value

string

FrozenColumnEdge

Gets or sets the classes added to the last frozen column, such as a line along its end.

public string FrozenColumnEdge { get; set; }

Property Value

string

FrozenRowEdge

Gets or sets the classes added to the last frozen row, such as a line along its bottom marking where the frozen rows end.

public string FrozenRowEdge { get; set; }

Property Value

string

FullScreen

Gets or sets the classes added to Root in full screen mode, when the spreadsheet covers the window.

public required string FullScreen { get; set; }

Property Value

string

Grid

Gets or sets the classes for the grid's table, which takes focus while the user moves between cells.

public required string Grid { get; set; }

Property Value

string

Remarks

The grid's focus ring needs the 3:1 contrast ratio against the page.

HeaderSelected

Gets or sets the classes added to the column and row headings of the selection.

public required string HeaderSelected { get; set; }

Property Value

string

Italic

Gets or sets the classes for italic cell text.

public string Italic { get; set; }

Property Value

string

NameBox

Gets or sets the classes for the cell reference at the start of the formula bar, such as B3.

public required string NameBox { get; set; }

Property Value

string

ResizeHandle

Gets or sets the classes for the handle at the end of each column heading, dragged to resize the column.

public required string ResizeHandle { get; set; }

Property Value

string

Remarks

Keyboard users resize the active column from the context menu instead.

Root

Gets or sets the classes for the box around the toolbar, the formula bar, the grid and the sheet tabs.

public required string Root { get; set; }

Property Value

string

RowHeader

Gets or sets the classes for a row heading, such as 1.

public required string RowHeader { get; set; }

Property Value

string

RowResizeHandle

Gets or sets the classes for the handle at the bottom of each row heading, dragged to resize the row.

public required string RowResizeHandle { get; set; }

Property Value

string

Remarks

Keyboard users resize the active row from the context menu instead.

SheetTab

Gets or sets the classes for a sheet tab.

public required string SheetTab { get; set; }

Property Value

string

SheetTabActive

Gets or sets the classes added to the tab of the sheet being shown. It should not rely on colour alone.

public required string SheetTabActive { get; set; }

Property Value

string

SheetTabInput

Gets or sets the classes for the field that opens in a sheet tab to rename it.

public required string SheetTabInput { get; set; }

Property Value

string

SheetTabs

Gets or sets the classes for the group of sheet tabs inside the footer.

public required string SheetTabs { get; set; }

Property Value

string

StatusText

Gets or sets the classes for the summary of the selected numbers, such as their sum and average.

public required string StatusText { get; set; }

Property Value

string

Remarks

The text needs the 4.5:1 contrast ratio against the footer.

TableBand

Gets or sets the classes for every other row of a banded table.

public required string TableBand { get; set; }

Property Value

string

TableHeader

Gets or sets the classes for the heading row of a table. It needs a solid background and the 4.5:1 contrast ratio for its text, and room at the end for the filter button.

public required string TableHeader { get; set; }

Property Value

string

Toolbar

Gets or sets the classes for the toolbar: a row at the top that holds the controls (ToolbarItems) and, at its end, the More tools button (ToolbarMore). It has the data-expanded attribute while the user has expanded it, and the data-overflowing attribute while its controls do not fit on one line, so give it a named group (such as group/sheettoolbar) for ToolbarMore to use.

public required string Toolbar { get; set; }

Property Value

string

ToolbarGroup

Gets or sets the classes added to each TwToggleGroup<T> in the toolbar, which take away the group's own border and padding so the buttons sit directly on the toolbar. They need the important modifier (!), since they replace classes the toggle group sets itself.

public string ToolbarGroup { get; set; }

Property Value

string

ToolbarItems

Gets or sets the classes for the box holding the toolbar's controls. By default it stays on one line and scrolls sideways, without a scrollbar, when the controls do not fit.

public string ToolbarItems { get; set; }

Property Value

string

ToolbarItemsExpanded

Gets or sets the classes added to ToolbarItems while the user has expanded the toolbar with the More tools button, such as letting the controls wrap onto more lines.

public string ToolbarItemsExpanded { get; set; }

Property Value

string

ToolbarMore

Gets or sets the classes for the box around the More tools button at the end of the toolbar. By default it is hidden until the controls do not fit on one line, or while the toolbar is expanded.

public string ToolbarMore { get; set; }

Property Value

string

ToolbarSeparator

Gets or sets the classes for the line drawn between groups of toolbar controls.

public string ToolbarSeparator { get; set; }

Property Value

string

Underline

Gets or sets the classes for underlined cell text.

public string Underline { get; set; }

Property Value

string

Viewport

Gets or sets the classes for the scrolling area around the grid. Its scroll padding should match the height of the column headings and the width of the row headings, so the active cell is never scrolled under them.

public required string Viewport { get; set; }

Property Value

string

ViewportFullScreen

Gets or sets the classes added to the grid's scrolling area in full screen mode, so it fills the height left over by the toolbar and the footer.

public required string ViewportFullScreen { get; set; }

Property Value

string

ZoomControls

Gets or sets the classes for the group of zoom controls in the footer.

public required string ZoomControls { get; set; }

Property Value

string

ZoomLabel

Gets or sets the classes for the button between the zoom buttons that shows the zoom level and resets it.

public required string ZoomLabel { get; set; }

Property Value

string