Feature Request: Materialize CSS
Feature Request: Materialize CSS
boustanihani
Posts: 1Questions: 0Answers: 0
I think it would be nice to have a materialized datatables styling option:
http://materializecss.com/
Also check: Feature Request: Semantic UI
https://datatables.net/forums/discussion/24163/feature-request-semantic-ui
This discussion has been closed.
Replies
I have developed a SASS file for DataTables that styles it according to MaterializeCSS, i.e., it uses as much native MaterializeCSS design as possible on DataTables.
If you're interested (or anyone for that matter) I can post it here, or I can compile the SASS into CSS and post the CSS directives.
This file has some tweaks (positionings, margins, etc...) that I've made for my particular case, but anyone should spot this right on and change as necessary.
Please do post it - would be very interesting to see what you have cooked up!
I've recently been doing a lot of work to make it easier to add theming options for DataTables such as this, while should be released in the next couple of weeks.
Allan
So, what I've done is to NOT include the DataTables stylesheet in the header, and let MaterializeCSS do the work.
So if you're using SASS, create a file with the following:
Then import this file on your 'materialize.scss' using
@import "<path_to_file>";
, usually at the end (i.e. after the default MaterializeCSS components).If on the other hand you prefer CSS, either add the code that follows to the MaterializeCSS file or create a CSS file and include it in the <header> of your page, after the MaterializeCSS file.
I should note that there are some elementes that I've excluded (.dataTables_length for example) because I don't use it on my case, but I guess that one can easily extend this.
If you prefer, I can "translate" the default design of DataTables into this, but I can only do it next weekend.
NOTE: Please replace all
\@
directives with@
as this was done only for readable Markdown renderingI think letting the styling framework provide the styling feature is the correct thing to do and what I have done with the Bootstrap and Foundation styling options.
Thanks for posting this - I'm sure others will enjoy using it!
Allan
I've been playing with the semantic ui css framework. http://semantic-ui.com
NOTE: you will need jquery, DataTables and semantic ui .css and .js files loaded for this to work.
Here is a sample (please note: I suck at css):
The HTML
( If you can get the length, search, paging and info divs to float (left|right) properly you probably don't need to use
dom:
)The CSS
Very nice - thanks for posting this :-)
I'm thinking Semantic is going to be the next integration for DataTables and its extensions.
Allan
Sweet!
@kmd1970
Thanks a lot that was helpful.
You made me register to just thank you !
Take a look at http://codepen.io/azamatms/pen/ZGwOMM/ by Azamat Mukhiddinov.
He has properly extended data tables for Materialize.
Simply put, it’s amazing...
I recently committed initial support for Material Design (using MDL) into DataTables core. Feedback and PRs with improvements welcome!
Allan
Hi @allan I would like to know how to use the support for Material Design that you built into DataTables core. I'm kind of new to all this so I'm not sure if I'm in the right place but this is what I'm using in my project from the Material website http://materializecss.com/:
materialize.min.js
materialize.min.css
Then form Datatables website I'm using:
jquery-2.2.1.min.js
jquery.dataTables.min.js
datatables.min.css
In my project I noticed the "Show entries" select options are not showing. Just wondering if the files I'm using is everything I need to make DataTables work with http://materializecss.com/ framework?
Thanks
E.
Remove that. If it still doesn't work well, please link to the page so I can take a look.
Allan
Hi Allan,
I have been working with Materialize and reading through the comments above. Is there a definitive example on using the Materialize CSS Frramework?
I have tried many combinations of CSS and JS includes but my main problem is that I cannot get the Select Input to work in the Editor Dialog.
Thanks as always,
Bo
I'm afraid not. The integrations available for DataTables are linked here.
Allan
How to include matrializecss in new version design?? because the show entry not function... also the search has a. wrong place. thank you
Please give me materializecss.css files for support the datatables thank you
There is no materialize integration for DataTables. You are welcome to create one and share it with everyone though!
There is a MDL integration available.
Allan