Skip to content

Commit

Permalink
More fixes to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
guilherme-andrade committed Nov 3, 2024
1 parent e3f8bc6 commit ce08eda
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,6 @@ tailwind(bg: :red, text: :white)
# => "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
tailwind(bg: :red, text: :white, _hover: { bg: :blue })
# => "bg-red-500 text-white hover:bg-blue-500"

tailwind(bg: :red, text: :white, _hover: { bg: :blue }, _before: { content: '[""]' })
# => "bg-red-500 text-white hover:bg-blue-500 before:content-[\"\"]"
```

## Configuration

You can configure the gem by creating an initializer file in your rails app.
Expand Down Expand Up @@ -177,6 +165,19 @@ And these classes will be added by the tailwind compiler to the final css file.
## Advanced Usage
### Using 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
tailwind(bg: :red, text: :white, _hover: { bg: :blue })
# => "bg-red-500 text-white hover:bg-blue-500"
tailwind(bg: :red, text: :white, _hover: { bg: :blue }, _before: { content: '[""]' })
# => "bg-red-500 text-white hover:bg-blue-500 before:content-[\"\"]"
```


### Using arbitrary values

When using arbitrary values, you have one of two options.
Expand Down

0 comments on commit ce08eda

Please sign in to comment.