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

change style deployement as external file for better flexibility #290

Closed
chaouiy opened this issue Apr 6, 2017 · 6 comments
Closed

change style deployement as external file for better flexibility #290

chaouiy opened this issue Apr 6, 2017 · 6 comments

Comments

@chaouiy
Copy link

chaouiy commented Apr 6, 2017

users can't erase default style of ng2-smart-table, making it external to be included in choice enable users to define their own table style

@ameagol
Copy link

ameagol commented Apr 12, 2017

This is quite simple, as Angular2 Style Documentation says.

Override the style by adding on app.component.ts

@Component({
selector: 'app-root',
  templateUrl: './app.component.html', 
  styleUrls:  ['./app.component.css']
})

Then add configuration adjustments on app.component.css

:host /deep/ ng2-smart-table tbody > tr > td:first-child { 
	text-align: left; 
        background-color:red;  
}

@ktriek
Copy link
Contributor

ktriek commented Apr 14, 2017

@ameagol thanks for this solution but this doesn't really solve a problem, someone who is using something like bootstrap should be able to style the ng2-smart-table just by adding css classes like table-stripped without overriding that css or even including it.
Also I don't think anyone would like to have a font-family or font-color in the grid different than the rest of the application(is there any reason to have this in ng2-smart-table.component.scss).

@vlapo
Copy link

vlapo commented Apr 19, 2017

I don't understand. why ng2-smart-table have ng2-smart-table.component.scss ?
Yeah I see it is some default css style but (as @ktriek say) it is unnecessary because everybody want to style tables as the rest of application using own classes.

In my case. I migrate from angularjs to angular 2 and after use ng2-smart-table I have totally different tables because of this default style.

Examples:

Maybe I am wrong and don't see the purpose of this scss file. Please kick me if I am wrong :)
There was a PR #206

@vlapo
Copy link

vlapo commented Apr 21, 2017

@lexzhukov thnx a lot ;)

@RikiMizusaki
Copy link

@lexzhukov Thank you.

@chaouiy
Copy link
Author

chaouiy commented Jan 25, 2018

@lexzhukov So respectful, TY

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

No branches or pull requests

6 participants