@myst-theme/styles 1.0.0 → 1.1.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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @myst-theme/styles@1.0.0 build
2
+ > @myst-theme/styles@1.1.0 build
3
3
  > tailwindcss -m -i ./app.css -o ../docs/public/tailwind.css
4
4
 
5
5
  Browserslist: caniuse-lite is outdated. Please run:
@@ -8,4 +8,4 @@ Browserslist: caniuse-lite is outdated. Please run:
8
8
 
9
9
  Rebuilding...
10
10
 
11
- Done in 3895ms.
11
+ Done in 3031ms.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @myst-theme/styles
2
2
 
3
+ ## 1.1.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 9d1a6d3: Fix inline image styling that was incorrectly applied to images in figures and tables
8
+ - cbe05f1: Make table cells match table headers
9
+ - c519f9b: Standardize link styles
10
+
11
+ ## 1.0.1
12
+
3
13
  ## 1.0.0
4
14
 
5
15
  ### Patch Changes
package/button.css CHANGED
@@ -1,8 +1,18 @@
1
- a.button,
2
- cite.button a {
3
- @apply px-4 py-2 font-bold rounded no-underline;
4
- @apply text-white bg-blue-500 whitespace-nowrap;
5
- &:hover {
6
- @apply bg-blue-700;
1
+ /* TODO: Separate out theme styling from component styling more effectively https://github.com/jupyter-book/myst-theme/issues/763 */
2
+ @layer components {
3
+ a.button,
4
+ button.button,
5
+ span.button,
6
+ cite.button a {
7
+ @apply px-4 py-2 font-bold rounded no-underline cursor-pointer;
8
+ @apply text-white dark:text-white hover:text-white dark:hover:text-white;
9
+ @apply bg-blue-500 whitespace-nowrap;
10
+ &:hover {
11
+ @apply bg-blue-700;
12
+ }
13
+ /* Hide external link icon on buttons */
14
+ .external-link-icon {
15
+ @apply hidden;
16
+ }
7
17
  }
8
18
  }
package/hover.css CHANGED
@@ -1,41 +1,49 @@
1
- .hover-card-content {
2
- animation-duration: 0.6s;
3
- animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
4
- z-index: 10;
5
- }
6
- .hover-card-content[data-side='top'] {
7
- animation-name: slideUp;
8
- }
9
- .hover-card-content[data-side='bottom'] {
10
- animation-name: slideDown;
11
- }
12
-
13
- @keyframes slideUp {
14
- from {
15
- opacity: 0;
16
- transform: translateY(10px);
1
+ @layer components {
2
+ .hover-card-content {
3
+ animation-duration: 0.6s;
4
+ animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
5
+ z-index: 10;
17
6
  }
18
- to {
19
- opacity: 1;
20
- transform: translateY(0);
7
+ .hover-card-content[data-side='top'] {
8
+ animation-name: slideUp;
9
+ }
10
+ .hover-card-content[data-side='bottom'] {
11
+ animation-name: slideDown;
21
12
  }
22
- }
23
13
 
24
- @keyframes slideDown {
25
- from {
26
- opacity: 0;
27
- transform: translateY(-10px);
14
+ @keyframes slideUp {
15
+ from {
16
+ opacity: 0;
17
+ transform: translateY(10px);
18
+ }
19
+ to {
20
+ opacity: 1;
21
+ transform: translateY(0);
22
+ }
28
23
  }
29
- to {
30
- opacity: 1;
31
- transform: translateY(0);
24
+
25
+ @keyframes slideDown {
26
+ from {
27
+ opacity: 0;
28
+ transform: translateY(-10px);
29
+ }
30
+ to {
31
+ opacity: 1;
32
+ transform: translateY(0);
33
+ }
32
34
  }
33
- }
34
35
 
35
- .hover-document {
36
- @apply text-sm bg-white border rounded shadow-xl dark:bg-slate-800 border-gray-50;
37
- }
36
+ .hover-document {
37
+ @apply text-sm bg-white border rounded shadow-xl dark:bg-slate-800 border-gray-50;
38
+ }
38
39
 
39
- .hover-link {
40
- @apply font-normal text-blue-700 underline-offset-2 decoration-slate-200 dark:decoration-slate-600 dark:text-blue-100 hover:text-blue-500;
40
+ /* Hoverable links: dotted underline */
41
+ .hover-link {
42
+ @apply decoration-dotted;
43
+ }
44
+
45
+ /* Non-link hover elements (e.g., abbreviations): gray dotted underline */
46
+ .hover-text {
47
+ @apply underline decoration-dotted decoration-[0.1em] underline-offset-[0.15em] decoration-gray-500 dark:decoration-gray-400 cursor-help;
48
+ }
41
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myst-theme/styles",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "main": "index.js",
5
5
  "style": "app.css",
6
6
  "scripts": {
@@ -9,6 +9,10 @@
9
9
  },
10
10
  "author": "Rowan Cockett <rowan@curvenote.com>",
11
11
  "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/jupyter-book/myst-theme.git"
15
+ },
12
16
  "bugs": {
13
17
  "url": "https://github.com/jupyter-book/myst-theme/issues"
14
18
  },
package/typography.css CHANGED
@@ -8,8 +8,22 @@
8
8
  }
9
9
  }
10
10
 
11
+ @layer components {
12
+ /* Links: blue with underline */
13
+ .link,
14
+ .hover-link {
15
+ @apply text-blue-700 dark:text-blue-400 underline decoration-[0.1em] underline-offset-[0.15em] decoration-blue-400 dark:decoration-blue-500 hover:text-blue-500 dark:hover:text-blue-300 hover:decoration-blue-500 dark:hover:decoration-blue-300;
16
+ }
17
+
18
+ /* External link icon (styles the ArrowTopRightOnSquareIcon component) */
19
+ .external-link-icon {
20
+ @apply inline-block w-[0.85em] h-[0.85em] ml-0.5 align-baseline opacity-80;
21
+ }
22
+ }
23
+
11
24
  @layer base {
12
- .prose table td {
25
+ .prose table td,
26
+ .prose table th {
13
27
  @apply p-1 align-top sm:p-2;
14
28
  }
15
29
  .prose table p,
@@ -35,13 +49,15 @@
35
49
  .prose dd {
36
50
  @apply ml-8;
37
51
  }
38
- /* Keep inline images inside text flow from forcing line breaks */
39
- .article p img,
40
- .article table img,
41
- .article dd img,
42
- .prose p img,
43
- .prose table img,
44
- .prose dd img {
52
+ /* Inline images (direct children of paragraphs, with or without links) */
53
+ .article p > img,
54
+ .article p > a > img,
55
+ .article dd > img,
56
+ .article dd > a > img,
57
+ .prose p > img,
58
+ .prose p > a > img,
59
+ .prose dd > img,
60
+ .prose dd > a > img {
45
61
  margin: 0;
46
62
  display: inline-block;
47
63
  max-height: 1.2em;