fix(breakpoints): rename exported functions to reflect constraint-based API: cssForCustom -> cssForConstraint and cssForCustomContainer -> cssForConstraintContainer; update README usage
This commit is contained in:
@@ -125,7 +125,7 @@ import { breakpoints } from '@design.estate/dees-domtools';
|
||||
import { css as litCss } from 'lit';
|
||||
|
||||
// Viewport-level with custom constraints (emits @media + @container wccToolsViewport)
|
||||
breakpoints.cssForCustom({ maxWidth: 800 })(litCss`.box { padding: 8px; }`)
|
||||
breakpoints.cssForConstraint({ maxWidth: 800 })(litCss`.box { padding: 8px; }`)
|
||||
|
||||
// Component-level — targets a named container (no @media fallback)
|
||||
breakpoints.cssForContainer(
|
||||
@@ -135,7 +135,7 @@ breakpoints.cssForContainer(
|
||||
)
|
||||
|
||||
// Component-level with custom constraints (curried)
|
||||
breakpoints.cssForCustomContainer({ maxWidth: 500 }, 'my-component')(litCss`
|
||||
breakpoints.cssForConstraintContainer({ maxWidth: 500 }, 'my-component')(litCss`
|
||||
.grid { gap: 8px; }
|
||||
`)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user