Results for “int”
Small, practical examples. Search by task or narrow things down below.
Style a card based on a selected descendant
CSS: Has matches the parent when its relative selector finds a checked control inside it.
CSS✓ Tested
Style a control that fails native validation
CSS: Invalid reflects the input’s current constraint-validation result.
CSS✓ Tested
Style content associated with a checked option
CSS: The adjacent-sibling selector connects a checked control with its following label text.
CSS✓ Tested
Style placeholder text independently of entered text
CSS: The placeholder pseudo-element affects the hint, while the input rule styles the actual value.
CSS✓ Tested
Toggle an output using an explicit software state
Arduino / C: Keep the intended output state in a Boolean variable.
Arduino / C✓ Tested
Track which union member is currently valid
C: An explicit tag tells callers which overlaid union value to read.
C✓ Tested
Validate a field when focus leaves it
Validate a field when focus leaves it with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Validate a structured text identifier
HTML: The pattern attribute matches the entire nonempty input; required handles the empty case.
HTML✓ Tested
Validate the shape of an absolute URL
HTML: A URL input checks syntax, not whether a resource exists or is safe.
HTML✓ Tested
Verify a file against a checksum manifest
Linux Commands: Use sha256sum -c with a manifest obtained from a trusted source.
Linux Commands✓ Tested
Visually distinguish a disabled control
CSS: The disabled pseudo-class follows the control’s actual disabled state.
CSS✓ Tested
Accept several lines of text
HTML: Learn how to accept several lines of text in a complete browser example.
HTML✓ Tested