Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align column table header to the left and change sort arrow position from left to right #69

Open
kaede28 opened this issue Sep 27, 2020 · 2 comments

Comments

@kaede28
Copy link

kaede28 commented Sep 27, 2020

I think the title is self-explanatory.

We have a system with multiple columns and the column header breaks in 2 or 3 lines (I told my employer to use few columns but you know how this works ...)

My employer would like to left-align the column text and replace the sort arrows from the left position to the right position, including the one that is opaque.

I tried to play with CSS to do it but I was not able to.

Any help would be appreciated, thank you.

@daniel-v
Copy link
Contributor

I can give you a couple of pointers, as much as my time allows. Try this:

skawa-data-table thead th {
  clear: both;
  text-alignt: left !important;
}
skawa-data-table thead th.sort>a:before {
  display: none !important;
}
skawa-data-table thead th.sort>a:after {
  font-family: "Material Icons";
  opacity: .87;  
  content: "arrow_upwards";
  display: inline-block;
  float: right;
}

skawa-data-table thead th.sort.desc>a:after {
  content: "arrow_upwards";
}

Quick browser experiment shows that this is mostly what you want. I think everything you want to do can be done by css overrides.

You will want to override .sort-enabled>a:hover too for pretty effect on inactive sort columns, probably text-align: left.

This is the SCSS file you can look at to try to figure out what to override: https://github.com/skawa-universe/skawa_components/blob/master/skawa_material_components/lib/data_table/data_table.scss

Hope this helps.

@kaede28
Copy link
Author

kaede28 commented Sep 28, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants