Results for “style”
Small, practical examples. Search by task or narrow things down below.
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
Style supporting text in italics
CSS: Font-style changes presentation without adding semantic emphasis by itself.
CSS✓ Tested
Style the first and last list items
Style the first and last list items with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Validate a simple C-style ASCII identifier
C: Check the first character separately from subsequent characters and reject empty input.
C✓ 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 days to a date
Use DATEADD for date arithmetic.
DATEADD✓ 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