GithubHelp home page GithubHelp logo

isabella232 / semantic-ui-rails-less Goto Github PK

View Code? Open in Web Editor NEW

This project forked from semantic-org/semantic-ui-rails-less

0.0 0.0 0.0 5.64 MB

This is a gem for Rails with Semantic UI (http://semantic-ui.com) assets inside.

License: MIT License

Ruby 1.42% JavaScript 53.37% CSS 0.19% HTML 0.03% Less 45.00%

semantic-ui-rails-less's Introduction

No Longer Maintained

Please consider this project abandoned. There are many roadblocks that prevent upgrading this to the latest Semantic-UI and now there's Fomantic-UI. Semantic-Org#53. I suggest you look at bundling Fomantic-UI in with webpacker instead. It is possible though not completely straightforward. This project is starting to get security tickets around dependencies (that I won't fix), so user beware.

less-rails-semantic_ui Gem Version Build Status

This is a gem for Rails with Semantic UI assets inside. It provides the ability to customize component themes and variables on the fly in your application.

Features

  • LESS based (meaning that it doesn't contains hacks usually used to convert LESS to SASS)
  • Semantic UI configs integrated in your application (you can customize and change component styles on the fly)

Installation

Add this block to your application's Gemfile:

# Semantic UI assets

gem 'less-rails-semantic_ui'
gem 'autoprefixer-rails'
gem 'therubyracer'

Semantic UI is using autoprefixer (in our case autoprefixer-rails) to appending additional CSS vendor-prefixes for improve compatibility with different browsers. Without it some parts of Semantic UI (i.e. transitions or modal dialogs because they depends to transitions) won't works in some browsers. You can remove this gem if you don't use such functionality of Semantic UI.

P.S. I hope in the future this hack will be unnecessary.

And then execute:

$ bundle install

After that, install configuration files inside your application in the vendor/assets directory with:

$ rails generate semantic_ui:install

Require semantic_ui/semantic_ui.js in app/assets/application.js:

...
//= require semantic_ui/semantic_ui
...

Require semantic_ui/semantic_ui.css in app/assets/application.css:

...
*= require semantic_ui/semantic_ui
...

Upgrade to new version

Execute command below and merge your custom and new changes in config files:

$ rails generate semantic_ui:install

Customization

You can modify any Semantic UI configs and files placed to vendor/assets/javascripts/semantic_ui and vendor/assets/stylesheets/semantic_ui directories. For example:

  • if you wish to remove unused components you can just remove corresponding lines from semantic_ui.js and semantic_ui.css files.
  • if you wish to change components themes you can just configure them in theme.config.
  • if you wish to change component variables or extend components you can just configure corresponding config/{collections,elements, globals,modules,views}/*.{overrides,variables} files.

Versioning

This gem will directly track the semantic versioning of the Semantic UI project. Major and minor versions will always match to theirs, though we may have tiny patch level releases specific to this gem.

Contributing

  1. Fork it ( https://github.com/maxd/less-rails-semantic_ui )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

semantic-ui-rails-less's People

Contributors

brendon avatar dijonkitchen avatar jlukic avatar maxd avatar tirdadc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.