@ndla/preset-panda 0.0.15 → 0.0.16

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/dist/styles.css CHANGED
@@ -103,21 +103,26 @@
103
103
  }
104
104
 
105
105
  .ndla-article details,.ndla-article blockquote,.ndla-article [data-embed-type="framed-content"],.ndla-article [data-embed-type="factbox"],.ndla-article table,.ndla-article [data-embed-type="related-content-list"],.ndla-article [data-embed-type="link-block-list"],.ndla-article [data-embed-type="blog-post"],.ndla-article [data-embed-type="campaign-block"],.ndla-article [data-embed-type="key-figure"],.ndla-article [data-embed-type="grid"],.ndla-article [data-embed-type="contact-block"],.ndla-article [data-embed-type="file-list"],.ndla-article [data-embed-type="uu-disclaimer"] {
106
- margin-block-start: var(--spacing-xsmall);
107
- margin-block-end: var(--spacing-xsmall);
106
+ margin-block-start: var(--spacing-xxlarge);
107
+ margin-block-end: var(--spacing-xxlarge);
108
108
  }
109
109
 
110
110
  .ndla-article section:not([class]) > :is(h2, [data-embed-type="copy-heading"]),.ndla-article section:not([class]) > div:not([class]) > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="framed-content"] > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="grid"] > div > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="grid-parallax"] > div > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="factbox"] > div > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="copyright"] > :is(h2, [data-embed-type="copy-heading"]),.ndla-article [data-embed-type="uu-disclaimer"] > :is(h2, [data-embed-type="copy-heading"]),.ndla-article details > :is(h2, [data-embed-type="copy-heading"]),.ndla-article blockquote > :is(h2, [data-embed-type="copy-heading"]) {
111
- margin-block-start: var(--spacing-medium);
111
+ margin-block-start: var(--spacing-xxlarge);
112
112
  margin-block-end: var(--spacing-medium);
113
113
  }
114
114
 
115
115
  .ndla-article section:not([class]) > h3,.ndla-article section:not([class]) > div:not([class]) > h3,.ndla-article [data-embed-type="framed-content"] > h3,.ndla-article [data-embed-type="grid"] > div > h3,.ndla-article [data-embed-type="grid-parallax"] > div > h3,.ndla-article [data-embed-type="factbox"] > div > h3,.ndla-article [data-embed-type="copyright"] > h3,.ndla-article [data-embed-type="uu-disclaimer"] > h3,.ndla-article details > h3,.ndla-article blockquote > h3 {
116
- margin-block-start: var(--spacing-small);
116
+ margin-block-start: var(--spacing-xlarge);
117
117
  margin-block-end: var(--spacing-small);
118
118
  }
119
119
 
120
- .ndla-article section:not([class]) > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article section:not([class]) > div:not([class]) > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="framed-content"] > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="grid"] > div > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="grid-parallax"] > div > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="factbox"] > div > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="copyright"] > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="uu-disclaimer"] > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article details > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article blockquote > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"]) {
120
+ .ndla-article section:not([class]) > :is(h4, h5, h6),.ndla-article section:not([class]) > div:not([class]) > :is(h4, h5, h6),.ndla-article [data-embed-type="framed-content"] > :is(h4, h5, h6),.ndla-article [data-embed-type="grid"] > div > :is(h4, h5, h6),.ndla-article [data-embed-type="grid-parallax"] > div > :is(h4, h5, h6),.ndla-article [data-embed-type="factbox"] > div > :is(h4, h5, h6),.ndla-article [data-embed-type="copyright"] > :is(h4, h5, h6),.ndla-article [data-embed-type="uu-disclaimer"] > :is(h4, h5, h6),.ndla-article details > :is(h4, h5, h6),.ndla-article blockquote > :is(h4, h5, h6) {
121
+ margin-block-start: var(--spacing-large);
122
+ margin-block-end: var(--spacing-xsmall);
123
+ }
124
+
125
+ .ndla-article section:not([class]) > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article section:not([class]) > div:not([class]) > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="framed-content"] > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="grid"] > div > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="grid-parallax"] > div > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="factbox"] > div > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="copyright"] > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article [data-embed-type="uu-disclaimer"] > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article details > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]),.ndla-article blockquote > :is(p, figure, ul, ol, dl, [data-embed-type="speech"]) {
121
126
  margin-block-start: var(--spacing-xsmall);
122
127
  margin-block-end: var(--spacing-xsmall);
123
128
  }
package/es/globalCss.js CHANGED
@@ -56,26 +56,27 @@ export const globalCss = defineGlobalStyles({
56
56
  },
57
57
  textStyle: "body.article",
58
58
  width: "100%",
59
- // TODO: Re-check all margin values here. Especially headings.
60
- // TODO: Reconsider grid margins. Do we want custom handling for items inside a grid?
61
-
62
59
  // Non-figure block elements that should have margin above and below.
63
60
  '& details, blockquote, [data-embed-type="framed-content"], [data-embed-type="factbox"], table, [data-embed-type="related-content-list"], [data-embed-type="link-block-list"], [data-embed-type="blog-post"], [data-embed-type="campaign-block"], [data-embed-type="key-figure"], [data-embed-type="grid"], [data-embed-type="contact-block"], [data-embed-type="file-list"], [data-embed-type="uu-disclaimer"]': {
64
- marginBlockStart: "xsmall",
65
- marginBlockEnd: "xsmall"
61
+ marginBlockStart: "xxlarge",
62
+ marginBlockEnd: "xxlarge"
66
63
  },
67
64
  // Article content is usually wrapped in a section. The rest of the elements in this list contains other elements, and should add margin to them no matter where they are placed in the DOM.
68
65
  '& section:not([class]), section:not([class]) > div:not([class]), [data-embed-type="framed-content"], [data-embed-type="grid"] > div, [data-embed-type="grid-parallax"] > div, [data-embed-type="factbox"] > div, [data-embed-type="copyright"], [data-embed-type="uu-disclaimer"], details, blockquote': {
69
66
  // TODO: Remove copy-heading if we can merge the new heading links
70
67
  '& > :is(h2, [data-embed-type="copy-heading"])': {
71
- marginBlockStart: "medium",
68
+ marginBlockStart: "xxlarge",
72
69
  marginBlockEnd: "medium"
73
70
  },
74
71
  "& > h3": {
75
- marginBlockStart: "small",
72
+ marginBlockStart: "xlarge",
76
73
  marginBlockEnd: "small"
77
74
  },
78
- '& > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"])': {
75
+ "& > :is(h4, h5, h6)": {
76
+ marginBlockStart: "large",
77
+ marginBlockEnd: "xsmall"
78
+ },
79
+ '& > :is(p, figure, ul, ol, dl, [data-embed-type="speech"])': {
79
80
  marginBlockStart: "xsmall",
80
81
  marginBlockEnd: "xsmall"
81
82
  }
package/lib/globalCss.js CHANGED
@@ -62,26 +62,27 @@ const globalCss = exports.globalCss = (0, _dev.defineGlobalStyles)({
62
62
  },
63
63
  textStyle: "body.article",
64
64
  width: "100%",
65
- // TODO: Re-check all margin values here. Especially headings.
66
- // TODO: Reconsider grid margins. Do we want custom handling for items inside a grid?
67
-
68
65
  // Non-figure block elements that should have margin above and below.
69
66
  '& details, blockquote, [data-embed-type="framed-content"], [data-embed-type="factbox"], table, [data-embed-type="related-content-list"], [data-embed-type="link-block-list"], [data-embed-type="blog-post"], [data-embed-type="campaign-block"], [data-embed-type="key-figure"], [data-embed-type="grid"], [data-embed-type="contact-block"], [data-embed-type="file-list"], [data-embed-type="uu-disclaimer"]': {
70
- marginBlockStart: "xsmall",
71
- marginBlockEnd: "xsmall"
67
+ marginBlockStart: "xxlarge",
68
+ marginBlockEnd: "xxlarge"
72
69
  },
73
70
  // Article content is usually wrapped in a section. The rest of the elements in this list contains other elements, and should add margin to them no matter where they are placed in the DOM.
74
71
  '& section:not([class]), section:not([class]) > div:not([class]), [data-embed-type="framed-content"], [data-embed-type="grid"] > div, [data-embed-type="grid-parallax"] > div, [data-embed-type="factbox"] > div, [data-embed-type="copyright"], [data-embed-type="uu-disclaimer"], details, blockquote': {
75
72
  // TODO: Remove copy-heading if we can merge the new heading links
76
73
  '& > :is(h2, [data-embed-type="copy-heading"])': {
77
- marginBlockStart: "medium",
74
+ marginBlockStart: "xxlarge",
78
75
  marginBlockEnd: "medium"
79
76
  },
80
77
  "& > h3": {
81
- marginBlockStart: "small",
78
+ marginBlockStart: "xlarge",
82
79
  marginBlockEnd: "small"
83
80
  },
84
- '& > :is(p, h4, h5, h6, figure, ul, ol, dl, [data-embed-type="speech"])': {
81
+ "& > :is(h4, h5, h6)": {
82
+ marginBlockStart: "large",
83
+ marginBlockEnd: "xsmall"
84
+ },
85
+ '& > :is(p, figure, ul, ol, dl, [data-embed-type="speech"])': {
85
86
  marginBlockStart: "xsmall",
86
87
  marginBlockEnd: "xsmall"
87
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndla/preset-panda",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "Panda preset for NDLA.",
5
5
  "license": "GPL-3.0",
6
6
  "main": "lib/index.js",
@@ -36,5 +36,5 @@
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "0fdd094fea36baa5ee2bdfe5b2bc6c423d304f22"
39
+ "gitHead": "7770121967e96fe8d661b0f540e3397d6e2c453f"
40
40
  }