Results for “compute”
Small, practical examples. Search by task or narrow things down below.
Derive totals inside a shared service
Derive totals inside a shared service with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Initialize a map entry only when absent
Java: Use computeIfAbsent when creating a collection for a new key.
Java✓ Tested
Adapt a component to its own container width
CSS: Container queries respond to a selected ancestor rather than the full viewport.
CSS✓ Tested
Adapt a layout to viewport orientation
CSS: The orientation query compares viewport dimensions rather than detecting a physical device type.
CSS✓ Tested
Add a clear boundary in forced-colors mode
CSS: Use a system color for a border when the user’s forced-color mode is active.
CSS✓ Tested
Add depth with a box shadow
CSS: Box shadows are painted outside the box without reserving additional layout space.
CSS✓ Tested
Add inner spacing to a content-sized box
CSS: In content-box sizing, padding adds to the declared content width.
CSS✓ Tested
Add space inside a border
CSS: Learn how to add space inside a border in a complete browser example.
CSS✓ Tested
Add space outside an element
CSS: Learn how to add space outside an element in a complete browser example.
CSS✓ Tested
Add spacing between characters
CSS: Letter-spacing adds a consistent amount between typographic characters.
CSS✓ Tested
Align a nested grid with its parent’s columns
CSS: Subgrid reuses the parent tracks for the nested grid’s covered span.
CSS✓ Tested
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