Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
guilherme-andrade committed Nov 3, 2024
1 parent 5b66cbf commit 3811a92
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ Tailwindcss::Style.new(bg: :red).to_s

Tailwindcss::Style.new(bg: :red, text: :white).to_s
# => "bg-red-500 text-white"
```

### Modifiers

Any key that starts with an underscore is considered a modifier. Modifiers are used to add pseudo classes and elements to the class.

```ruby
Tailwindcss::Style.new(bg: :red, text: :white, _hover: {bg: :blue}).to_s
# => "bg-red-500 text-white hover:bg-blue-500"

Expand All @@ -39,20 +45,20 @@ You can configure the gem by creating an initializer file in your rails app.
Tailwindcss.configure do |config|
config.package_json_path = "./package.json"
config.config_file_path = "./tailwind.config.js"
config.compiler.output_path = "./public/assets/styles.css"
config.compiler.compile_classes_dir = "./tmp/tailwindcss"
config.content = []
config.prefix = ""
config.watch_content = false
config.breakpoints = %i[xs sm md lg xl 2xl]
config.pseudo_selectors = %i[hover focus active visited disabled first last first_of_type last_of_type odd even group_hover]
config.pseudo_elements = %i[before after file first_letter first_line selection backdrop marker]
config.logger = Logger.new(STDOUT)
config.theme.color_scheme = {
primary: :red,
secondary: :blue,
tertiary: :green
}
# other theme configurations
config.compiler.output_path = "./public/assets/styles.css"
config.compiler.compile_classes_dir = "./tmp/tailwindcss"
config.content = []
config.prefix = ""
config.watch_content = false
config.breakpoints = %i[xs sm md lg xl 2xl]
config.pseudo_selectors = %i[hover focus active visited disabled first last first_of_type last_of_type odd even group_hover]
config.pseudo_elements = %i[before after file first_letter first_line selection backdrop marker]
config.logger = Logger.new(STDOUT)
config.theme.color_scheme = {
primary: :red,
secondary: :blue,
tertiary: :green
}
# other theme configurations
end
```

0 comments on commit 3811a92

Please sign in to comment.