valaxy-theme-press 1.4.0 → 1.5.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valaxy-theme-press",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Docs (VitePress-like) theme for Valaxy",
5
5
  "author": {
6
6
  "email": "me@yunyoujun.cn",
@@ -37,6 +37,6 @@
37
37
  "reka-ui": "^2.10.4"
38
38
  },
39
39
  "devDependencies": {
40
- "valaxy": "1.4.0"
40
+ "valaxy": "1.5.0"
41
41
  }
42
42
  }
package/styles/doc.css CHANGED
@@ -53,6 +53,7 @@
53
53
 
54
54
  /* since it already has a top padding of 1.5rem, we don't need extra scroll margin */
55
55
  --press-extra-scroll-margin: 0px;
56
+ --va-header-anchor-top: 1.5rem;
56
57
  }
57
58
 
58
59
  .press-doc h3 {
@@ -69,37 +70,11 @@
69
70
  font-size: 1.125rem;
70
71
  }
71
72
 
72
- .press-doc .header-anchor {
73
- position: absolute;
74
- top: 0;
75
- left: 0;
76
- margin-left: -0.87em;
77
- font-weight: 500;
78
- user-select: none;
79
- opacity: 0;
80
- text-decoration: none;
81
- transition:
82
- color var(--va-transition-duration),
83
- opacity var(--va-transition-duration);
84
- }
85
-
86
- .press-doc .header-anchor::before {
87
- content: var(--press-header-anchor-symbol);
88
- }
89
-
90
- .press-doc h1:hover .header-anchor,
91
- .press-doc h1 .header-anchor:focus,
92
- .press-doc h2:hover .header-anchor,
93
- .press-doc h2 .header-anchor:focus,
94
- .press-doc h3:hover .header-anchor,
95
- .press-doc h3 .header-anchor:focus,
96
- .press-doc h4:hover .header-anchor,
97
- .press-doc h4 .header-anchor:focus,
98
- .press-doc h5:hover .header-anchor,
99
- .press-doc h5 .header-anchor:focus,
100
- .press-doc h6:hover .header-anchor,
101
- .press-doc h6 .header-anchor:focus {
102
- opacity: 1;
73
+ .press-doc {
74
+ --va-header-anchor-symbol: var(--press-header-anchor-symbol);
75
+ --va-header-anchor-color: var(--press-c-text-3);
76
+ --va-header-anchor-hover-color: var(--press-c-brand-1);
77
+ --va-header-anchor-copied-color: var(--press-c-success-1);
103
78
  }
104
79
 
105
80
  @media (width >= 48rem) {
@@ -110,10 +85,6 @@
110
85
  }
111
86
  }
112
87
 
113
- .press-doc h2 .header-anchor {
114
- top: 1.5rem;
115
- }
116
-
117
88
  /**
118
89
  * Paragraph and inline elements
119
90
  * -------------------------------------------------------------------------- */
@@ -51,7 +51,7 @@
51
51
  overflow-wrap: anywhere;
52
52
  }
53
53
 
54
- a {
54
+ a:not(.header-anchor) {
55
55
  text-decoration: inherit;
56
56
  transition: color var(--va-transition-duration-moderate), border-color var(--va-transition-duration-moderate);
57
57
 
@@ -105,6 +105,8 @@
105
105
  }
106
106
 
107
107
  h2 {
108
+ --va-header-anchor-top: 28px;
109
+
108
110
  border-top-color: var(--pr-c-divider-light);
109
111
  padding-top: 28px;
110
112
  margin-top: 48px;