CSS Zero Documentation
repository·master·Indexed 21 days ago
https://github.com/lazaronixon/css-zeroAn opinionated front-end starter kit for Ruby on Rails applications providing a 'no build' styling experience. It utilizes utility classes and CSS variables, offering custom templates for Rails scaffolds and authentication, as well as a generator for adding specific components.
What's inside css-zero
- CSS Zero includes custom templates for Rails scaffolds and authentication. When generating scaffolds or setting up authentication in a project using this gem, these custom templates will be utilized to provide a consistent UI based on the CSS Zero design system.
Add CSS Zero components
masterAfter the initial installation, you can optionally add specific components to your application using the
css_zero:addgenerator. Use the--helpflag to see the list of available components you can include.bin/rails generate css_zero:add --helpInstall CSS Zero in a Ruby on Rails application
masterCSS Zero is an opinionated front-end starter kit for Ruby on Rails, designed as a "no build" alternative to Tailwind CSS.
To install it, add the gem to your project using Bundler, then run the generator to set up the necessary assets and configuration.
# Add the gem bundle add css-zero # Or install directly from GitHub bundle add css-zero --github=lazaronixon/css-zero # Run the installation generator bin/rails generate css_zero:installExplore CSS Zero utility classes and variables
masterCSS Zero provides a set of utility classes and CSS variables. To see the full list of available utilities and variables, inspect the CSS files located in your application's asset directory atapp/assets/stylesheets/css-zero.Add CSS Zero components via Rails generator
masterYou can add specific CSS Zero components to your Rails project using the
CssZero::AddGenerator. This generator accepts an array of component names as arguments. If a component name is valid (defined in the internalresources.yml), the generator will copy the necessary files and directories into your project. If an invalid component name is provided, it will report an:invalidstatus.# Usage pattern (assuming the generator is registered in your Rails environment) rails generate css_zero:add component_name_1 component_name_2