Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Mar 28, 2023

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

RobinMalfait and others added 8 commits March 27, 2023 12:32
* reset other properties on `line-clamp-none`

* update CHANGELOG
* ensure we have no dependencies when `absoluteFilePath` is `null`

This happens in the CLI where we don't have a guaranteed `path` for the
config file. This can happen in practice if you use:

```console
npx tailwindcss --content ./index.html -o ./output.css
```

... and if you don't have a `tailwind.config.{js,ts,cjs,...}` in the
current directory.

* update changelog
* fix assumption when resolving dependencies

When resolving dependencies given a path, we are only interested
relative files from the current file. We are not interested in the
dependencies that are listed in your `package.json` and thus in your
`node_modules` folder.

We made the assumption that your imports have at least 3 characters.
This sort of makes sense because there will be a `.`, then the OS
separator like `/` and than a file name. E.g.: `./a` is the minimal
amount of characters.

This makes sense for `import` statements, but in the case of `require`,
it is totally valid to write `require('.')`. This will require the
current `index.{js,ts,mjs,cjs,...}` in the current directory.

Before this change, having a `require('.')` wouldn't crash, but the
dependency would not be marked as a module dependencies and therefore we
won't listen for file changes for that dependency.

* update changelog
@pull pull bot added the ⤵️ pull label Mar 28, 2023
depfu bot and others added 6 commits March 28, 2023 15:39
* add gradient color stop positions

* update tests to include gradient position color stop reset values

* add dedicated color stop position tests

* use `%` sign in the name of the uility

* update changelog

* ensure `length` values and css variables work
…ile is resolved correctly (#10898)

* try to use `config.default` before using `config`

* update changelog

* add quick `SHOW_OUTPUT` toggle for integration tests

Setting this to `true` shows the output of the executed commands.

* add integration tests for `tailwind.config.ts` and `tailwind.config.js` with ESM syntax
thecrypticace and others added 2 commits March 29, 2023 21:37
…10903)

* Pull pseudo elements outside of `:is` and `:has` when using `@apply`

* Update changelog

* Refactor

* Update important selector handling for :is and :has

* fixup

* fixup

* trigger CI

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
* Revert prepare of v3.3

* Revert "Revert prepare of v3.3"

This reverts commit 14d5a0a.

* update SafelistConfig type

I think this type was meant to be like this?

* format types

* update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
RobinMalfait and others added 4 commits March 30, 2023 18:42
* drop `@tailwindcss/line-clamp` check

This won't work in places where `require` calls are hoisted so that
they become static imports. This means that in some projects this
`require` call was breaking the full application even though it was
intentionally put in a try/catch block...

* update changelog
* WIP

* Move warning to validateConfig

This only happens in setupTrackingContext outside of resolveConfig

* Use original dynamic require approach in `validateConfig`

The important thing is that this happens in Node-land only. It is outside of `resolveConfig` which is public and importable into user projects. That is the scenario that breaks because of static import hoisting.

* Don’t reference process when it might be undefined

The `resolveConfig` dep path is public which should not reference process. However, we have some behavior that changes based on env vars so we need to conditionalize it instead.

* Update changelog

* Formatting

* More formatting

* Update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
thecrypticace and others added 28 commits June 5, 2024 12:53
* Disable automatic `var()` injection for CSS anchor positioning properties

* Update tests

* Update changelog
…r-none` utilities (#13830)

* map `backdrop-blur-none` and `blur-none` to ` ` instead of `blur(0px)`

* add test for `backdrop-blur-none` and `blur-none`

* update changelog
* refactor(util): code refactor

* refactor(util): code refactor
* add `tailwind.config.cts` and `tailwind.config.mts` as default config files

* always use jiti when working with ESM or TS files

* update changelog

* add integration test for `.cts` and `.mts` configuration files
…13959)

* Avoid over-extracting utilities from candidates with decimal values

Prevent candidates like `px-1.5` from generating both the `px-1.5` class and the `px-1` class.

* Update CHANGELOG.md

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
* Always generate -webkit-backdrop-filter property

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
A class name starting with number like `2xl:bg-red-500` must not be removed.

Resolves #14005
#14019)

* Fix class detection in Slim templates with attached attributes and IDs

* Update changelog

* Tweak regex
)

Fixes #14026 
See #14040 for the v4 fix

When translating `data-` and `aria-` modifiers with attribute selectors,
we currently do not wrap the target attribute in quotes. This only works
for keywords (purely alphabetic words) but breaks as soon as there are
numbers or things like spaces in the attribute:

```html
<div data-id="foo" class="data-[id=foo]:underline">underlined</div>
<div data-id="f1" class="data-[id=1]:underline">not underlined</div>
<div data-id="foo bar" class="data-[id=foo_bar]:underline">not underlined</div>
```

Since it's fairly common to have attribute selectors with `data-` and
`aria-` modifiers, this PR will now wrap the attribute in quotes unless
these are already wrapped.

| Tailwind Modifier  | CSS Selector |
| ------------- | ------------- |
| `.data-[id=foo]`  | `[data-id='foo']`  |
| `.data-[id='foo']`  | `[data-id='foo']`  |
| `.data-[id=foo_i]`  | `[data-id='foo i']`  |
| `.data-[id='foo'_i]`  | `[data-id='foo' i]`  |
| `.data-[id=123]`  | `[data-id='123']`  |

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
We bundle cssnano in our CLI and it's on an older version that does not
handle nested CSS correctly. This PR updates it to the latest version of
v6.x

Fixes #14092
…14140)

When you use a glob pattern in your `content` configuration that is too
broad, it could be that you are accidentally including files that you
didn't intend to include. E.g.: all of `node_modules`

This has been documented in the [Tailwind CSS
documentation](https://tailwindcss.com/docs/content-configuration#pattern-recommendations),
but it's still something that a lot of people run into.

This PR will try to detect those patterns and show a big warning to let
you know if you may have done something wrong.

We will show a warning if all of these conditions are true:

1. We detect `**` in the glob pattern
2. _and_ you didn't explicitly use `node_modules` in the glob pattern
3. _and_ we found files that include `node_modules` in the file path
4. _and_ no other globs exist that explicitly match the found file

With these rules in place, the DX has nice trade-offs:

1. Very simple projects (that don't even have a `node_modules` folder),
can simply use `./**/*` because while resolving actual files we won't
see files from `node_modules` and thus won't warn.
2. If you use `./src/**` and you do have a `node_modules`, then we also
won't complain (unless you have a `node_modules` folder in the `./src`
folder).
3. If you work with a 3rd party library that you want to make changes
to. Using an explicit match like `./node_modules/my-package/**/*` is
allowed because `node_modules` is explicitly mentioned.

Note: this only shows a warning, it does not stop the process entirely.
The warning will be show when the very first file in the `node_modules`
is detected.

<!--

👋 Hey, thanks for your interest in contributing to Tailwind!

**Please ask first before starting work on any significant new
features.**

It's never a fun experience to have your pull request declined after
investing a lot of time and effort into a new feature. To avoid this
from happening, we request that contributors create an issue to first
discuss any significant new features. This includes things like adding
new utilities, creating new at-rules, or adding new component examples
to the documentation.


https://github.com/tailwindcss/tailwindcss/blob/master/.github/CONTRIBUTING.md

-->

---------

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
@RobinMalfait RobinMalfait deleted the branch Kitcel12:master August 7, 2024 15:22
@RobinMalfait RobinMalfait deleted the master branch August 7, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.