Results for “if”
Small, practical examples. Search by task or narrow things down below.
Sort timestamp strings by their parsed instants
TypeScript: Compare epoch values explicitly when date strings may contain different offsets.
TypeScript✓ Tested
Span a grid item across multiple columns
CSS: Grid-column span counts tracks and includes the gaps between them.
CSS✓ Tested
Span a group header across several rows
HTML: Rowspan can label a group of related rows without repeating the label.
HTML✓ Tested
Span one header across several columns
HTML: Colspan lets a heading cover a defined number of columns in the table grid.
HTML✓ Tested
Split a string into words
Split text on whitespace, automatically treating repeated spaces, tabs, and line breaks as a single separator.
string✓ Tested
Split a writable comma-delimited buffer
Arduino / C: strtok modifies its buffer and returns successive tokens.
Arduino / C✓ Tested
Split delimited text with positions
Retain original order with STRING_SPLIT ordinals.
STRING_SPLIT✓ Tested
Stack flex items vertically
CSS: Flex-direction column makes the main axis vertical.
CSS✓ Tested
Start a disclosure open while keeping it collapsible
HTML: The open attribute sets the initial details state without JavaScript.
HTML✓ Tested
Stop tracking a generated file while keeping it locally
Git: Removing a path from the index leaves its working copy intact when cached is specified.
Git✓ Tested
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