Skip to content

How to add custom CSS onto perspective-viewer #2367

Answered by texodus
mhkeller asked this question in Q&A
Discussion options

You must be logged in to vote

The datagrid plugin is just a regular HTML <table> in the light DOM (virtualized via regular-table), you can style it with regular CSS in the document:

perspective-viewer table thead th {
    background-color: red;
}

You may need to be aggressive with specificity to override the rules provided by default.

Perspective adds several of metadata classes to the table elements during it's render phase as well, but these are not documented. The perspective-viewer-datagrd package CSS source has the default styles and some examples of things like e.g. column type matching.

Replies: 3 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@texodus
Comment options

@mhkeller
Comment options

@texodus
Comment options

@mhkeller
Comment options

@texodus
Comment options

Answer selected by mhkeller
Comment options

You must be logged in to vote
1 reply
@texodus
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants