-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Style Table Element #99
Comments
@Eusse can you target your CSS at the table tag? Instead of |
That's what i did to fix this, but i'm not sure that's the right way to do it. didInsertElement() {
"use strict";
Ember.run.next(this, function(){
this.$('table').addClass('table m-b-0 table-bordered table-hover table-condensed');
});
}, |
@offirgolan Not really, i need to use default bootstrap css and it says i should use all the classes within table tag as mentioned in the docs link. @mwalper I will try this, but i would like to have some way to specify it. |
@Eusse right now, this is the only way, besides overriding the template, which I would discourage. Maybe we should implement a |
Side note: applying the classes on the wrapping |
That sounds great @buschtoens! but looking at the alpha 4 documentation still needs the classes in the table tag. I like better your idea of implementing the |
Disregard the documentation. It's only exemplary. 😉 I think this is more of an issue with Bootstrap and not ember-light-table. IMHO the CSS shouldn't be so tightly coupled to the HTML structure as this leads to exactly these kinds of problems. Ultimately, this decision is up to @offirgolan, but personally I think this unnecessarily increases the API surface area while providing little benefit. Independent of this issue, I recommend switching to v4 for new projects - is this not an option for you? |
@buschtoens adding something like |
@offirgolan yeah, I think {{light-table table tableClassNames="table table-bordered table-hover table-condensed"}} |
@taras yup exactly that. Then apply all those classes to each table being |
@buschtoens You are right, i tried and it works well, i can switch to v4 for my personal projects, but i cannot change my client's bootstrap version. |
Sorry to bump an old issue but I believe this only partially resolves issues marrying up Bootstraps css styles with ember-light-table. We need to be able to apply styles directly to the 'thead' too ('.thead-default' is just one style example from BS v4). Could the api be harmonized to allow you to add classes directly to table elements (table, thead, tbody etc.). |
Hi, i'm trying to style the table element with bootstrap like this. I added the classNames attribute in the component template but it adds the classes to the div, not the table tag.
{{#light-table table classNames='table table-bordered table-hover table-condensed' as |t|}}
Is this supported? am i doing something wrong?
ember-light-table: 1.0.0
ember-cli: 2.6.2
node: 6.2.2
os: linux x64
The text was updated successfully, but these errors were encountered: