FIND YOUR NEXT FEW LINES

Results for “Accessibility & reusable patterns”

Small, practical examples. Search by task or narrow things down below.

89 snippets foundClear filters
CSSVisual treatment & accessibility

Align an image within its content box

CSS: Object-position places the rendered object when fitting leaves spare space or crops an edge.

CSS✓ Tested
CSSVisual treatment & accessibility

Allow pointer input to pass through a decorative overlay

CSS: Pointer-events none excludes the overlay from ordinary pointer hit testing.

CSS✓ Tested
ReactAccessibility & events

Announce a status update politely

Announce a status update politely with a small React component and explicit browser behavior.

React✓ Tested
GoTesting & reusable helpers

Check a function with table-driven cases

Check a function with table-driven cases using a complete Go program with explicit sample inputs.

Go✓ Tested
GoTesting & reusable helpers

Check whether bytes contain valid JSON

Check whether bytes contain valid JSON using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeDockerfile patterns

Choose Bash with pipefail for build commands

Docker / Compose: SHELL changes the interpreter for subsequent shell-form instructions.

Docker / Compose✓ Tested
GoTesting & reusable helpers

Clamp a value to an allowed interval

Clamp a value to an allowed interval using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeDockerfile patterns

Combine a stable entrypoint with default arguments

Docker / Compose: CMD supplies default arguments to an exec-form ENTRYPOINT.

Docker / Compose✓ Tested
GoTesting & reusable helpers

Compare floats within a tolerance

Compare floats within a tolerance using a complete Go program with explicit sample inputs.

Go✓ Tested
GoTesting & reusable helpers

Compare two byte buffers

Compare two byte buffers using a complete Go program with explicit sample inputs.

Go✓ Tested
ReactAccessibility & events

Connect an invalid field to its explanation

Connect an invalid field to its explanation with a small React component and explicit browser behavior.

React✓ Tested
CSSVisual treatment & accessibility

Control the size of a repeated background tile

CSS: Background-size sets the rendered dimensions of each repeated background image.

CSS✓ Tested