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

Unable to change angular2-smart-table header color globally through out application #174

Open
suganyaVijayaramu opened this issue Jan 6, 2025 · 2 comments
Assignees
Labels
ng2-smart-table-migration An issue that arised when migrating from the original ng2-smart-table to this fork.

Comments

@suganyaVijayaramu
Copy link

suganyaVijayaramu commented Jan 6, 2025

I am trying to change the table header/title color. I used ng2-smart-table before. since we upgrade Angular version to 18 ng2 not supported by Angular latest version. So we moved to angular2-smart-table. And modified style.css from ng2 to angular2. We are trying to apply background image to the title section, but not applied

style.css:

angular2-smart-table > table > thead > tr.angular2-smart-titles {
    background-image: linear-gradient(to right bottom, #da291c, #d43c30, #cd4b41, #c45750, #b9635e);
    th {
        word-break: break-all;
        padding: 0.875rem 0.25rem !important;
    }
    th.angular2-smart-th > angular2-st-column-title > div > angular2-smart-table-title > a,span {
        color: #fff !important;
        text-decoration: none;
        font-size: 12px;
        font-family: Roboto, sans-serif;
    }
    th.angular2-smart-th > angular2-st-column-title > div > angular2-smart-table-title > a:hover {
        color: #fff !important;
    }
    th.angular2-smart-actions {
        color: #fff !important;
    }
    th.angular2-smart-th > angular2-st-column-title > div > angular2-smart-table-title > a.sort::after {
        color: #fff !important;
    }
    th.angular2-smart-th > angular2-st-column-title > div > angular2-smart-table-title > a.sort.asc::after,a.sort.desc::after {
        color: #fff !important;
        border-bottom-color: #fff !important;
    }
}

html:

<div class="row" style="margin-bottom:10px">
    <div style="margin-left: 12px;padding: 0px;" class="col-lg-12">
        <angular2-smart-table style="font-size:15px" [source]="source" (click)="setSortData()" [settings]="settings"
        (userRowSelect)="onRowSelect($event)"></angular2-smart-table>
    </div>
</div>
@suganyaVijayaramu
Copy link
Author

Please help to resolve this issue

@uap-universe uap-universe added the ng2-smart-table-migration An issue that arised when migrating from the original ng2-smart-table to this fork. label Jan 8, 2025
@uap-universe uap-universe self-assigned this Jan 8, 2025
@uap-universe
Copy link
Collaborator

Can you please try if it helps to write

tr.angular2-smart-titles {
    background-image: linear-gradient(to right bottom, #da291c, #d43c30, #cd4b41, #c45750, #b9635e);
    // ..
}

instead of

angular2-smart-table > table > thead > tr.angular2-smart-titles { // ...

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ng2-smart-table-migration An issue that arised when migrating from the original ng2-smart-table to this fork.
Projects
None yet
Development

No branches or pull requests

2 participants