You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,3 +120,26 @@ adhesive.cleanup();
120
120
#### Static Methods
121
121
122
122
-`Adhesive.create(options)` - Create and initialize in one call
123
+
124
+
#### Markup & styling hooks
125
+
126
+
Adhesive wraps your target element in two divs. The outer wrapper receives a data attribute reflecting the current status so you can style with attribute selectors or utilities:
Tailwind/UnoCSS example (using arbitrary variants):
140
+
141
+
```html
142
+
<divid="sticky-element">
143
+
<spanclass="[[data-adhesive-status=initial]_&]:text-red-500 [[data-adhesive-status=fixed]_&]:text-green-500 [[data-adhesive-status=relative]_&]:text-blue-500">Dynamic styling based on status</span>
0 commit comments