Sebastian Markbåge
2e4db3344f
Use valid CSS selectors in useId format ( #32001 )
...
For the `useId` algorithm we used colon `:` before and after.
https://github.com/facebook/react/pull/23360
This avoids collisions in general by using an unusual characters. It
also avoids collisions when concatenated with some other ID.
Unfortunately, `:` is not a valid character in `view-transition-name`.
This PR swaps the format from:
```
:r123:
```
To the unicode:
```
«r123»
```
Which is valid CSS selectors. This also allows them being used for
`querySelector()` which we didn't really find a legit use for but seems
ok-ish.
That way you can get a view-transition-name that you can manually
reference. E.g. to generate styles:
```js
const id = useId();
return <>
<style>{`
::view-transition-group(${id}) { ... }
::view-transition-old(${id}) { ... }
::view-transition-new(${id}) { ... }
`}</style>
<ViewTransition name={id}>...</ViewTransition>
</>;
```
2025-02-25 12:45:18 -05:00
..
2025-01-02 15:28:06 -05:00
2025-01-02 15:28:06 -05:00
2025-01-02 15:28:06 -05:00
2024-02-13 11:39:45 -05:00
2025-01-02 15:28:06 -05:00
2025-01-02 15:28:06 -05:00
2024-02-13 11:39:45 -05:00
2024-03-26 23:44:07 -04:00
2025-01-02 15:28:06 -05:00
2024-06-06 10:07:24 -07:00
2025-01-02 15:28:06 -05:00
2025-01-08 12:08:30 -05:00
2025-01-02 15:28:06 -05:00
2024-06-10 14:31:37 -04:00
2024-01-24 10:58:07 -05:00
2025-01-02 15:28:06 -05:00
2025-01-02 15:28:06 -05:00
2025-02-06 15:05:51 -08:00
2025-01-02 15:28:06 -05:00
2025-01-02 15:28:15 -05:00
2025-01-02 15:53:06 -05:00
2024-07-12 13:02:22 -04:00
2024-07-12 13:02:22 -04:00
2024-04-09 12:20:22 -04:00
2024-05-20 22:01:39 +02:00
2025-01-02 15:53:06 -05:00
2025-01-02 15:53:06 -05:00
2025-01-17 10:54:11 -08:00
2025-01-02 15:53:06 -05:00
2025-02-21 09:48:32 -08:00
2024-06-10 14:31:37 -04:00
2024-02-13 11:39:45 -05:00
2025-01-17 10:54:11 -08:00
2024-12-12 23:06:07 -05:00
2024-10-19 22:33:28 -04:00
2025-01-17 10:54:11 -08:00
2024-06-06 10:07:24 -07:00
2024-08-20 13:30:51 -07:00
2024-07-22 16:09:01 -04:00
2025-02-06 15:05:51 -08:00
2025-01-24 09:25:30 -08:00
2024-03-04 08:19:17 -08:00
2024-06-03 07:51:21 -07:00
2024-06-10 18:41:56 -04:00
2024-02-02 09:15:43 +01:00
2024-06-10 14:31:37 -04:00
2025-01-02 15:53:06 -05:00
2024-02-13 11:39:45 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2024-03-22 12:22:30 -04:00
2024-07-24 10:17:33 -04:00
2024-06-10 14:31:37 -04:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2024-02-13 11:39:45 -05:00
2025-01-05 17:10:29 -05:00
2024-02-02 08:58:30 +01:00
2025-01-06 14:13:03 -05:00
2024-04-03 09:25:02 -04:00
2024-02-20 22:49:34 +01:00
2024-02-20 22:49:34 +01:00
2025-01-06 14:13:03 -05:00
2024-02-20 22:49:34 +01:00
2025-02-11 14:18:50 -05:00
2024-04-03 09:25:02 -04:00
2025-01-06 14:13:03 -05:00
2024-07-09 19:55:09 -04:00
2024-12-15 12:16:10 -05:00
2024-04-18 21:06:04 -07:00
2024-06-14 13:17:43 -04:00
2024-02-20 22:49:34 +01:00
2024-06-21 12:24:32 -04:00
2024-11-06 14:00:10 -05:00
2024-04-03 09:25:02 -04:00
2024-02-20 22:49:34 +01:00
2024-04-03 09:25:02 -04:00
2025-02-04 12:30:30 -08:00
2024-06-10 14:31:37 -04:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2024-04-24 08:50:32 -07:00
2024-07-22 16:09:01 -04:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2024-09-11 11:41:54 -04:00
2024-01-26 10:17:09 +01:00
2024-02-13 11:39:45 -05:00
2025-01-05 17:10:29 -05:00
2024-01-29 09:11:02 +01:00
2025-02-25 12:45:18 -05:00
2024-04-24 08:50:32 -07:00
2025-01-05 17:10:29 -05:00
2024-02-01 18:48:58 -05:00
2024-03-26 23:44:07 -04:00
2024-02-13 11:39:45 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2024-06-10 14:31:37 -04:00
2025-01-05 17:10:29 -05:00
2024-01-26 17:28:58 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2024-02-13 11:39:45 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2025-01-05 17:10:29 -05:00
2024-03-27 12:02:36 -07:00
2025-01-05 17:10:29 -05:00
2024-06-10 14:31:37 -04:00
2025-02-13 18:26:36 +01:00
2024-06-10 14:31:37 -04:00
2024-01-22 17:13:10 -05:00
2025-01-05 17:10:29 -05:00
2024-09-11 11:41:54 -04:00
2024-03-11 22:11:40 +01:00
2024-11-06 14:00:10 -05:00
2024-03-04 08:19:17 -08:00
2025-02-06 15:05:51 -08:00