@plusguard/anchor 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,10 +38,10 @@ Load both halves straight from jsDelivr — no install, and the page works
|
|
|
38
38
|
when opened by double-clicking:
|
|
39
39
|
|
|
40
40
|
```html
|
|
41
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@plusguard/anchor@3.4.
|
|
41
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@plusguard/anchor@3.4.1/index.css" />
|
|
42
42
|
|
|
43
43
|
<script type="module">
|
|
44
|
-
import { initAnchor } from "https://cdn.jsdelivr.net/npm/@plusguard/anchor@3.4.
|
|
44
|
+
import { initAnchor } from "https://cdn.jsdelivr.net/npm/@plusguard/anchor@3.4.1/dist/index.js";
|
|
45
45
|
|
|
46
46
|
initAnchor();
|
|
47
47
|
</script>
|
|
@@ -276,10 +276,17 @@ in step with what is open.
|
|
|
276
276
|
position: fixed;
|
|
277
277
|
right: 1rem;
|
|
278
278
|
bottom: 1rem;
|
|
279
|
-
transition: opacity 0.3s, visibility 0.3s;
|
|
279
|
+
transition: opacity 0.3s, visibility 0.3s, background-color 0.2s;
|
|
280
280
|
--pg-anchor-show-after: 100svh; /* after one screen */
|
|
281
281
|
--pg-anchor-avoid-space: 1rem;
|
|
282
282
|
}
|
|
283
|
+
/* A shade darker under a mouse — only where there is one: on a phone a
|
|
284
|
+
tap would leave it stuck. Not opacity: the button fades in and out by it. */
|
|
285
|
+
@media (hover: hover) {
|
|
286
|
+
.up:hover {
|
|
287
|
+
background: #f0f0ec;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
283
290
|
@media (width >= 48rem) {
|
|
284
291
|
.up {
|
|
285
292
|
right: 1.75rem;
|
|
@@ -308,7 +315,7 @@ in step with what is open.
|
|
|
308
315
|
```html
|
|
309
316
|
<head>
|
|
310
317
|
…
|
|
311
|
-
<script src="https://cdn.jsdelivr.net/npm/@plusguard/anchor@3.4.
|
|
318
|
+
<script src="https://cdn.jsdelivr.net/npm/@plusguard/anchor@3.4.1/early.js"></script>
|
|
312
319
|
</head>
|
|
313
320
|
```
|
|
314
321
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plusguard/anchor",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "In-page scrolling from HTML attributes: to a section, the top or the bottom, with a set duration — with or without Lenis. A back-to-top button that shows after a set scroll and steps out of the way of marked elements. Zero dependencies, framework-agnostic. CSS included.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|