select2 (v4) Theme for Zurb Foundation (v6)
In order to apply select2-foundation theme to your project, add the following files:
<link rel="stylesheet" href="select2.css">
<link rel="stylesheet" href="select2-foundation-theme.css">
"dependencies": {
"foundation-sites" : "^6.0.0",
"select2" : "latest",
"select2-foundation" : "https://github.com/egemensarica/select2-foundation.git#v6"
}
Installation is similar to installing foundation-rails.
Add to your application's Gemfile:
gem 'select2-foundation'
Run the generator for installation
rails g select2_foundation:install
Create a sass partial app/assets/stylesheets/_settings_select2.scss
Add to your app/assets/stylesheets/application.css:
*= require select2/select2-foundation
Configure select2 To apply the theme by passing foundation
to the theme option when initializing:
$( "#dropdown" ).select2({
theme: "foundation"
});
Run the styleguide application found under test/
bundle
bundle exec rails s
Navigate to the root path to view the demo page.
Install build tools:
- npm
- grunt-cli
Run grunt tasks. See grunt help for available tasks.
grunt sass
- Release to ruby gems
- Initial sass
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request