tailwindcss-rails 3.3.1 → 4.0.0.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +130 -31
- data/lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb +2 -2
- data/lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb +1 -1
- data/lib/generators/tailwindcss/authentication/templates/app/views/sessions/new.html.erb +2 -2
- data/lib/generators/tailwindcss/scaffold/templates/_form.html.erb.tt +6 -6
- data/lib/install/application.tailwind.css +1 -13
- data/lib/install/{tailwindcss.rb → install_tailwindcss.rb} +12 -13
- data/lib/install/upgrade_tailwindcss.rb +63 -0
- data/lib/tailwindcss/commands.rb +1 -2
- data/lib/tailwindcss/engine.rb +6 -4
- data/lib/tailwindcss/version.rb +1 -1
- data/lib/tasks/install.rake +1 -1
- data/lib/tasks/upgrade.rake +6 -0
- metadata +7 -7
- data/app/assets/stylesheets/inter-font.css +0 -194
- data/lib/install/tailwind.config.js +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25b499cfb3a5bb8ff72c083b3db9b55f805841e72f4c7d70822f43ad549841f1
|
|
4
|
+
data.tar.gz: ce5a7fec5aebe849b5ec925e26314a2d49757457447f4abdce46a05a3d00f4c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa8f794bbd71a24f565fe426d92195568421ce59f2c3d025e3efec7ff6e9b809a040639db693de0945fa717e559ace7c26ffef61f321524cf27000ad1fb6192d
|
|
7
|
+
data.tar.gz: 7202ece89941519c53a56cb4c276abfac516f59f9baada3212283b499dd51432747ee9fb2a1e95416f7bb671da70d95a7b609a734e4ae34d3f9479e6027df3a6
|
data/README.md
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
- [Installation](#installation)
|
|
10
10
|
* [Choosing a specific version of `tailwindcss`](#choosing-a-specific-version-of-tailwindcss)
|
|
11
11
|
* [Using a local installation of `tailwindcss`](#using-a-local-installation-of-tailwindcss)
|
|
12
|
+
- [Upgrading your application from Tailwind v3 to v4](#upgrading-your-application-from-tailwind-v3-to-v4)
|
|
13
|
+
* [You don't _have_ to upgrade](#you-dont-_have_-to-upgrade)
|
|
14
|
+
* [Upgrade steps](#upgrade-steps)
|
|
15
|
+
* [Plugins](#plugins)
|
|
16
|
+
* [Troubleshooting](#troubleshooting)
|
|
12
17
|
- [Developing with Tailwindcss](#developing-with-tailwindcss)
|
|
13
18
|
* [Configuration and commands](#configuration-and-commands)
|
|
14
19
|
* [Building for production](#building-for-production)
|
|
@@ -17,14 +22,13 @@
|
|
|
17
22
|
* [Live rebuild](#live-rebuild)
|
|
18
23
|
* [Using with PostCSS](#using-with-postcss)
|
|
19
24
|
* [Custom inputs or outputs](#custom-inputs-or-outputs)
|
|
20
|
-
- [Troubleshooting](#troubleshooting)
|
|
25
|
+
- [Troubleshooting](#troubleshooting-1)
|
|
21
26
|
* [Lost keystrokes or hanging when using terminal-based debugging tools (e.g. IRB, Pry, `ruby/debug`...etc.) with the Puma plugin](#lost-keystrokes-or-hanging-when-using-terminal-based-debugging-tools-eg-irb-pry-rubydebugetc-with-the-puma-plugin)
|
|
22
27
|
* [Running in a docker container exits prematurely](#running-in-a-docker-container-exits-prematurely)
|
|
23
28
|
* [Conflict with sassc-rails](#conflict-with-sassc-rails)
|
|
24
29
|
* [Class names must be spelled out](#class-names-must-be-spelled-out)
|
|
25
30
|
* [`ERROR: Cannot find the tailwindcss executable` for supported platform](#error-cannot-find-the-tailwindcss-executable-for-supported-platform)
|
|
26
31
|
* [Using asset-pipeline assets](#using-asset-pipeline-assets)
|
|
27
|
-
* [Conflict with pre-existing asset pipeline stylesheets](#conflict-with-pre-existing-asset-pipeline-stylesheets)
|
|
28
32
|
- [License](#license)
|
|
29
33
|
|
|
30
34
|
<!-- tocstop -->
|
|
@@ -55,21 +59,131 @@ gem "tailwindcss-ruby", "3.4.13"
|
|
|
55
59
|
You can also use a local (npm-based) installation if you prefer, please go to https://github.com/flavorjones/tailwindcss-ruby for more information.
|
|
56
60
|
|
|
57
61
|
|
|
62
|
+
## Upgrading your application from Tailwind v3 to v4
|
|
63
|
+
|
|
64
|
+
v4.x of this gem has been updated to work with Tailwind v4, including providing some help with upgrading your application.
|
|
65
|
+
|
|
66
|
+
A full explanation of a Tailwind v4 upgrade is out of scope for this README, so we strongly urge you to read the [official Tailwind v4 upgrade guide](https://tailwindcss.com/docs/upgrade-guide) before embarking on an upgrade to an existing large app.
|
|
67
|
+
|
|
68
|
+
This gem will help with some of the mechanics of the upgrade, however.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### You don't _have_ to upgrade
|
|
72
|
+
|
|
73
|
+
Keep in mind that you don't _need_ to upgrade. You can stay on Tailwind v3 for the foreseeable future if you prefer not to migrate now, or if your migration runs into problems.
|
|
74
|
+
|
|
75
|
+
Just make sure you're either pinned to v3.3.1 of this gem:
|
|
76
|
+
|
|
77
|
+
``` ruby
|
|
78
|
+
# Gemfile
|
|
79
|
+
gem "tailwindcss-rails", "3.3.1" # which transitively pins tailwindcss-ruby to v3
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
or if you're on an earlier version of this gem, make sure you're pinning the version of **both** `tailwindcss-rails` and `tailwindcss-ruby`:
|
|
83
|
+
|
|
84
|
+
``` ruby
|
|
85
|
+
# Gemfile
|
|
86
|
+
gem "tailwindcss-rails", "~> 3.3"
|
|
87
|
+
gem "tailwindcss-ruby", "~> 3.4"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Upgrade steps
|
|
92
|
+
|
|
93
|
+
First, update to `tailwindcss-rails` v4.0.0 or higher. This will also ensure you're transitively depending on `tailwindcss-ruby` v4.
|
|
94
|
+
|
|
95
|
+
``` html
|
|
96
|
+
# Gemfile
|
|
97
|
+
gem "tailwindcss-rails", "~> 4.0" # which transitively pins tailwindcss-ruby to v4
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Then, run the `tailwindcss:upgrade` task. Among other things, this will try to run the official Tailwind upgrade utility. It requires `npx` in order to run, but it's a one-time operation and is *highly recommended* for a successful upgrade.
|
|
101
|
+
|
|
102
|
+
Here's what the upgrade task does:
|
|
103
|
+
|
|
104
|
+
- Cleans up some things in the generated `config/tailwind.config.js`.
|
|
105
|
+
- If present, moves `config/postcss.config.js` to the root directory.
|
|
106
|
+
- If present, moves `app/assets/stylesheets/application.tailwind.css` to `app/assets/tailwind`.
|
|
107
|
+
- Removes unnecessary `stylesheet_link_tag "tailwindcss"` tags from the application layout.
|
|
108
|
+
- Removes references to the Inter font from the application layout.
|
|
109
|
+
- Runs the upstream upgrader (note: requires `npx` to run the one-time upgrade, but highly recommended).
|
|
110
|
+
|
|
111
|
+
<details>
|
|
112
|
+
<summary>Here's what that upgrade looks like on a vanilla Rails app.</summary>
|
|
113
|
+
|
|
114
|
+
``` sh
|
|
115
|
+
$ bin/rails tailwindcss:upgrade
|
|
116
|
+
apply /path/to/tailwindcss-rails/lib/install/upgrade_tailwindcss.rb
|
|
117
|
+
Removing references to 'defaultTheme' from /home/user/myapp/config/tailwind.config.js
|
|
118
|
+
gsub config/tailwind.config.js
|
|
119
|
+
Strip Inter font CSS from application layout
|
|
120
|
+
gsub app/views/layouts/application.html.erb
|
|
121
|
+
Remove unnecessary stylesheet_link_tag from application layout
|
|
122
|
+
gsub app/views/layouts/application.html.erb
|
|
123
|
+
Moving application.tailwind.css to /home/user/myapp/app/assets/tailwind
|
|
124
|
+
create app/assets/tailwind/application.tailwind.css
|
|
125
|
+
remove app/assets/stylesheets/application.tailwind.css
|
|
126
|
+
10.9.0
|
|
127
|
+
Running the upstream Tailwind CSS upgrader
|
|
128
|
+
run npx @tailwindcss/upgrade@next --force --config /home/user/myapp/config/tailwind.config.js from "."
|
|
129
|
+
≈ tailwindcss v4.0.0
|
|
130
|
+
│ Searching for CSS files in the current directory and its subdirectories…
|
|
131
|
+
│ ↳ Linked `./config/tailwind.config.js` to `./app/assets/tailwind/application.tailwind.css`
|
|
132
|
+
│ Migrating JavaScript configuration files…
|
|
133
|
+
│ ↳ The configuration file at `./config/tailwind.config.js` could not be automatically migrated to the new CSS
|
|
134
|
+
│ configuration format, so your CSS has been updated to load your existing configuration file.
|
|
135
|
+
│ Migrating templates…
|
|
136
|
+
│ ↳ Migrated templates for configuration file: `./config/tailwind.config.js`
|
|
137
|
+
│ Migrating stylesheets…
|
|
138
|
+
│ ↳ Migrated stylesheet: `./app/assets/tailwind/application.tailwind.css`
|
|
139
|
+
│ ↳ No PostCSS config found, skipping migration.
|
|
140
|
+
│ Updating dependencies…
|
|
141
|
+
│ Could not detect a package manager. Please manually update `tailwindcss` to v4.
|
|
142
|
+
│ Verify the changes and commit them to your repository.
|
|
143
|
+
Compile initial Tailwind build
|
|
144
|
+
run rails tailwindcss:build from "."
|
|
145
|
+
≈ tailwindcss v4.0.0
|
|
146
|
+
Done in 56ms
|
|
147
|
+
run bundle install --quiet
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
</details>
|
|
151
|
+
|
|
152
|
+
If this doesn't succeed, it's likely that you've customized your Tailwind configuration and you'll need to do some work to make sure your application upgrades. Please read the [official upgrade guide](https://tailwindcss.com/docs/upgrade-guide)!
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
### Plugins
|
|
156
|
+
|
|
157
|
+
In Tailwind CLI v3, some Tailwind plugins were included by default in the CLI tool. However, in v4 these default plugins have been removed.
|
|
158
|
+
|
|
159
|
+
In order to use any plugins with v4, either by declaring them in your (optional) config file or using the [`@plugin` directive](https://tailwindcss.com/docs/functions-and-directives#plugin-directive), it's necessary to install them using a local javascript package manager.
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
### Troubleshooting
|
|
163
|
+
|
|
164
|
+
You may want to check out [TailwindCSS v4 - upgrade experience report · rails/tailwindcss-rails · Discussion #450](https://github.com/rails/tailwindcss-rails/discussions/450) if you're having trouble upgrading.
|
|
165
|
+
|
|
166
|
+
We know there are some cases we haven't addressed with the upgrade task:
|
|
167
|
+
|
|
168
|
+
- If the user isn’t using PostCSS, some migrations (e.g., updating class names in the view files) may fail
|
|
169
|
+
- In setups without JavaScript tooling, the update process may fail to fully migrate `tailwind.config.js` because the tool assumes that the imported packages (e.g., tailwind plugins) are installed via a package manager, allowing them to be called.
|
|
170
|
+
|
|
171
|
+
We'll try to improve the upgrade process over time, but for now you may need to do some manual work to upgrade.
|
|
172
|
+
|
|
173
|
+
|
|
58
174
|
## Developing with Tailwindcss
|
|
59
175
|
|
|
60
176
|
### Configuration and commands
|
|
61
177
|
|
|
62
|
-
####
|
|
63
|
-
|
|
64
|
-
You can customize the Tailwind build through the `config/tailwind.config.js` file, just like you would if Tailwind was running in a traditional node installation. All the first-party plugins are supported.
|
|
178
|
+
#### Input file: `app/assets/tailwind/application.tailwind.css`
|
|
65
179
|
|
|
66
|
-
|
|
180
|
+
The `tailwindcss:install` task will generate a Tailwind input file in `app/assets/tailwind/application.tailwind.css`. This is where you import the plugins you want to use and where you can setup your custom `@apply` rules.
|
|
67
181
|
|
|
68
|
-
The
|
|
182
|
+
⚠ The location of this file changed in v4, from `app/assets/stylesheets` to `app/assets/tailwind`. The `tailwindcss:upgrade` task will move it for you.
|
|
69
183
|
|
|
70
184
|
#### Output file: `app/assets/builds/tailwind.css`
|
|
71
185
|
|
|
72
|
-
When you run `rails tailwindcss:build`, the input file will be used to generate the output in `app/assets/builds/tailwind.css`. That's the output CSS that you'll include in your app
|
|
186
|
+
When you run `rails tailwindcss:build`, the input file will be used to generate the output in `app/assets/builds/tailwind.css`. That's the output CSS that you'll include in your app.
|
|
73
187
|
|
|
74
188
|
#### Commands
|
|
75
189
|
|
|
@@ -151,19 +265,16 @@ Running `bin/dev` invokes Foreman to start both the Tailwind watch process and t
|
|
|
151
265
|
|
|
152
266
|
### Using with PostCSS
|
|
153
267
|
|
|
154
|
-
If you want to use PostCSS as a preprocessor, create a custom `
|
|
268
|
+
If you want to use PostCSS as a preprocessor, create a custom `postcss.config.js` in your project root directory, and that file will be loaded by tailwind automatically.
|
|
155
269
|
|
|
156
270
|
For example, to enable nesting:
|
|
157
271
|
|
|
158
272
|
```js
|
|
159
|
-
//
|
|
160
|
-
|
|
273
|
+
// postcss.config.js
|
|
274
|
+
export default {
|
|
161
275
|
plugins: {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
tailwindcss: {},
|
|
165
|
-
autoprefixer: {},
|
|
166
|
-
},
|
|
276
|
+
"@tailwindcss/postcss": {},
|
|
277
|
+
}
|
|
167
278
|
}
|
|
168
279
|
```
|
|
169
280
|
|
|
@@ -175,10 +286,9 @@ module.exports = {
|
|
|
175
286
|
"name": "my app",
|
|
176
287
|
"private": true,
|
|
177
288
|
"dependencies": {
|
|
178
|
-
"postcss
|
|
179
|
-
"
|
|
180
|
-
"postcss
|
|
181
|
-
"tailwindcss": "^3.4.1"
|
|
289
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
290
|
+
"tailwindcss": "^4.0.0",
|
|
291
|
+
"postcss": "^8.5.1"
|
|
182
292
|
}
|
|
183
293
|
}
|
|
184
294
|
```
|
|
@@ -241,17 +351,6 @@ The inline version also works:
|
|
|
241
351
|
<section class="bg-[url('image.svg')]">Has the image as it's background</section>
|
|
242
352
|
```
|
|
243
353
|
|
|
244
|
-
### Conflict with pre-existing asset pipeline stylesheets
|
|
245
|
-
|
|
246
|
-
If you get a warning `Unrecognized at-rule or error parsing at-rule ‘@tailwind’.` in the browser console after installation, you are incorrectly double-processing `application.tailwind.css`. This is a misconfiguration, even though the styles will be fully effective in many cases.
|
|
247
|
-
|
|
248
|
-
The file `application.tailwind.css` is installed when running `rails tailwindcss:install` and is placed alongside the common `application.css` in `app/assets/stylesheets`. Because the `application.css` in a newly generated Rails app includes a `require_tree .` directive, the asset pipeline incorrectly processes `application.tailwind.css`, where it should be taken care of by `tailwindcss`. The asset pipeline ignores TailwindCSS's at-directives, and the browser can't process them.
|
|
249
|
-
|
|
250
|
-
To fix the warning, you can either remove the `application.css`, if you don't plan to use the asset pipeline for stylesheets, and instead rely on TailwindCSS completely for styles. This is what this installer assumes.
|
|
251
|
-
|
|
252
|
-
Or, if you do want to keep using the asset pipeline in parallel, make sure to remove the `require_tree .` line from the `application.css`.
|
|
253
|
-
|
|
254
|
-
|
|
255
354
|
## License
|
|
256
355
|
|
|
257
356
|
Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
<%%= form_with url: password_path(params[:token]), method: :put, class: "contents" do |form| %>
|
|
9
9
|
<div class="my-5">
|
|
10
|
-
<%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-
|
|
10
|
+
<%%= form.password_field :password, required: true, autocomplete: "new-password", placeholder: "Enter new password", maxlength: 72, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
13
|
<div class="my-5">
|
|
14
|
-
<%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 outline-
|
|
14
|
+
<%%= form.password_field :password_confirmation, required: true, autocomplete: "new-password", placeholder: "Repeat new password", maxlength: 72, class: "block shadow-sm rounded-md border border-gray-400 outline-hidden focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
17
|
<div class="inline">
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<%%= form_with url: passwords_path, class: "contents" do |form| %>
|
|
9
9
|
<div class="my-5">
|
|
10
|
-
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 outline-
|
|
10
|
+
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow-sm rounded-md border border-gray-400 outline-hidden focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
13
13
|
<div class="inline">
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
|
|
12
12
|
<%%= form_with url: session_url, class: "contents" do |form| %>
|
|
13
13
|
<div class="my-5">
|
|
14
|
-
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
|
|
14
|
+
<%%= form.email_field :email_address, required: true, autofocus: true, autocomplete: "username", placeholder: "Enter your email address", value: params[:email_address], class: "block shadow-sm rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
17
|
<div class="my-5">
|
|
18
|
-
<%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
|
|
18
|
+
<%%= form.password_field :password, required: true, autocomplete: "current-password", placeholder: "Enter your password", maxlength: 72, class: "block shadow-sm rounded-md border border-gray-400 focus:outline-blue-600 px-3 py-2 mt-2 w-full" %>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<div class="col-span-6 sm:flex sm:items-center sm:gap-4">
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
<div class="my-5">
|
|
16
16
|
<% if attribute.password_digest? -%>
|
|
17
17
|
<%%= form.label :password %>
|
|
18
|
-
<%%= form.password_field :password, class: ["block shadow rounded-md border outline-
|
|
18
|
+
<%%= form.password_field :password, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<div class="my-5">
|
|
22
22
|
<%%= form.label :password_confirmation %>
|
|
23
|
-
<%%= form.password_field :password_confirmation, class: ["block shadow rounded-md border outline-
|
|
23
|
+
<%%= form.password_field :password_confirmation, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password_confirmation].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password_confirmation].any?}] %>
|
|
24
24
|
<% elsif attribute.attachments? -%>
|
|
25
25
|
<%%= form.label :<%= attribute.column_name %> %>
|
|
26
|
-
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow rounded-md border outline-
|
|
26
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:password].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:password].any?}] %>
|
|
27
27
|
<% else -%>
|
|
28
28
|
<%%= form.label :<%= attribute.column_name %> %>
|
|
29
29
|
<% if attribute.field_type == :textarea || attribute.field_type == :text_area -%>
|
|
30
|
-
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow rounded-md border outline-
|
|
30
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, rows: 4, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
|
|
31
31
|
<% elsif attribute.field_type == :checkbox || attribute.field_type == :check_box -%>
|
|
32
|
-
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-
|
|
32
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow-sm rounded-md border outline-hidden mt-2 h-5 w-5", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
|
|
33
33
|
<% else -%>
|
|
34
|
-
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow rounded-md border outline-
|
|
34
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, class: ["block shadow-sm rounded-md border outline-hidden px-3 py-2 mt-2 w-full", {"border-gray-400 focus:outline-blue-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].none?, "border-red-400 focus:outline-red-600": <%= model_resource_name %>.errors[:<%= attribute.column_name %>].any?}] %>
|
|
35
35
|
<% end -%>
|
|
36
36
|
<% end -%>
|
|
37
37
|
</div>
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
|
|
2
2
|
CENTERING_CONTAINER_INSERTION_POINT = /^\s*<%= yield %>/.freeze
|
|
3
|
+
TAILWIND_ASSET_PATH = Rails.root.join("app/assets/tailwind")
|
|
3
4
|
|
|
4
5
|
if APPLICATION_LAYOUT_PATH.exist?
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
unless File.read(APPLICATION_LAYOUT_PATH).match?(/stylesheet_link_tag :app/)
|
|
7
|
+
say "Add Tailwindcss include tags in application layout"
|
|
8
|
+
insert_into_file APPLICATION_LAYOUT_PATH.to_s, <<~ERB.indent(4), before: /^\s*<%= stylesheet_link_tag/
|
|
9
|
+
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
|
|
10
|
+
ERB
|
|
11
|
+
end
|
|
9
12
|
|
|
13
|
+
say "Add Tailwindcss container element in application layout"
|
|
10
14
|
if File.open(APPLICATION_LAYOUT_PATH).read =~ /<body>\n\s*<%= yield %>\n\s*<\/body>/
|
|
11
15
|
insert_into_file APPLICATION_LAYOUT_PATH.to_s, %( <main class="container mx-auto mt-28 px-5 flex">\n ), before: CENTERING_CONTAINER_INSERTION_POINT
|
|
12
16
|
insert_into_file APPLICATION_LAYOUT_PATH.to_s, %(\n </main>), after: CENTERING_CONTAINER_INSERTION_POINT
|
|
13
17
|
end
|
|
14
18
|
else
|
|
15
19
|
say "Default application.html.erb is missing!", :red
|
|
16
|
-
say %( Add <%= stylesheet_link_tag "tailwind", "
|
|
20
|
+
say %( Add <%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %> within the <head> tag in your custom layout.)
|
|
17
21
|
end
|
|
18
22
|
|
|
19
23
|
say "Build into app/assets/builds"
|
|
@@ -28,14 +32,9 @@ if Rails.root.join(".gitignore").exist?
|
|
|
28
32
|
append_to_file(".gitignore", %(\n/app/assets/builds/*\n!/app/assets/builds/.keep\n))
|
|
29
33
|
end
|
|
30
34
|
|
|
31
|
-
unless
|
|
32
|
-
say "Add default
|
|
33
|
-
copy_file "#{__dir__}/tailwind.
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
unless Rails.root.join("app/assets/stylesheets/application.tailwind.css").exist?
|
|
37
|
-
say "Add default app/assets/stylesheets/application.tailwind.css"
|
|
38
|
-
copy_file "#{__dir__}/application.tailwind.css", "app/assets/stylesheets/application.tailwind.css"
|
|
35
|
+
unless TAILWIND_ASSET_PATH.join("application.tailwind.css").exist?
|
|
36
|
+
say "Add default #{TAILWIND_ASSET_PATH}/application.tailwind.css"
|
|
37
|
+
copy_file "#{__dir__}/application.tailwind.css", TAILWIND_ASSET_PATH.join("application.tailwind.css")
|
|
39
38
|
end
|
|
40
39
|
|
|
41
40
|
if Rails.root.join("Procfile.dev").exist?
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
TAILWIND_CONFIG_PATH = Rails.root.join("config/tailwind.config.js")
|
|
2
|
+
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb")
|
|
3
|
+
POSTCSS_CONFIG_PATH = Rails.root.join("config/postcss.config.js")
|
|
4
|
+
OLD_TAILWIND_ASSET_PATH = Rails.root.join("app/assets/stylesheets")
|
|
5
|
+
TAILWIND_ASSET_PATH = Rails.root.join("app/assets/tailwind")
|
|
6
|
+
|
|
7
|
+
unless TAILWIND_CONFIG_PATH.exist?
|
|
8
|
+
say "Default tailwind.config.js is missing!", :red
|
|
9
|
+
abort
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
if File.read(TAILWIND_CONFIG_PATH).match?(/defaultTheme/)
|
|
13
|
+
say "Removing references to 'defaultTheme' from #{TAILWIND_CONFIG_PATH}"
|
|
14
|
+
gsub_file TAILWIND_CONFIG_PATH.to_s, /^(.*defaultTheme)/, "// \\1"
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
if POSTCSS_CONFIG_PATH.exist?
|
|
18
|
+
say "Moving PostCSS configuration to application root directory"
|
|
19
|
+
copy_file POSTCSS_CONFIG_PATH, Rails.root.join("postcss.config.js")
|
|
20
|
+
remove_file POSTCSS_CONFIG_PATH
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
if APPLICATION_LAYOUT_PATH.exist?
|
|
24
|
+
if File.read(APPLICATION_LAYOUT_PATH).match?(/"inter-font"/)
|
|
25
|
+
say "Strip Inter font CSS from application layout"
|
|
26
|
+
gsub_file APPLICATION_LAYOUT_PATH.to_s, %r{, "inter-font"}, ""
|
|
27
|
+
else
|
|
28
|
+
say "Inter font CSS not detected.", :green
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
if File.read(APPLICATION_LAYOUT_PATH).match?(/stylesheet_link_tag :app/) &&
|
|
32
|
+
File.read(APPLICATION_LAYOUT_PATH).match?(/stylesheet_link_tag "tailwind"/)
|
|
33
|
+
say "Remove unnecessary stylesheet_link_tag from application layout"
|
|
34
|
+
gsub_file APPLICATION_LAYOUT_PATH.to_s, %r{^\s*<%= stylesheet_link_tag "tailwind".*%>$}, ""
|
|
35
|
+
end
|
|
36
|
+
else
|
|
37
|
+
say "Default application.html.erb is missing!", :red
|
|
38
|
+
say %( Please check your layouts and remove any "inter-font" stylesheet links.)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
if OLD_TAILWIND_ASSET_PATH.join("application.tailwind.css").exist?
|
|
42
|
+
say "Moving application.tailwind.css to #{TAILWIND_ASSET_PATH}"
|
|
43
|
+
copy_file OLD_TAILWIND_ASSET_PATH.join("application.tailwind.css"), TAILWIND_ASSET_PATH.join("application.tailwind.css")
|
|
44
|
+
remove_file OLD_TAILWIND_ASSET_PATH.join("application.tailwind.css")
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
if system("npx --version")
|
|
48
|
+
say "Running the upstream Tailwind CSS upgrader"
|
|
49
|
+
command = Shellwords.join(["npx", "@tailwindcss/upgrade@next", "--force", "--config", TAILWIND_CONFIG_PATH.to_s])
|
|
50
|
+
success = run(command, abort_on_failure: false)
|
|
51
|
+
unless success
|
|
52
|
+
say "The upgrade tool failed!", :red
|
|
53
|
+
say %( You probably need to update your configuration. Please read the error messages,)
|
|
54
|
+
say %( and check the Tailwind CSS upgrade guide at https://tailwindcss.com/docs/upgrade-guide.)
|
|
55
|
+
abort
|
|
56
|
+
end
|
|
57
|
+
else
|
|
58
|
+
say "Could not run the Tailwind upgrade tool. Please see https://tailwindcss.com/docs/upgrade-guide for manual instructions.", :red
|
|
59
|
+
abort
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
say "Compile initial Tailwind build"
|
|
63
|
+
run "rails tailwindcss:build"
|
data/lib/tailwindcss/commands.rb
CHANGED
|
@@ -8,9 +8,8 @@ module Tailwindcss
|
|
|
8
8
|
|
|
9
9
|
command = [
|
|
10
10
|
Tailwindcss::Ruby.executable(**kwargs),
|
|
11
|
-
"-i", rails_root.join("app/assets/
|
|
11
|
+
"-i", rails_root.join("app/assets/tailwind/application.tailwind.css").to_s,
|
|
12
12
|
"-o", rails_root.join("app/assets/builds/tailwind.css").to_s,
|
|
13
|
-
"-c", rails_root.join("config/tailwind.config.js").to_s,
|
|
14
13
|
]
|
|
15
14
|
|
|
16
15
|
command << "--minify" unless (debug || rails_css_compressor?)
|
data/lib/tailwindcss/engine.rb
CHANGED
|
@@ -2,14 +2,16 @@ require "rails"
|
|
|
2
2
|
|
|
3
3
|
module Tailwindcss
|
|
4
4
|
class Engine < ::Rails::Engine
|
|
5
|
-
initializer "tailwindcss.assets" do
|
|
6
|
-
Rails.application.config.assets.precompile += %w( inter-font.css )
|
|
7
|
-
end
|
|
8
|
-
|
|
9
5
|
initializer "tailwindcss.disable_generator_stylesheets" do
|
|
10
6
|
Rails.application.config.generators.stylesheets = false
|
|
11
7
|
end
|
|
12
8
|
|
|
9
|
+
initializer "tailwindcss.exclude_asset_path", after: "propshaft.append_assets_path" do
|
|
10
|
+
if Rails.application.config.assets.excluded_paths # the app may not be using Propshaft
|
|
11
|
+
Rails.application.config.assets.excluded_paths << Rails.root.join("app/assets/tailwind")
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
13
15
|
config.app_generators do |g|
|
|
14
16
|
g.template_engine :tailwindcss
|
|
15
17
|
end
|
data/lib/tailwindcss/version.rb
CHANGED
data/lib/tasks/install.rake
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
namespace :tailwindcss do
|
|
2
2
|
desc "Install Tailwind CSS into the app"
|
|
3
3
|
task :install do
|
|
4
|
-
system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/
|
|
4
|
+
system "#{RbConfig.ruby} ./bin/rails app:template LOCATION=#{File.expand_path("../install/install_tailwindcss.rb", __dir__)}"
|
|
5
5
|
end
|
|
6
6
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tailwindcss-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 4.0.0.rc2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Heinemeier Hansson
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-01-
|
|
10
|
+
date: 2025-01-26 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: railties
|
|
@@ -29,14 +29,14 @@ dependencies:
|
|
|
29
29
|
requirements:
|
|
30
30
|
- - "~>"
|
|
31
31
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
32
|
+
version: '4.0'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
36
36
|
requirements:
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '
|
|
39
|
+
version: '4.0'
|
|
40
40
|
email: david@loudthinking.com
|
|
41
41
|
executables: []
|
|
42
42
|
extensions: []
|
|
@@ -61,7 +61,6 @@ files:
|
|
|
61
61
|
- app/assets/fonts/Inter-roman.latin.var.woff2
|
|
62
62
|
- app/assets/fonts/Inter-roman.symbols.var.woff2
|
|
63
63
|
- app/assets/fonts/Inter-roman.vietnamese.var.woff2
|
|
64
|
-
- app/assets/stylesheets/inter-font.css
|
|
65
64
|
- lib/generators/tailwindcss/authentication/authentication_generator.rb
|
|
66
65
|
- lib/generators/tailwindcss/authentication/templates/app/views/passwords/edit.html.erb
|
|
67
66
|
- lib/generators/tailwindcss/authentication/templates/app/views/passwords/new.html.erb
|
|
@@ -83,8 +82,8 @@ files:
|
|
|
83
82
|
- lib/install/Procfile.dev
|
|
84
83
|
- lib/install/application.tailwind.css
|
|
85
84
|
- lib/install/dev
|
|
86
|
-
- lib/install/
|
|
87
|
-
- lib/install/
|
|
85
|
+
- lib/install/install_tailwindcss.rb
|
|
86
|
+
- lib/install/upgrade_tailwindcss.rb
|
|
88
87
|
- lib/puma/plugin/tailwindcss.rb
|
|
89
88
|
- lib/tailwindcss-rails.rb
|
|
90
89
|
- lib/tailwindcss/commands.rb
|
|
@@ -94,6 +93,7 @@ files:
|
|
|
94
93
|
- lib/tasks/build.rake
|
|
95
94
|
- lib/tasks/clobber.rake
|
|
96
95
|
- lib/tasks/install.rake
|
|
96
|
+
- lib/tasks/upgrade.rake
|
|
97
97
|
homepage: https://github.com/rails/tailwindcss-rails
|
|
98
98
|
licenses:
|
|
99
99
|
- MIT
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
*= link_directory ../fonts
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
@font-face {
|
|
6
|
-
font-family: 'Inter var';
|
|
7
|
-
font-style: italic;
|
|
8
|
-
font-weight: 100 900;
|
|
9
|
-
font-display: swap;
|
|
10
|
-
src: url('Inter-italic.extra.var.woff2') format('woff2');
|
|
11
|
-
unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
|
|
12
|
-
font-named-instance: 'Italic';
|
|
13
|
-
}
|
|
14
|
-
/* alternates */
|
|
15
|
-
@font-face {
|
|
16
|
-
font-family: 'Inter var';
|
|
17
|
-
font-style: italic;
|
|
18
|
-
font-weight: 100 900;
|
|
19
|
-
font-display: swap;
|
|
20
|
-
src: url('Inter-italic.alternates.var.woff2') format('woff2');
|
|
21
|
-
unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
|
|
22
|
-
font-named-instance: 'Italic';
|
|
23
|
-
}
|
|
24
|
-
/* symbols */
|
|
25
|
-
@font-face {
|
|
26
|
-
font-family: 'Inter var';
|
|
27
|
-
font-style: italic;
|
|
28
|
-
font-weight: 100 900;
|
|
29
|
-
font-display: swap;
|
|
30
|
-
src: url('Inter-italic.symbols.var.woff2') format('woff2');
|
|
31
|
-
unicode-range: U+20DD-20DF,U+2190-219A,U+21A9-21AB,U+21B0-21B2,U+21B3-21B6,U+21BA-21BC,U+21D0,U+21D2,U+21D4,U+21DE-21E0,U+21E4-21E6,U+21E7,U+21EA,U+2303,U+2305,U+2318,U+2325-2328,U+232B,U+2380,U+2387,U+238B,U+23CE-23D0,U+2460-2469,U+24B6-24D0,U+24EA,U+25A0-25A3,U+25B2-25B4,U+25B6-25B8,U+25BA-25BE,U+25C0-25C2,U+25C4-25C8,U+25CB,U+25CF,U+25EF,U+2600,U+2605-2607,U+263C,U+2661,U+2665,U+26A0,U+2713,U+2717,U+2756,U+2764,U+2780-2789,U+27F5-27FB,U+2B06,U+2B12-2B14,U+2B1C,U+E000,U+E12B-E164,U+1F130-1F14A,U+1F850,U+1F852;
|
|
32
|
-
font-named-instance: 'Italic';
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/* extra */
|
|
36
|
-
@font-face {
|
|
37
|
-
font-family: 'Inter var';
|
|
38
|
-
font-style: italic;
|
|
39
|
-
font-weight: 100 900;
|
|
40
|
-
font-display: swap;
|
|
41
|
-
src: url('Inter-italic.extra.var.woff2') format('woff2');
|
|
42
|
-
unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
|
|
43
|
-
font-named-instance: 'Italic';
|
|
44
|
-
}
|
|
45
|
-
/* alternates */
|
|
46
|
-
@font-face {
|
|
47
|
-
font-family: 'Inter var';
|
|
48
|
-
font-style: italic;
|
|
49
|
-
font-weight: 100 900;
|
|
50
|
-
font-display: swap;
|
|
51
|
-
src: url('Inter-italic.alternates.var.woff2') format('woff2');
|
|
52
|
-
unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
|
|
53
|
-
font-named-instance: 'Italic';
|
|
54
|
-
}
|
|
55
|
-
/* symbols */
|
|
56
|
-
@font-face {
|
|
57
|
-
font-family: 'Inter var';
|
|
58
|
-
font-style: italic;
|
|
59
|
-
font-weight: 100 900;
|
|
60
|
-
font-display: swap;
|
|
61
|
-
src: url('Inter-italic.symbols.var.woff2') format('woff2');
|
|
62
|
-
unicode-range: U+20DD-20DF,U+2190-219A,U+21A9-21AB,U+21B0-21B2,U+21B3-21B6,U+21BA-21BC,U+21D0,U+21D2,U+21D4,U+21DE-21E0,U+21E4-21E6,U+21E7,U+21EA,U+2303,U+2305,U+2318,U+2325-2328,U+232B,U+2380,U+2387,U+238B,U+23CE-23D0,U+2460-2469,U+24B6-24D0,U+24EA,U+25A0-25A3,U+25B2-25B4,U+25B6-25B8,U+25BA-25BE,U+25C0-25C2,U+25C4-25C8,U+25CB,U+25CF,U+25EF,U+2600,U+2605-2607,U+263C,U+2661,U+2665,U+26A0,U+2713,U+2717,U+2756,U+2764,U+2780-2789,U+27F5-27FB,U+2B06,U+2B12-2B14,U+2B1C,U+E000,U+E12B-E164,U+1F130-1F14A,U+1F850,U+1F852;
|
|
63
|
-
font-named-instance: 'Italic';
|
|
64
|
-
}
|
|
65
|
-
/* cyrillic */
|
|
66
|
-
@font-face {
|
|
67
|
-
font-family: 'Inter var';
|
|
68
|
-
font-style: italic;
|
|
69
|
-
font-weight: 100 900;
|
|
70
|
-
font-display: swap;
|
|
71
|
-
src: url('Inter-italic.cyrillic.var.woff2') format('woff2');
|
|
72
|
-
unicode-range: U+0400-049E,U+04A0-0500,U+052F,U+20B4,U+2116,U+2DFF,U+A69F;
|
|
73
|
-
font-named-instance: 'Italic';
|
|
74
|
-
}
|
|
75
|
-
/* greek */
|
|
76
|
-
@font-face {
|
|
77
|
-
font-family: 'Inter var';
|
|
78
|
-
font-style: italic;
|
|
79
|
-
font-weight: 100 900;
|
|
80
|
-
font-display: swap;
|
|
81
|
-
src: url('Inter-italic.greek.var.woff2') format('woff2');
|
|
82
|
-
unicode-range: U+0370-0378,U+037A-0380,U+0384-038B,U+038C,U+038E-03A2,U+03A3-03E2,U+03F0-0400,U+1F00-1F16,U+1F18-1F1E,U+1F20-1F46,U+1F48-1F4E,U+1F50-1F58,U+1F59,U+1F5B,U+1F5D,U+1F5F-1F7E,U+1F80-1FB5,U+1FB6-1FC5,U+1FC6-1FD4,U+1FD6-1FDC,U+1FDD-1FF0,U+1FF2-1FF5,U+1FF6-1FFF;
|
|
83
|
-
font-named-instance: 'Italic';
|
|
84
|
-
}
|
|
85
|
-
/* vietnamese */
|
|
86
|
-
@font-face {
|
|
87
|
-
font-family: 'Inter var';
|
|
88
|
-
font-style: italic;
|
|
89
|
-
font-weight: 100 900;
|
|
90
|
-
font-display: swap;
|
|
91
|
-
src: url('Inter-italic.vietnamese.var.woff2') format('woff2');
|
|
92
|
-
unicode-range: U+0102-0104,U+0110-0112,U+0128-012A,U+0168-016A,U+01A0-01A2,U+01AF-01B1,U+1EA0-1EFA,U+20AB;
|
|
93
|
-
font-named-instance: 'Italic';
|
|
94
|
-
}
|
|
95
|
-
/* latin-ext */
|
|
96
|
-
@font-face {
|
|
97
|
-
font-family: 'Inter var';
|
|
98
|
-
font-style: italic;
|
|
99
|
-
font-weight: 100 900;
|
|
100
|
-
font-display: swap;
|
|
101
|
-
src: url('Inter-italic.latin-ext.var.woff2') format('woff2');
|
|
102
|
-
unicode-range: U+0100-0149,U+014A-01C4,U+01C5-0250,U+0259,U+1E00-1F00,U+2020,U+20A0-20AC,U+20AD-20C0,U+2113,U+2C7C,U+2C7F,U+A7FF;
|
|
103
|
-
font-named-instance: 'Italic';
|
|
104
|
-
}
|
|
105
|
-
/* latin */
|
|
106
|
-
@font-face {
|
|
107
|
-
font-family: 'Inter var';
|
|
108
|
-
font-style: italic;
|
|
109
|
-
font-weight: 100 900;
|
|
110
|
-
font-display: swap;
|
|
111
|
-
src: url('Inter-italic.latin.var.woff2') format('woff2');
|
|
112
|
-
unicode-range: U+0000-007F,U+00A0-0100,U+0131,U+0152-0154,U+02BB-02BD,U+02C6,U+02DA,U+02DC,U+2000-200C,U+2010-2028,U+202F-2060,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF;
|
|
113
|
-
font-named-instance: 'Italic';
|
|
114
|
-
}
|
|
115
|
-
/* extra */
|
|
116
|
-
@font-face {
|
|
117
|
-
font-family: 'Inter var';
|
|
118
|
-
font-style: normal;
|
|
119
|
-
font-weight: 100 900;
|
|
120
|
-
font-display: swap;
|
|
121
|
-
src: url('Inter-roman.extra.var.woff2') format('woff2');
|
|
122
|
-
unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
|
|
123
|
-
font-named-instance: 'Regular';
|
|
124
|
-
}
|
|
125
|
-
/* alternates */
|
|
126
|
-
@font-face {
|
|
127
|
-
font-family: 'Inter var';
|
|
128
|
-
font-style: normal;
|
|
129
|
-
font-weight: 100 900;
|
|
130
|
-
font-display: swap;
|
|
131
|
-
src: url('Inter-roman.alternates.var.woff2') format('woff2');
|
|
132
|
-
unicode-range: U+E000,U+E002-E081,U+E093-E097,U+E0A5-E0E7,U+E0F3-E11D,U+E11E-E165,U+EE01,U+F6C3;
|
|
133
|
-
font-named-instance: 'Regular';
|
|
134
|
-
}
|
|
135
|
-
/* symbols */
|
|
136
|
-
@font-face {
|
|
137
|
-
font-family: 'Inter var';
|
|
138
|
-
font-style: normal;
|
|
139
|
-
font-weight: 100 900;
|
|
140
|
-
font-display: swap;
|
|
141
|
-
src: url('Inter-roman.symbols.var.woff2') format('woff2');
|
|
142
|
-
unicode-range: U+20DD-20DF,U+2190-219A,U+21A9-21AB,U+21B0-21B2,U+21B3-21B6,U+21BA-21BC,U+21D0,U+21D2,U+21D4,U+21DE-21E0,U+21E4-21E6,U+21E7,U+21EA,U+2303,U+2305,U+2318,U+2325-2328,U+232B,U+2380,U+2387,U+238B,U+23CE-23D0,U+2460-2469,U+24B6-24D0,U+24EA,U+25A0-25A3,U+25B2-25B4,U+25B6-25B8,U+25BA-25BE,U+25C0-25C2,U+25C4-25C8,U+25CB,U+25CF,U+25EF,U+2600,U+2605-2607,U+263C,U+2661,U+2665,U+26A0,U+2713,U+2717,U+2756,U+2764,U+2780-2789,U+27F5-27FB,U+2B06,U+2B12-2B14,U+2B1C,U+E000,U+E12B-E164,U+1F130-1F14A,U+1F850,U+1F852;
|
|
143
|
-
font-named-instance: 'Regular';
|
|
144
|
-
}
|
|
145
|
-
/* cyrillic */
|
|
146
|
-
@font-face {
|
|
147
|
-
font-family: 'Inter var';
|
|
148
|
-
font-style: normal;
|
|
149
|
-
font-weight: 100 900;
|
|
150
|
-
font-display: swap;
|
|
151
|
-
src: url('Inter-roman.cyrillic.var.woff2') format('woff2');
|
|
152
|
-
unicode-range: U+0400-049E,U+04A0-0500,U+052F,U+20B4,U+2116,U+2DFF,U+A69F;
|
|
153
|
-
font-named-instance: 'Regular';
|
|
154
|
-
}
|
|
155
|
-
/* greek */
|
|
156
|
-
@font-face {
|
|
157
|
-
font-family: 'Inter var';
|
|
158
|
-
font-style: normal;
|
|
159
|
-
font-weight: 100 900;
|
|
160
|
-
font-display: swap;
|
|
161
|
-
src: url('Inter-roman.greek.var.woff2') format('woff2');
|
|
162
|
-
unicode-range: U+0370-0378,U+037A-0380,U+0384-038B,U+038C,U+038E-03A2,U+03A3-03E2,U+03F0-0400,U+1F00-1F16,U+1F18-1F1E,U+1F20-1F46,U+1F48-1F4E,U+1F50-1F58,U+1F59,U+1F5B,U+1F5D,U+1F5F-1F7E,U+1F80-1FB5,U+1FB6-1FC5,U+1FC6-1FD4,U+1FD6-1FDC,U+1FDD-1FF0,U+1FF2-1FF5,U+1FF6-1FFF;
|
|
163
|
-
font-named-instance: 'Regular';
|
|
164
|
-
}
|
|
165
|
-
/* vietnamese */
|
|
166
|
-
@font-face {
|
|
167
|
-
font-family: 'Inter var';
|
|
168
|
-
font-style: normal;
|
|
169
|
-
font-weight: 100 900;
|
|
170
|
-
font-display: swap;
|
|
171
|
-
src: url('Inter-roman.vietnamese.var.woff2') format('woff2');
|
|
172
|
-
unicode-range: U+0102-0104,U+0110-0112,U+0128-012A,U+0168-016A,U+01A0-01A2,U+01AF-01B1,U+1EA0-1EFA,U+20AB;
|
|
173
|
-
font-named-instance: 'Regular';
|
|
174
|
-
}
|
|
175
|
-
/* latin-ext */
|
|
176
|
-
@font-face {
|
|
177
|
-
font-family: 'Inter var';
|
|
178
|
-
font-style: normal;
|
|
179
|
-
font-weight: 100 900;
|
|
180
|
-
font-display: swap;
|
|
181
|
-
src: url('Inter-roman.latin-ext.var.woff2') format('woff2');
|
|
182
|
-
unicode-range: U+0100-0149,U+014A-01C4,U+01C5-0250,U+0259,U+1E00-1F00,U+2020,U+20A0-20AC,U+20AD-20C0,U+2113,U+2C7C,U+2C7F,U+A7FF;
|
|
183
|
-
font-named-instance: 'Regular';
|
|
184
|
-
}
|
|
185
|
-
/* latin */
|
|
186
|
-
@font-face {
|
|
187
|
-
font-family: 'Inter var';
|
|
188
|
-
font-style: normal;
|
|
189
|
-
font-weight: 100 900;
|
|
190
|
-
font-display: swap;
|
|
191
|
-
src: url('Inter-roman.latin.var.woff2') format('woff2');
|
|
192
|
-
unicode-range: U+0000-007F,U+00A0-0100,U+0131,U+0152-0154,U+02BB-02BD,U+02C6,U+02DA,U+02DC,U+2000-200C,U+2010-2028,U+202F-2060,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+FEFF;
|
|
193
|
-
font-named-instance: 'Regular';
|
|
194
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const defaultTheme = require('tailwindcss/defaultTheme')
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
content: [
|
|
5
|
-
'./public/*.html',
|
|
6
|
-
'./app/helpers/**/*.rb',
|
|
7
|
-
'./app/javascript/**/*.js',
|
|
8
|
-
'./app/views/**/*.{erb,haml,html,slim}'
|
|
9
|
-
],
|
|
10
|
-
theme: {
|
|
11
|
-
extend: {
|
|
12
|
-
fontFamily: {
|
|
13
|
-
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
plugins: [
|
|
18
|
-
// require('@tailwindcss/forms'),
|
|
19
|
-
// require('@tailwindcss/typography'),
|
|
20
|
-
// require('@tailwindcss/container-queries'),
|
|
21
|
-
]
|
|
22
|
-
}
|