Results for “condition”
Small, practical examples. Search by task or narrow things down below.
Mount expensive content only when requested
Mount expensive content only when requested with a small React component and explicit browser behavior.
React✓ Tested
Provide a fallback for an unset custom property
CSS: The second var argument supplies a value when the custom property is unavailable.
CSS✓ Tested
Scale a value from the root font size
CSS: Rem units follow the document root instead of accumulating through nested font sizes.
CSS✓ Tested
Turn known group values into columns
SQL: Conditional aggregation gives a portable pivot when the category set is known.
SQL✓ Tested
Turn known group values into columns
SQL Server: Conditional aggregation gives a portable pivot when the category set is known.
SQL Server✓ Tested
Turn known group values into columns
Postgres: Conditional aggregation gives a portable pivot when the category set is known.
Postgres✓ Tested
Turn known group values into columns
SQLite: Conditional aggregation gives a portable pivot when the category set is known.
SQLite✓ Tested
Branch on whether a pattern exists
Linux Commands: Use grep -q in a conditional so an ordinary no-match result is not an unhandled failure.
Linux Commands✓ Tested
Choose a different image for a small viewport
HTML: Picture evaluates source media conditions before falling back to the img source.
HTML✓ Tested
Delete one row from a practice table
SQL: Restrict DELETE with a primary-key condition and verify the remaining row count.
SQL✓ Tested
Delete one row from a practice table
SQL Server: Restrict DELETE with a primary-key condition and verify the remaining row count.
SQL Server✓ Tested
Delete one row from a practice table
Postgres: Restrict DELETE with a primary-key condition and verify the remaining row count.
Postgres✓ Tested