@terrahq/wysiwyg 1.0.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.
Files changed (230) hide show
  1. package/README.md +857 -0
  2. package/content/sanity-content.html +131 -0
  3. package/content/wordpress-content.html +266 -0
  4. package/dist/arrow.svg +3 -0
  5. package/dist/assets/UncutSans-Bold-2fac4f16.woff +0 -0
  6. package/dist/assets/UncutSans-Bold-7b3ccca7.woff2 +0 -0
  7. package/dist/assets/UncutSans-BoldItalic-b019f8c2.woff +0 -0
  8. package/dist/assets/UncutSans-BoldItalic-d20eba8f.woff2 +0 -0
  9. package/dist/assets/UncutSans-Book-8173cf82.woff +0 -0
  10. package/dist/assets/UncutSans-Book-d8cebf5d.woff2 +0 -0
  11. package/dist/assets/UncutSans-BookItalic-7a28bfb1.woff2 +0 -0
  12. package/dist/assets/UncutSans-BookItalic-d712b826.woff +0 -0
  13. package/dist/assets/UncutSans-Light-57c0f45d.woff2 +0 -0
  14. package/dist/assets/UncutSans-Light-8f82ee8c.woff +0 -0
  15. package/dist/assets/UncutSans-LightItalic-5d6a8d36.woff2 +0 -0
  16. package/dist/assets/UncutSans-LightItalic-9289a22f.woff +0 -0
  17. package/dist/assets/UncutSans-Medium-98513c38.woff +0 -0
  18. package/dist/assets/UncutSans-Medium-ed4917e5.woff2 +0 -0
  19. package/dist/assets/UncutSans-MediumItalic-1bbdbf4b.woff +0 -0
  20. package/dist/assets/UncutSans-MediumItalic-ef65e4f3.woff2 +0 -0
  21. package/dist/assets/UncutSans-Regular-6113b781.woff2 +0 -0
  22. package/dist/assets/UncutSans-Regular-f43ac780.woff +0 -0
  23. package/dist/assets/UncutSans-RegularItalic-6c918c22.woff +0 -0
  24. package/dist/assets/UncutSans-RegularItalic-de14905d.woff2 +0 -0
  25. package/dist/assets/main-41a2c29c.js +1 -0
  26. package/dist/assets/main-fcc727c6.css +1 -0
  27. package/dist/content/sanity-content.html +133 -0
  28. package/dist/content/wordpress-content.html +262 -0
  29. package/dist/img/Boba-Orange.png +0 -0
  30. package/dist/img/Diana-Blue.png +0 -0
  31. package/dist/img/Ebb-Green.png +0 -0
  32. package/dist/img/Forma-Lime.png +0 -0
  33. package/dist/img/Gollum-Pink.png +0 -0
  34. package/dist/img/Infinito-Gray.png +0 -0
  35. package/dist/img/Melos-Red.png +0 -0
  36. package/dist/img/Mendia-Black.png +0 -0
  37. package/dist/img/Mistyk-White.png +0 -0
  38. package/dist/img/Prismo-Blue.png +0 -0
  39. package/dist/img/Punky-Green.png +0 -0
  40. package/dist/img/Stanley-Lime.png +0 -0
  41. package/dist/img/bg.jpeg +0 -0
  42. package/dist/img/card-23/img-card23.png +0 -0
  43. package/dist/img/card-23/img2-card23.png +0 -0
  44. package/dist/img/card-23/img3-card23.png +0 -0
  45. package/dist/img/card-23/img4-card23.png +0 -0
  46. package/dist/img/card-32/img-card32.png +0 -0
  47. package/dist/img/card-32/img2-card32.png +0 -0
  48. package/dist/img/card-32/img3-card32.png +0 -0
  49. package/dist/img/card-32/img4-card32.png +0 -0
  50. package/dist/img/card-32/img5-card32.png +0 -0
  51. package/dist/img/card-35/card35.png +0 -0
  52. package/dist/img/card-39/img-card39.png +0 -0
  53. package/dist/img/card-39/img2-card39.png +0 -0
  54. package/dist/img/card-39/img3-card39.png +0 -0
  55. package/dist/img/card-39/img4-card39.png +0 -0
  56. package/dist/img/cta/cta.png +0 -0
  57. package/dist/img/layout-04/img-layout04.png +0 -0
  58. package/dist/img/layout-04/img2-layout04.png +0 -0
  59. package/dist/img/layout-04/img3-layout04.png +0 -0
  60. package/dist/img/layout-04/img4-layout04.png +0 -0
  61. package/dist/img/terra-placeholder.jpg +0 -0
  62. package/dist/img/terraform-group-color.png +0 -0
  63. package/dist/index.html +36 -0
  64. package/dist/lottie/terraforms-all.json +1 -0
  65. package/dist/lottie/terraforms.json +1 -0
  66. package/dist/mountain.png +0 -0
  67. package/dist/terra.gif +0 -0
  68. package/dist/terra.png +0 -0
  69. package/dist/tree.png +0 -0
  70. package/dist/video/terra-video.mp4 +0 -0
  71. package/dist/vite.svg +1 -0
  72. package/index.html +34 -0
  73. package/package.json +23 -0
  74. package/public/arrow.svg +3 -0
  75. package/public/img/Boba-Orange.png +0 -0
  76. package/public/img/Diana-Blue.png +0 -0
  77. package/public/img/Ebb-Green.png +0 -0
  78. package/public/img/Forma-Lime.png +0 -0
  79. package/public/img/Gollum-Pink.png +0 -0
  80. package/public/img/Infinito-Gray.png +0 -0
  81. package/public/img/Melos-Red.png +0 -0
  82. package/public/img/Mendia-Black.png +0 -0
  83. package/public/img/Mistyk-White.png +0 -0
  84. package/public/img/Prismo-Blue.png +0 -0
  85. package/public/img/Punky-Green.png +0 -0
  86. package/public/img/Stanley-Lime.png +0 -0
  87. package/public/img/bg.jpeg +0 -0
  88. package/public/img/card-23/img-card23.png +0 -0
  89. package/public/img/card-23/img2-card23.png +0 -0
  90. package/public/img/card-23/img3-card23.png +0 -0
  91. package/public/img/card-23/img4-card23.png +0 -0
  92. package/public/img/card-32/img-card32.png +0 -0
  93. package/public/img/card-32/img2-card32.png +0 -0
  94. package/public/img/card-32/img3-card32.png +0 -0
  95. package/public/img/card-32/img4-card32.png +0 -0
  96. package/public/img/card-32/img5-card32.png +0 -0
  97. package/public/img/card-35/card35.png +0 -0
  98. package/public/img/card-39/img-card39.png +0 -0
  99. package/public/img/card-39/img2-card39.png +0 -0
  100. package/public/img/card-39/img3-card39.png +0 -0
  101. package/public/img/card-39/img4-card39.png +0 -0
  102. package/public/img/cta/cta.png +0 -0
  103. package/public/img/layout-04/img-layout04.png +0 -0
  104. package/public/img/layout-04/img2-layout04.png +0 -0
  105. package/public/img/layout-04/img3-layout04.png +0 -0
  106. package/public/img/layout-04/img4-layout04.png +0 -0
  107. package/public/img/terra-placeholder.jpg +0 -0
  108. package/public/img/terraform-group-color.png +0 -0
  109. package/public/lottie/terraforms-all.json +1 -0
  110. package/public/lottie/terraforms.json +1 -0
  111. package/public/mountain.png +0 -0
  112. package/public/terra.gif +0 -0
  113. package/public/terra.png +0 -0
  114. package/public/tree.png +0 -0
  115. package/public/video/terra-video.mp4 +0 -0
  116. package/public/vite.svg +1 -0
  117. package/readme/blocks/Button.md +31 -0
  118. package/readme/blocks/Columns.md +31 -0
  119. package/readme/blocks/Footnote.md +35 -0
  120. package/readme/blocks/Headings.md +132 -0
  121. package/readme/blocks/Highlighted.md +35 -0
  122. package/readme/blocks/Image.md +143 -0
  123. package/readme/blocks/Links.md +24 -0
  124. package/readme/blocks/Lists.md +327 -0
  125. package/readme/blocks/Paragraphs.md +35 -0
  126. package/readme/blocks/Quote.md +94 -0
  127. package/readme/blocks/Separator.md +52 -0
  128. package/readme/blocks/Table.md +199 -0
  129. package/readme/blocks/Utilities.md +24 -0
  130. package/readme/blocks/Video.md +24 -0
  131. package/readme/properties/Border.md +52 -0
  132. package/readme/properties/Custom.md +54 -0
  133. package/readme/properties/Font.md +151 -0
  134. package/readme/properties/Media.md +0 -0
  135. package/src/assets/cta/noise.png +0 -0
  136. package/src/assets/fonts/UncutSans-Bold.woff +0 -0
  137. package/src/assets/fonts/UncutSans-Bold.woff2 +0 -0
  138. package/src/assets/fonts/UncutSans-BoldItalic.woff +0 -0
  139. package/src/assets/fonts/UncutSans-BoldItalic.woff2 +0 -0
  140. package/src/assets/fonts/UncutSans-Book.woff +0 -0
  141. package/src/assets/fonts/UncutSans-Book.woff2 +0 -0
  142. package/src/assets/fonts/UncutSans-BookItalic.woff +0 -0
  143. package/src/assets/fonts/UncutSans-BookItalic.woff2 +0 -0
  144. package/src/assets/fonts/UncutSans-Light.woff +0 -0
  145. package/src/assets/fonts/UncutSans-Light.woff2 +0 -0
  146. package/src/assets/fonts/UncutSans-LightItalic.woff +0 -0
  147. package/src/assets/fonts/UncutSans-LightItalic.woff2 +0 -0
  148. package/src/assets/fonts/UncutSans-Medium.woff +0 -0
  149. package/src/assets/fonts/UncutSans-Medium.woff2 +0 -0
  150. package/src/assets/fonts/UncutSans-MediumItalic.woff +0 -0
  151. package/src/assets/fonts/UncutSans-MediumItalic.woff2 +0 -0
  152. package/src/assets/fonts/UncutSans-Regular.woff +0 -0
  153. package/src/assets/fonts/UncutSans-Regular.woff2 +0 -0
  154. package/src/assets/fonts/UncutSans-RegularItalic.woff +0 -0
  155. package/src/assets/fonts/UncutSans-RegularItalic.woff2 +0 -0
  156. package/src/assets/mountain.png +0 -0
  157. package/src/assets/vector-v.svg +5 -0
  158. package/src/js/main.ts +13 -0
  159. package/src/scss/_paths.scss +5 -0
  160. package/src/scss/framework/_var/_vars.scss +106 -0
  161. package/src/scss/framework/components/btn/_c--btn-a.scss +58 -0
  162. package/src/scss/framework/components/content/_c--content-a.scss +460 -0
  163. package/src/scss/framework/components/link/_c--link-a.scss +13 -0
  164. package/src/scss/framework/components/preloader/_c--preloader-a.scss +62 -0
  165. package/src/scss/framework/components/transition/_c--transition-a.scss +24 -0
  166. package/src/scss/framework/foundation/_foundation.scss +32 -0
  167. package/src/scss/framework/foundation/background/_background.scss +8 -0
  168. package/src/scss/framework/foundation/color/_color.scss +8 -0
  169. package/src/scss/framework/foundation/font/_font.scss +27 -0
  170. package/src/scss/framework/foundation/font/_make-font.scss +61 -0
  171. package/src/scss/framework/foundation/gap/_gap.scss +17 -0
  172. package/src/scss/framework/foundation/gap/_make-gap.scss +29 -0
  173. package/src/scss/framework/foundation/grid/_columns.scss +115 -0
  174. package/src/scss/framework/foundation/grid/_container.scss +17 -0
  175. package/src/scss/framework/foundation/grid/_grid.scss +3 -0
  176. package/src/scss/framework/foundation/grid/_make-columns.scss +28 -0
  177. package/src/scss/framework/foundation/grid/_make-container.scss +33 -0
  178. package/src/scss/framework/foundation/grid/_make-row.scss +20 -0
  179. package/src/scss/framework/foundation/grid/_row.scss +9 -0
  180. package/src/scss/framework/foundation/reset/_reset.scss +121 -0
  181. package/src/scss/framework/foundation/spaces/_make-spaces.scss +29 -0
  182. package/src/scss/framework/foundation/spaces/_spaces.scss +17 -0
  183. package/src/scss/framework/utilities/_align-items.scss +39 -0
  184. package/src/scss/framework/utilities/_aspect-ratio.scss +55 -0
  185. package/src/scss/framework/utilities/_display.scss +46 -0
  186. package/src/scss/framework/utilities/_flex-direction.scss +42 -0
  187. package/src/scss/framework/utilities/_font-style.scss +38 -0
  188. package/src/scss/framework/utilities/_font-weight.scss +45 -0
  189. package/src/scss/framework/utilities/_justify-content.scss +42 -0
  190. package/src/scss/framework/utilities/_order.scss +38 -0
  191. package/src/scss/framework/utilities/_overflow.scss +38 -0
  192. package/src/scss/framework/utilities/_position.scss +42 -0
  193. package/src/scss/framework/utilities/_spacing.scss +66 -0
  194. package/src/scss/framework/utilities/_text-align.scss +40 -0
  195. package/src/scss/framework/utilities/_utilities.scss +12 -0
  196. package/src/scss/global-content/_global-mixins/_global-mixins.scss +2 -0
  197. package/src/scss/global-content/_global-mixins/blocks/_content-block-btn.scss +31 -0
  198. package/src/scss/global-content/_global-mixins/blocks/_content-block-columns.scss +38 -0
  199. package/src/scss/global-content/_global-mixins/blocks/_content-block-footnote.scss +8 -0
  200. package/src/scss/global-content/_global-mixins/blocks/_content-block-highlighted.scss +8 -0
  201. package/src/scss/global-content/_global-mixins/blocks/_content-block-image.scss +244 -0
  202. package/src/scss/global-content/_global-mixins/blocks/_content-block-quote.scss +72 -0
  203. package/src/scss/global-content/_global-mixins/blocks/_content-block-separator.scss +33 -0
  204. package/src/scss/global-content/_global-mixins/blocks/_content-block-table.scss +116 -0
  205. package/src/scss/global-content/_global-mixins/blocks/_content-block-video.scss +28 -0
  206. package/src/scss/global-content/_global-mixins/blocks/_content-heading.scss +45 -0
  207. package/src/scss/global-content/_global-mixins/blocks/_content-links.scss +21 -0
  208. package/src/scss/global-content/_global-mixins/blocks/_content-list.scss +960 -0
  209. package/src/scss/global-content/_global-mixins/blocks/_content-paragraph.scss +22 -0
  210. package/src/scss/global-content/_global-mixins/blocks/_content-utilities.scss +35 -0
  211. package/src/scss/global-content/_global-mixins/blocks/_content.scss +14 -0
  212. package/src/scss/global-content/_global-mixins/helpers/_class.scss +11 -0
  213. package/src/scss/global-content/_global-mixins/helpers/_helpers.scss +1 -0
  214. package/src/scss/global-content/_global-mixins/properties/_border.scss +18 -0
  215. package/src/scss/global-content/_global-mixins/properties/_custom.scss +51 -0
  216. package/src/scss/global-content/_global-mixins/properties/_font.scss +60 -0
  217. package/src/scss/global-content/_global-mixins/properties/_media.scss +188 -0
  218. package/src/scss/global-content/_global-mixins/properties/_properties.scss +3 -0
  219. package/src/scss/global-content/_library.scss +2 -0
  220. package/src/scss/global-content/_sanity.scss +157 -0
  221. package/src/scss/global-content/_wordpress.scss +233 -0
  222. package/src/scss/index.scss +7 -0
  223. package/src/scss/sanity/index.scss +1 -0
  224. package/src/scss/sanity.scss +138 -0
  225. package/src/scss/wordpress/index.scss +1 -0
  226. package/src/scss/wp.scss +267 -0
  227. package/src/vite-env.d.ts +2 -0
  228. package/terrahq-wysiwyg-0.0.19.tgz +0 -0
  229. package/tsconfig.json +27 -0
  230. package/vite.config.js +39 -0
@@ -0,0 +1,22 @@
1
+ @use "../_global-mixins" as *;
2
+
3
+ @mixin paragraphs-wysiwyg() {
4
+ em {
5
+ font-style: italic;
6
+ }
7
+ }
8
+
9
+
10
+ @mixin paragraphs-wysiwyg-wp-modifier($options) {
11
+ & > p,
12
+ .wp-block-column > p,
13
+ .wp-block-media-text p {
14
+ @include make-font-wysiwyg-options($options: $options);
15
+ }
16
+ }
17
+
18
+ @mixin paragraphs-wysiwyg-sanity-modifier($options) {
19
+ & > p {
20
+ @include make-font-wysiwyg-options($options: $options);
21
+ }
22
+ }
@@ -0,0 +1,35 @@
1
+ @use "sass:map";
2
+
3
+ $utilities-wysiwyg-options: (
4
+ "media-text-aligned-margin-x": null,
5
+ );
6
+
7
+ @mixin utilities-wp() {
8
+ *.alignleft{
9
+ float: left;
10
+ }
11
+ *.alignright{
12
+ float: right;
13
+ }
14
+ *.aligncenter{
15
+ margin-left: auto;
16
+ margin-right: auto;
17
+ }
18
+ }
19
+
20
+ @mixin utilities-wp-modifier($options) {
21
+ @each $property, $value in $options {
22
+ @if map.has-key($utilities-wysiwyg-options, $property) {
23
+ @if $value {
24
+ @if $property == "media-text-aligned-margin-x" {
25
+ *.alignleft{
26
+ margin-right: $value !important;
27
+ }
28
+ *.alignright{
29
+ margin-left: $value !important;
30
+ }
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,14 @@
1
+ @forward "./content-block-btn";
2
+ @forward "./content-block-columns";
3
+ @forward "./content-block-footnote";
4
+ @forward "./content-block-highlighted.scss";
5
+ @forward "./content-block-image.scss";
6
+ @forward "./content-block-quote.scss";
7
+ @forward "./content-block-separator.scss";
8
+ @forward "./content-block-table.scss";
9
+ @forward "./content-block-video";
10
+ @forward "./content-heading.scss";
11
+ @forward "./content-links.scss";
12
+ @forward "./content-list.scss";
13
+ @forward "./content-paragraph.scss";
14
+ @forward "./content-utilities.scss";
@@ -0,0 +1,11 @@
1
+ @use "sass:meta";
2
+
3
+ @mixin make-class-options($className) {
4
+ @if meta.type-of($className) == list {
5
+ @each $class in $className {
6
+ @extend .#{$class};
7
+ }
8
+ } @else {
9
+ @extend .#{$className};
10
+ }
11
+ }
@@ -0,0 +1 @@
1
+ @forward './class';
@@ -0,0 +1,18 @@
1
+ @use "sass:map";
2
+
3
+ @mixin make-border-wysiwyg-options($options) {
4
+ $border-wysiwyg-options: (
5
+ "border-color": null,
6
+ "border-radius": null,
7
+ "border-style": null,
8
+ "border-width": null,
9
+ );
10
+
11
+ @each $property, $value in $options {
12
+ @if map.has-key($border-wysiwyg-options, $property) {
13
+ @if $value {
14
+ #{$property}: $value;
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,51 @@
1
+ @use "sass:meta";
2
+
3
+ @mixin make-custom-wysiwyg-options($options) {
4
+ @each $selector, $properties in $options {
5
+ @if $selector {
6
+ @if $selector != "parent" {
7
+ #{$selector} {
8
+ @each $property, $value in $properties {
9
+ @if $property != "class" {
10
+ & {
11
+ #{$property}: $value;
12
+ }
13
+ } @else {
14
+ @if meta.type-of($value) == list {
15
+ @each $class in $value {
16
+ & {
17
+ @extend .#{$class};
18
+ }
19
+ }
20
+ } @else {
21
+ & {
22
+ @extend .#{$value};
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
28
+ } @else {
29
+ @each $property, $value in $properties {
30
+ @if $property != "class" {
31
+ & {
32
+ #{$property}: $value;
33
+ }
34
+ } @else {
35
+ @if meta.type-of($value) == list {
36
+ @each $class in $value {
37
+ & {
38
+ @extend .#{$class};
39
+ }
40
+ }
41
+ } @else {
42
+ & {
43
+ @extend .#{$value};
44
+ }
45
+ }
46
+ }
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
@@ -0,0 +1,60 @@
1
+ @use "sass:meta";
2
+ @use "sass:map";
3
+
4
+ $font-wysiwyg-options: (
5
+ "color": null,
6
+ "font-family": null,
7
+ "font-size": null,
8
+ "font-style": null,
9
+ "font-weight": null,
10
+ "letter-spacing": null,
11
+ "line-height": null,
12
+ "max-lines": null,
13
+ "text-decoration": null,
14
+ "text-decoration-color": null,
15
+ "text-underline-position": null,
16
+ "className": null,
17
+ "margin-bottom": null,
18
+ "margin-bottom-before-lists": null,
19
+ "padding-top": null,
20
+ "text-align": null,
21
+ "bold-font-weight": null,
22
+ );
23
+
24
+ @mixin make-font-wysiwyg-options($options) {
25
+ @each $property, $value in $options {
26
+ @if map.has-key($font-wysiwyg-options, $property) {
27
+ @if $value {
28
+ @if $property == "className" {
29
+ @if meta.type-of($value) == list {
30
+ @each $class in $value {
31
+ @extend .#{$class};
32
+ }
33
+ } @else {
34
+ @extend .#{$value};
35
+ }
36
+ } @else if $property == "max-lines" {
37
+ overflow: hidden;
38
+ text-overflow: ellipsis;
39
+ display: -webkit-box;
40
+ -webkit-line-clamp: $value;
41
+ -webkit-box-orient: vertical;
42
+ } @else if $property == "bold-font-weight" {
43
+ b,
44
+ strong {
45
+ font-weight: $value;
46
+ }
47
+ } @else if $property == "margin-bottom-before-lists" {
48
+ &:has(
49
+ + ul,
50
+ + ol
51
+ ){
52
+ margin-bottom: $value;
53
+ }
54
+ } @else {
55
+ #{$property}: $value;
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
@@ -0,0 +1,188 @@
1
+ @use "sass:map";
2
+ @use "./font" as *;
3
+
4
+ $media-wysiwyg-options: (
5
+ "border-color": null,
6
+ "border-radius": null,
7
+ "border-style": null,
8
+ "border-width": null,
9
+ "object-fit": null,
10
+ "max-height": null,
11
+ "min-height": null,
12
+ "object-position": null,
13
+ "max-width": null,
14
+ "min-width": null,
15
+ "margin-bottom": null,
16
+ "caption": null,
17
+ "zoom-button-background-color": null,
18
+ "zoom-button-bottom": null,
19
+ "zoom-button-right": null,
20
+ "zoom-button-border-radius": null,
21
+ );
22
+
23
+ @mixin make-media-wysiwyg-options($options, $platform, $media-type: false) {
24
+ @each $property, $value in $options {
25
+ @if map.has-key($media-wysiwyg-options, $property) {
26
+ @if $value {
27
+ @if $platform == wp {
28
+ @if $media-type == "image" {
29
+ @if $property == "margin-bottom" {
30
+ figure.wp-block-image {
31
+ #{$property}: $value;
32
+ }
33
+ div.wp-block-image {
34
+ figure {
35
+ #{$property}: $value;
36
+ }
37
+ }
38
+ *[class^="wp-block"] {
39
+ img {
40
+ #{$property}: $value;
41
+ }
42
+ }
43
+ > p {
44
+ > img {
45
+ #{$property}: $value;
46
+ }
47
+ }
48
+ } @else if $property == "caption" {
49
+ figure.wp-block-image {
50
+ figcaption {
51
+ @include make-font-wysiwyg-options($options: $value);
52
+ }
53
+ }
54
+ div.wp-block-image {
55
+ figure {
56
+ figcaption {
57
+ @include make-font-wysiwyg-options($options: $value);
58
+ }
59
+ }
60
+ }
61
+ } @else if $property == "zoom-button-background-color" {
62
+ button.lightbox-trigger {
63
+ background-color: $value;
64
+ }
65
+ } @else if $property == "zoom-button-right" {
66
+ button.lightbox-trigger {
67
+ right: $value !important;
68
+ }
69
+ } @else if $property == "zoom-button-bottom" {
70
+ button.lightbox-trigger {
71
+ transform: translateY(calc(-100% - #{$value})) !important;
72
+ }
73
+ } @else if $property == "zoom-button-border-radius" {
74
+ button.lightbox-trigger {
75
+ border-radius: $value;
76
+ }
77
+ } @else {
78
+ figure.wp-block-image {
79
+ img {
80
+ #{$property}: $value;
81
+ }
82
+ }
83
+ div.wp-block-image {
84
+ figure {
85
+ img {
86
+ #{$property}: $value;
87
+ }
88
+ }
89
+ }
90
+ *[class^="wp-block"] {
91
+ img {
92
+ #{$property}: $value;
93
+ }
94
+ }
95
+ > p {
96
+ > img {
97
+ #{$property}: $value;
98
+ }
99
+ }
100
+ }
101
+ } @else if $media-type == "video" {
102
+ @if $property == "margin-bottom" {
103
+ figure.wp-block-embed,
104
+ figure.wp-block-video {
105
+ #{$property}: $value;
106
+ }
107
+ div.wp-block-embed,
108
+ div.wp-block-video {
109
+ figure {
110
+ #{$property}: $value;
111
+ }
112
+ }
113
+ > p {
114
+ > iframe,
115
+ > video {
116
+ #{$property}: $value;
117
+ }
118
+ }
119
+ } @else if $property == "caption" {
120
+ figure.wp-block-embed,
121
+ figure.wp-block-video {
122
+ figcaption {
123
+ @include make-font-wysiwyg-options($options: $value);
124
+ }
125
+ }
126
+ div.wp-block-embed,
127
+ div.wp-block-video {
128
+ figure {
129
+ figcaption {
130
+ @include make-font-wysiwyg-options($options: $value);
131
+ }
132
+ }
133
+ }
134
+ } @else {
135
+ figure.wp-block-embed,
136
+ figure.wp-block-video {
137
+ iframe,
138
+ video {
139
+ #{$property}: $value;
140
+ }
141
+ }
142
+ div.wp-block-embed,
143
+ div.wp-block-video {
144
+ figure {
145
+ iframe,
146
+ video {
147
+ #{$property}: $value;
148
+ }
149
+ }
150
+ }
151
+ *[class^="wp-block"] {
152
+ iframe,
153
+ video {
154
+ #{$property}: $value;
155
+ }
156
+ }
157
+ > p {
158
+ > iframe,
159
+ > video {
160
+ #{$property}: $value;
161
+ }
162
+ }
163
+ }
164
+ }
165
+ }
166
+ @if $platform == sanity {
167
+ @if $property == "margin-bottom" {
168
+ figure {
169
+ #{$property}: $value;
170
+ }
171
+ } @else if $property == "caption" {
172
+ figure {
173
+ figcaption {
174
+ @include make-font-wysiwyg-options($options: $value);
175
+ }
176
+ }
177
+ } @else {
178
+ figure {
179
+ img {
180
+ #{$property}: $value;
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
@@ -0,0 +1,3 @@
1
+ @forward "./border";
2
+ @forward "./font";
3
+ @forward "./media";
@@ -0,0 +1,2 @@
1
+ //* Global Mixins
2
+ @forward "./_global-mixins/global-mixins";
@@ -0,0 +1,157 @@
1
+ //* Global Mixins
2
+ @use "sass:map";
3
+ @use "sass:list";
4
+
5
+ @use "./_global-mixins/blocks/content" as *;
6
+ @use "./_global-mixins/properties/custom" as *;
7
+
8
+ $wysiwyg-measure: .5rem;
9
+
10
+ @mixin make-content($btn-options: ()) {
11
+ //* btn
12
+
13
+ //* columns
14
+
15
+ //* footnote
16
+
17
+ //* highlighted
18
+
19
+ //* image
20
+ @include block-image-sanity();
21
+
22
+ //* quote
23
+
24
+ //* separator
25
+
26
+ //* headings
27
+
28
+ //* link
29
+
30
+ //* paragraphs
31
+ @include paragraphs-wysiwyg();
32
+
33
+ //* lists
34
+ @include lists-wysiwyg-sanity();
35
+
36
+ //* video
37
+
38
+ //* table
39
+
40
+ //* utilities
41
+
42
+ & > h1:first-child,
43
+ & > h2:first-child,
44
+ & > h3:first-child,
45
+ & > h4:first-child,
46
+ & > h5:first-child,
47
+ & > h6:first-child,
48
+ & > p:first-child {
49
+ padding-top: 0 !important;
50
+ }
51
+ & > *:last-child {
52
+ margin-bottom: 0 !important;
53
+ }
54
+ }
55
+
56
+ @mixin make-content-modifier(
57
+ $btn-options: (),
58
+ $columns-options: (),
59
+ $footnote-options: (),
60
+ $highlighted-options: (),
61
+ $image-options: (),
62
+ $quote-options: (),
63
+ $separator-options: (),
64
+ $headings-options: (),
65
+ $link-options: (),
66
+ $paragraphs-options: (),
67
+ $lists-options: (),
68
+ $video-options: (),
69
+ $table-options: (),
70
+ $utilities-options: (),
71
+ $custom-options: ()
72
+ ) {
73
+ //* btn
74
+ @if list.length(map.keys($btn-options)) > 0 {
75
+ @error "Sanity doesn't support button styles";
76
+ }
77
+
78
+ //* columns
79
+ @if list.length(map.keys($columns-options)) > 0 {
80
+ @error "Sanity doesn't support columns styles";
81
+ }
82
+
83
+ //* footnote
84
+ @if list.length(map.keys($footnote-options)) > 0 {
85
+ @error "Sanity doesn't support footnote styles";
86
+ }
87
+
88
+ //* highlighted
89
+ @if list.length(map.keys($highlighted-options)) > 0 {
90
+ @error "Sanity doesn't support highlighted styles";
91
+ }
92
+
93
+ //* image
94
+ @include block-image-sanity-modifier($options: $image-options);
95
+ @if list.length(map.keys($image-options)) > 0 {
96
+ @if map.get($image-options, "margin-bottom") == null {
97
+ figure {
98
+ margin-bottom: $wysiwyg-measure * 5;
99
+ }
100
+ }
101
+ }
102
+
103
+ //* quote
104
+ @include block-quote-sanity-modifier($options: $quote-options);
105
+ @if list.length(map.keys($quote-options)) > 0 {
106
+ @if map.get($quote-options, "padding") == null {
107
+ blockquote {
108
+ padding: $wysiwyg-measure * 3 0;
109
+ }
110
+ }
111
+ @if map.get($quote-options, "margin-top") == null {
112
+ blockquote {
113
+ margin-top: $wysiwyg-measure * 5;
114
+ }
115
+ }
116
+ @if map.get($quote-options, "margin-bottom") == null {
117
+ blockquote {
118
+ margin-top: $wysiwyg-measure * 6;
119
+ }
120
+ }
121
+ }
122
+
123
+ //* separator
124
+ @if list.length(map.keys($separator-options)) > 0 {
125
+ @error "Sanity doesn't support separator styles";
126
+ }
127
+
128
+ //* headings
129
+ @include headings-sanity-modifier($options: $headings-options);
130
+
131
+ //* link
132
+ @include block-link-wysiwyg-modifier($options: $link-options);
133
+
134
+ //* paragraphs
135
+ @include paragraphs-wysiwyg-sanity-modifier($options: $paragraphs-options);
136
+
137
+ //* lists
138
+ @include lists-wysiwyg-sanity-modifier($options: $lists-options);
139
+
140
+ //* video
141
+ @if list.length(map.keys($video-options)) > 0 {
142
+ @error "Sanity doesn't support video styles";
143
+ }
144
+
145
+ //* table
146
+ @if list.length(map.keys($table-options)) > 0 {
147
+ @error "Sanity doesn't support table styles";
148
+ }
149
+
150
+ //* utilities
151
+ @if list.length(map.keys($utilities-options)) > 0 {
152
+ @error "Sanity doesn't support utilities styles";
153
+ }
154
+
155
+ //* custom
156
+ @include make-custom-wysiwyg-options($options: $custom-options);
157
+ }