- From: Bramus via GitHub <sysbot+gh@w3.org>
- Date: Thu, 12 Sep 2024 10:14:19 +0000
- To: public-css-archive@w3.org
Angular [defines](https://v17.angular.io/api/forms/AbstractControl#properties) the following: State | Description -- | -- `pristine` | A control is pristine if the user has not yet changed the value in the UI. `dirty` | A control is dirty if the user has changed the value in the UI. `touched` | True if the control is marked as touched. A control is marked touched once the user has triggered a blur event on it. `untouched` | True if the control has not been marked as touched. A control is untouched if the user has not yet triggered a blur event on it. These terms also appear in popular libraries such as React Hook Form, see [its `useFormState` hook](https://react-hook-form.com/docs/useformstate). These all seems like reasonable pseudos to add to CSS. Regarding the relation to `user-valid`/`user-invalid`: - The `pristine`/`dirty` pair triggers much earlier - The `touched`/`untouched` pair triggers much later Also note that an input can be both `touched` and `pristine` in case the user has edited the value, but then changed it back to its original value. -- GitHub Notification of comment by bramus Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1533#issuecomment-2345842861 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Thursday, 12 September 2024 10:14:20 UTC