biegehydra/EasyCsv-Dotnet

CsvTableHeaderMatcher custom styles

Closed this issue · 1 comments

Is there a way to provide custom styles to the CsvTableHeaderMatcher? When there is a long string of text provided for a column, the Preview Information is to wide and makes the Csv Headers to small to read what they are matched to.

image

In this commit, which is live in version 2.0.0-beta8.2, I changed the default css to give the Default Value column and Csv Headers column a width of arround 220px. I also added this css to the preview information container.

  .preview-information-container {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3; /* Number of lines before truncation */
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

The end result is something like this. If you would like to further configure the css, every Td and Th now has a unique css class that you can configure, e.g. ".preview-information-th" and ".preview-information-td"
Screenshot_2

I reckon you might want an additional restriction on the width of the preview information th. Maybe something like:

.preview-information-th {
        max-width: 300px;
}